FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SelectionModel

    struct · ferroui-controls-repeater · v0.5.0

    struct SelectionModel
    

    The WinUI hierarchical selection model, independent of realized controls.

    It defaults to multiple selection, can resolve arbitrary nested sources, represents group selection as Some(true), Some(false) or None (partial), and keeps selection synchronized with source collection changes. Its tree is realized only as requested by selection operations.

    View source

    Members

    new

    fn new() -> Rc<Self>
    

    Source

    source

    fn source(self: &Self) -> Option<ItemsSource>
    

    Source

    set_source

    fn set_source(self: &Self, source: Option<ItemsSource>)
    

    Source

    single_select

    fn single_select(self: &Self) -> bool
    

    Source

    set_single_select

    fn set_single_select(self: &Self, value: bool)
    

    Source

    anchor_index

    fn anchor_index(self: &Self) -> Option<IndexPath>
    

    Source

    set_anchor_index

    fn set_anchor_index(self: &Self, value: Option<IndexPath>) -> Result<(), SelectionError>
    

    Source

    set_anchor_index_flat

    fn set_anchor_index_flat(self: &Self, index: i32) -> Result<(), SelectionError>
    

    Source

    set_anchor_index_with_group

    fn set_anchor_index_with_group(self: &Self, group: i32, item: i32) -> Result<(), SelectionError>
    

    Source

    selected_index

    fn selected_index(self: &Self) -> Option<IndexPath>
    

    Source

    set_selected_index

    fn set_selected_index(self: &Self, index: Option<IndexPath>) -> Result<(), SelectionError>
    

    Source

    selected_item

    fn selected_item(self: &Self) -> Option<BoxedValue>
    

    Source

    selected_indices

    fn selected_indices(self: &Self) -> SelectedItems<IndexPath>
    

    Source

    selected_items

    fn selected_items(self: &Self) -> SelectedItems<Option<BoxedValue>>
    

    Source

    select

    fn select(self: &Self, index: i32) -> Result<(), SelectionError>
    

    Source

    deselect

    fn deselect(self: &Self, index: i32) -> Result<(), SelectionError>
    

    Source

    select_with_group

    fn select_with_group(self: &Self, group: i32, item: i32) -> Result<(), SelectionError>
    

    Source

    deselect_with_group

    fn deselect_with_group(self: &Self, group: i32, item: i32) -> Result<(), SelectionError>
    

    Source

    select_at

    fn select_at(self: &Self, path: &IndexPath) -> Result<(), SelectionError>
    

    Source

    deselect_at

    fn deselect_at(self: &Self, path: &IndexPath) -> Result<(), SelectionError>
    

    Source

    is_selected

    fn is_selected(self: &Self, index: i32) -> Option<bool>
    

    Source

    is_selected_with_group

    fn is_selected_with_group(self: &Self, group: i32, item: i32) -> Option<bool>
    

    Source

    is_selected_at

    fn is_selected_at(self: &Self, path: &IndexPath) -> Result<Option<bool>, SelectionError>
    

    Source

    select_range_from_anchor

    fn select_range_from_anchor(self: &Self, index: i32) -> Result<(), SelectionError>
    

    Source

    deselect_range_from_anchor

    fn deselect_range_from_anchor(self: &Self, index: i32) -> Result<(), SelectionError>
    

    Source

    select_range_from_anchor_with_group

    fn select_range_from_anchor_with_group(self: &Self, group: i32, item: i32) -> Result<(), SelectionError>
    

    Source

    deselect_range_from_anchor_with_group

    fn deselect_range_from_anchor_with_group(self: &Self, group: i32, item: i32) -> Result<(), SelectionError>
    

    Source

    select_range_from_anchor_to

    fn select_range_from_anchor_to(self: &Self, index: &IndexPath) -> Result<(), SelectionError>
    

    Source

    deselect_range_from_anchor_to

    fn deselect_range_from_anchor_to(self: &Self, index: &IndexPath) -> Result<(), SelectionError>
    

    Source

    select_range

    fn select_range(self: &Self, start: &IndexPath, end: &IndexPath) -> Result<(), SelectionError>
    

    Source

    deselect_range

    fn deselect_range(self: &Self, start: &IndexPath, end: &IndexPath) -> Result<(), SelectionError>
    

    Source

    select_all

    fn select_all(self: &Self) -> Result<(), SelectionError>
    

    Source

    select_all_flat

    fn select_all_flat(self: &Self)
    

    Selects a flat source as a single range without reading source items.

    Source

    clear_selection

    fn clear_selection(self: &Self)
    

    Source

    selection_changed

    fn selection_changed(self: &Self, handler: impl Fn(&SelectionModelSelectionChangedEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    Source

    children_requested

    fn children_requested(self: &Self, handler: impl Fn(&Rc<SelectionModelChildrenRequestedEventArgs>) -> () + 'static) -> Rc<dyn IDisposable>
    

    Source

    on_property_changed

    fn on_property_changed(self: &Self, property_name: &str)
    

    Source

    is_selection_invalidated_due_to_collection_change

    fn is_selection_invalidated_due_to_collection_change(self: &Self) -> bool
    

    Source

    source_from_item

    fn source_from_item(data: &BoxedValue) -> Option<ItemsSource>
    

    Applies FerroUI's registered collection conversions when automatically resolving children.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.