zng_wgt_data

Function with_data_notes

source
pub fn with_data_notes(
    child: impl UiNode,
    on_changed: impl FnMut(&DataNotes) + Send + 'static,
) -> impl UiNode
Expand description

Creates a note that samples DataNotes in a context.

The on_changed closure is called every time a note is inserted or removed in context. The closure can be called in any UiNodeOp, it is always called after the child processed the operation. The notes always change to empty on deinit.