HierarchicalExpanderColumn
struct · ferroui-controls-treedatagrid · v0.5.0
struct HierarchicalExpanderColumn<M: TreeModel>
HierarchicalExpanderColumn<TModel>.
Members
newinnerchild_selectorhas_children_selectoris_expanded_selectoractual_widthhas_childrenget_child_modelscreate_expander_cell
new
fn new(inner: Rc<dyn IViewColumn<M>>, child_selector: impl Fn(&Rc<M>) -> Option<Models<M>> + 'static, has_children_selector: Option<Accessor<M, bool>>, is_expanded_selector: Option<Accessor<M, bool>>) -> Rc<Self>
A column that shows inner with an expander. child_selector gives the children of a
model; has_children_selector whether a model has children without selecting them (only
needed when selecting the children is expensive); is_expanded_selector a read/write
expansion state of the model (its setter writes the state back).
inner
fn inner(self: &Self) -> &Rc<dyn IViewColumn<M>>
The column that defines how the cells are shown.
child_selector
fn child_selector(self: &Self) -> &ChildSelector<M>
The selector of the child models.
has_children_selector
fn has_children_selector(self: &Self) -> Option<&Accessor<M, bool>>
is_expanded_selector
fn is_expanded_selector(self: &Self) -> Option<&Accessor<M, bool>>
actual_width
fn actual_width(self: &Self) -> f64
The width of the column after measurement.
has_children
fn has_children(self: &Self, model: &Rc<M>) -> bool
Whether model has children.
get_child_models
fn get_child_models(self: &Self, model: &Rc<M>) -> Option<Models<M>>
The child models of model.
create_expander_cell
fn create_expander_cell(self: &Self, row: Rc<dyn IExpanderRow<M>>, row_ref: &RowRef) -> CellRef
The cell of the expander row row.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeIViewColumn<M>IViewExpanderColumn<M>Borrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherDropINotifyPropertyChangedIColumnIUpdateColumnLayoutICellColumnIColumnOf<M>IExpanderColumn<M>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.