TreeDataGridCell
struct · ferroui-controls-treedatagrid · v0.5.0
struct TreeDataGridCell
The base class of the cell controls of a TreeDataGrid.
Members
TYPEto_refbegin_rebindend_rebindrealizeunrealizeupdate_valueon_model_property_changedis_selected_propertyPSEUDO_CLASSESconstructcolumn_indexrow_indexis_editingmodelis_selectedis_effectively_selectedbegin_editcancel_editend_editsubscribe_to_model_changesunsubscribe_from_model_changesraise_cell_value_changedupdate_row_indexupdate_selection
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<TreeDataGridCell>
Returns a strong reference to this object.
begin_rebind
fn begin_rebind(self: &Self)
Begins a synchronous replacement of this cell's row. The presenter still calls
unrealize and realize, including their normal clearing/prepared events. This hook is
not called when a cell is merely returned to the recycle pool.
end_rebind
fn end_rebind(self: &Self, realized: bool)
Ends the synchronous replacement, including when a lifecycle callback panics.
realized is true only when realize completed successfully. On false, release any
presentation state retained by begin_rebind. Do not assume the model or indexes were
reset if a callback failed partway through.
realize
fn realize(self: &Self, factory: &Rc<TreeDataGridElementFactory>, selection: Option<&dyn ITreeDataGridSelectionInteraction>, model: &CellRef, column_index: i32, row_index: i32)
Binds the cell to model, the cell of the column at column_index in the row at
row_index.
unrealize
fn unrealize(self: &Self)
Releases the cell's model.
update_value
fn update_value(self: &Self)
Reads the value of the model again (UpdateValue).
on_model_property_changed
fn on_model_property_changed(self: &Self, property_name: &str)
A property of the model changed (OnModelPropertyChanged); property_name is the name
of the property, empty when all properties changed.
is_selected_property
fn is_selected_property() -> &'static DirectProperty<TreeDataGridCell, bool>
Defines the IsSelected property.
PSEUDO_CLASSES
const PSEUDO_CLASSES: PseudoClassesAttribute
The pseudoclasses set by the class.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
column_index
fn column_index(self: &Self) -> i32
The index of the cell's column, or -1 when the cell is not realized.
row_index
fn row_index(self: &Self) -> i32
The index of the cell's row, or -1 when the cell is not realized.
is_editing
fn is_editing(self: &Self) -> bool
Whether the cell is being edited.
model
fn model(self: &Self) -> Option<CellRef>
The cell model the cell is bound to.
is_selected
fn is_selected(self: &Self) -> bool
Whether the cell is selected.
is_effectively_selected
fn is_effectively_selected(self: &Self) -> bool
Whether the cell or its row is selected.
begin_edit
fn begin_edit(self: &Self)
Begins editing the cell.
cancel_edit
fn cancel_edit(self: &Self)
Ends editing the cell, discarding the edit.
end_edit
fn end_edit(self: &Self)
Ends editing the cell, committing the edit.
subscribe_to_model_changes
fn subscribe_to_model_changes(self: &Self)
Follows the property changes of the model (SubscribeToModelChanges).
unsubscribe_from_model_changes
fn unsubscribe_from_model_changes(self: &Self)
Stops following the property changes of the model (UnsubscribeFromModelChanges).
raise_cell_value_changed
fn raise_cell_value_changed(self: &Self)
Raises the control's CellValueChanged for the cell when it is realized and not being
edited (RaiseCellValueChanged).
update_row_index
fn update_row_index(self: &Self, index: i32)
The row of the realized cell changed (UpdateRowIndex).
update_selection
fn update_selection(self: &Self, selection: Option<&dyn ITreeDataGridSelectionInteraction>)
Updates the selection state of the cell (UpdateSelection).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTreeDataGridCellImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherTemplatedControlImplExtControlImplExtDerefUpcast<T>Upcast<TreeDataGridCell>StaticTypeObjectTypeSubclassable<T>InteractiveImplTemplatedControlImplFerroObjectImplStyledElementImplVisualImplLayoutableImplInputElementImplControlImplTreeDataGridCellImplINaturalWidthMeasureCacheITreeDataGridCell
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.