i_slint_core::item_tree

Function visit_items

Source
pub fn visit_items<State>(
    item_tree: &ItemTreeRc,
    order: TraversalOrder,
    visitor: impl FnMut(&ItemTreeRc, Pin<ItemRef<'_>>, u32, &State) -> ItemVisitorResult<State>,
    state: State,
) -> VisitChildrenResult
Expand description

Visit each items recursively

The state parameter returned by the visitor is passed to each child.

Returns the index of the item that cancelled, or -1 if nobody cancelled