TreeDataGridCellsPresenter
struct · ferroui-controls-treedatagrid · v0.5.0
struct TreeDataGridCellsPresenter
Presents the cells of a TreeDataGridRow, realizing only the cells
of the columns in the viewport.
Members
TYPEto_refmeasure_elementelement_factory_propertyitems_propertyrows_propertyconstructnewpresenter_baseelement_factoryset_element_factoryitemsset_itemsrowsset_rowsrow_indexrealized_elementsis_layout_in_progressbring_into_viewget_realized_elementstry_get_elementrecycle_all_elementschild_index_changedrealizeunrealizeupdate_row_indexupdate_selectionunrealize_on_row_removedfinalize_unrealizeget_child_indextry_get_total_count
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<TreeDataGridCellsPresenter>
Returns a strong reference to this object.
measure_element
fn measure_element(self: &Self, index: i32, element: &Ref<Control>, available_size: Size) -> Size
Measures the cell of the column at index (MeasureElement): the measure of the
columnar presenters, which reports the size to the columns.
element_factory_property
fn element_factory_property() -> &'static DirectProperty<TreeDataGridCellsPresenter, Option<Rc<TreeDataGridElementFactory>>>
Defines the ElementFactory property.
items_property
fn items_property() -> &'static DirectProperty<TreeDataGridCellsPresenter, Option<Rc<dyn IColumns>>>
Defines the Items property: the columns.
rows_property
fn rows_property() -> &'static DirectProperty<TreeDataGridCellsPresenter, Option<Rc<dyn ITreeDataGridRows>>>
Defines the Rows property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
presenter_base
fn presenter_base(self: &Self) -> &TreeDataGridPresenterBase
The state of the presenter base.
element_factory
fn element_factory(self: &Self) -> Option<Rc<TreeDataGridElementFactory>>
The factory of the cells.
set_element_factory
fn set_element_factory(self: &Self, value: Option<Rc<TreeDataGridElementFactory>>)
items
fn items(self: &Self) -> Option<Rc<dyn IColumns>>
The columns whose cells the presenter shows.
set_items
fn set_items(self: &Self, value: Option<Rc<dyn IColumns>>)
rows
fn rows(self: &Self) -> Option<Rc<dyn ITreeDataGridRows>>
The rows that realize the cell models.
set_rows
fn set_rows(self: &Self, value: Option<Rc<dyn ITreeDataGridRows>>)
row_index
fn row_index(self: &Self) -> i32
The index of the row the presenter shows the cells of, or -1 when it is not realized.
realized_elements
fn realized_elements(self: &Self) -> Vec<Option<Ref<Control>>>
The realized cells, with an empty slot for each column of the realized range that has no
cell yet (RealizedElements).
is_layout_in_progress
fn is_layout_in_progress(self: &Self) -> bool
Whether the presenter is in its measure or arrange pass.
bring_into_view
fn bring_into_view(self: &Self, index: i32, rect: Option<Rect>) -> Option<Ref<Control>>
Brings the cell of the column at index into view (BringIntoView).
get_realized_elements
fn get_realized_elements(self: &Self) -> Vec<Ref<Control>>
The realized cells (GetRealizedElements).
try_get_element
fn try_get_element(self: &Self, index: i32) -> Option<Ref<Control>>
The realized cell of the column at index, if any (TryGetElement).
recycle_all_elements
fn recycle_all_elements(self: &Self)
Recycles all the realized cells (RecycleAllElements).
child_index_changed
fn child_index_changed(self: &Self, handler: impl Fn(&ChildIndexChangedEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
Occurs when the index of a realized cell changes (ChildIndexChanged). Disposing the
returned handle unsubscribes.
realize
fn realize(self: &Self, index: i32)
Realizes the presenter for the row at index.
unrealize
fn unrealize(self: &Self)
Unrealizes the presenter.
update_row_index
fn update_row_index(self: &Self, index: i32)
The index of the row changed (UpdateRowIndex).
update_selection
fn update_selection(self: &Self, selection: Option<&dyn ITreeDataGridSelectionInteraction>)
Updates the selection state of the realized cells (UpdateSelection).
unrealize_on_row_removed
fn unrealize_on_row_removed(self: &Self)
Unrealizes the presenter because its row was removed (UnrealizeOnRowRemoved).
finalize_unrealize
fn finalize_unrealize(self: &Self)
Recycles the cells kept for a rebind of the row when the row was not rebound
(FinalizeUnrealize).
get_child_index
fn get_child_index(self: &Self, child: &StyledElement) -> i32
The index of a cell (IChildIndexProvider.GetChildIndex).
try_get_total_count
fn try_get_total_count(self: &Self) -> Option<i32>
The number of columns (IChildIndexProvider.TryGetTotalCount).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTreeDataGridCellsPresenterImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherControlImplExtDerefUpcast<T>Upcast<TreeDataGridCellsPresenter>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleInteractiveImplInputElementImplControlImplFerroObjectImplStyledElementImplVisualImplLayoutableImplTreeDataGridCellsPresenterImplIFinalMeasureSelectorTreeDataGridPresenterHooks
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.