selection
module · ferroui-controls · v0.5.0
module selection
Selection models.
Inheritance among the selection classes
The selection classes form a small hierarchy with virtual members (node base, selection model, internal selection model) but are plain shared structs, not part of the class model. Their virtual members are modelled explicitly, one level at a time:
SelectionNodeBaseholds the state of the base class. Its inherent methods are the base implementations of the virtual members, which are declared bySelectionNodeBaseImpl. The base holds a weak reference to the object deriving from it and makes every virtual call through that reference.SelectionModelembeds the node base and implementsSelectionNodeBaseImpl. Its own implementation of each virtual member is thebase_*method of the same name; the member can be overridden once more by a type deriving from the model, which implementsSelectionModelImpland registers itself withSelectionModel::set_derived. A virtual call reaches the override if there is one, thebase_*method otherwise; an override calls thebase_*method where the managed code calls the base implementation.InternalSelectionModelowns an untyped model, overrides the assignment of the source and the handling of source collection changes throughSelectionModelImpl, and dereferences to the model.
The typed model is SelectionModel<T>; items are Option<T>, a null
item being None. The untyped model is SelectionModel<BoxedValue>.
ISelectionModel is the untyped contract implemented by every model.
Contents
IndexRange— structIndexRangeIndices— structselection_model_ptr_eq— functionBatchUpdateOperation— structISelectionModel— traitSelectionModelExtensions— structInternalSelectionModel— structWritableSelectedItems— type aliasIReadOnlySelectionList— traitReadOnlySelectionList— structReadOnlySelectionListBase— structSelectedIndexes— structSelectedItems— structSelectedItemsUntyped— structSelectionModel— structSelectionModelImpl— traitSelectionModelIndexesChangedEventArgs— structSelectionModelSelectionChangedEventArgs— traitSelectionModelSelectionChangedEventArgsOf— structCollectionChangeState— structSelectionNodeBase— structSelectionNodeBaseImpl— trait
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.