ISelectionModel
trait · ferroui-controls · v0.5.0
trait ISelectionModel: INotifyPropertyChanged
The untyped contract of a selection model: the selection of an items control.
The property changed event is raised with the names Source,
SingleSelect, SelectedIndex, SelectedIndexes, SelectedItem,
SelectedItems and AnchorIndex.
Each event is subscribed to with the method of its name, which returns the handle that unsubscribes the handler when disposed.
Members
sourceset_sourcesingle_selectset_single_selectselected_indexset_selected_indexselected_indexesselected_itemset_selected_itemselected_itemsanchor_indexset_anchor_indexcountindexes_changedselection_changedlost_selectionsource_resetbegin_batch_updateend_batch_updateis_selectedselectdeselectselect_rangedeselect_rangeselect_allclearas_internal_selection_model
source
fn source(self: &Self) -> Option<ItemsSource>
set_source
fn set_source(self: &Self, value: Option<ItemsSource>)
single_select
fn single_select(self: &Self) -> bool
set_single_select
fn set_single_select(self: &Self, value: bool)
selected_index
fn selected_index(self: &Self) -> i32
set_selected_index
fn set_selected_index(self: &Self, value: i32)
selected_indexes
fn selected_indexes(self: &Self) -> Rc<dyn IReadOnlySelectionList<i32>>
selected_item
fn selected_item(self: &Self) -> Option<BoxedValue>
set_selected_item
fn set_selected_item(self: &Self, value: Option<BoxedValue>)
selected_items
fn selected_items(self: &Self) -> Rc<dyn IReadOnlySelectionList<Option<BoxedValue>>>
anchor_index
fn anchor_index(self: &Self) -> i32
set_anchor_index
fn set_anchor_index(self: &Self, value: i32)
count
fn count(self: &Self) -> usize
indexes_changed
fn indexes_changed(self: &Self, handler: Rc<dyn Fn(&SelectionModelIndexesChangedEventArgs) -> ()>) -> Rc<dyn IDisposable>
selection_changed
fn selection_changed(self: &Self, handler: Rc<dyn Fn(&dyn SelectionModelSelectionChangedEventArgs) -> ()>) -> Rc<dyn IDisposable>
lost_selection
fn lost_selection(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
source_reset
fn source_reset(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
begin_batch_update
fn begin_batch_update(self: &Self)
end_batch_update
fn end_batch_update(self: &Self)
is_selected
fn is_selected(self: &Self, index: i32) -> bool
select
fn select(self: &Self, index: i32)
deselect
fn deselect(self: &Self, index: i32)
select_range
fn select_range(self: &Self, start: i32, end: i32)
deselect_range
fn deselect_range(self: &Self, start: i32, end: i32)
select_all
fn select_all(self: &Self)
clear
fn clear(self: &Self)
as_internal_selection_model
fn as_internal_selection_model(self: &Self) -> Option<&super::InternalSelectionModel>
The model viewed as the internal selection model of the selecting items controls, if it is one.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.