TreeDataGridRowsPresenter
struct · ferroui-controls-treedatagrid · v0.5.0
struct TreeDataGridRowsPresenter
Presents the rows of a TreeDataGrid, realizing only the rows in (and
around, see cache_length) the viewport.
Members
TYPEto_refcache_length_propertycolumns_propertyelement_factory_propertyitems_propertyconstructnewpresenter_basecolumnsset_columnscache_lengthset_cache_lengthelement_factoryset_element_factoryitemsset_itemsrealized_elementsviewportis_layout_in_progressbring_into_viewget_realized_elementstry_get_elementrecycle_all_elementschild_index_changedupdate_selectionget_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<TreeDataGridRowsPresenter>
Returns a strong reference to this object.
cache_length_property
fn cache_length_property() -> &'static StyledProperty<f64>
Defines the CacheLength property.
columns_property
fn columns_property() -> &'static DirectProperty<TreeDataGridRowsPresenter, Option<Rc<dyn IColumns>>>
Defines the Columns property.
element_factory_property
fn element_factory_property() -> &'static DirectProperty<TreeDataGridRowsPresenter, Option<Rc<TreeDataGridElementFactory>>>
Defines the ElementFactory property.
items_property
fn items_property() -> &'static DirectProperty<TreeDataGridRowsPresenter, Option<Rc<dyn ITreeDataGridRows>>>
Defines the Items 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.
columns
fn columns(self: &Self) -> Option<Rc<dyn IColumns>>
The columns of the rows.
set_columns
fn set_columns(self: &Self, value: Option<Rc<dyn IColumns>>)
cache_length
fn cache_length(self: &Self) -> f64
Gets or sets the additional row realization space before and after the viewport, expressed as a multiple of the viewport height.
set_cache_length
fn set_cache_length(self: &Self, value: f64)
element_factory
fn element_factory(self: &Self) -> Option<Rc<TreeDataGridElementFactory>>
The factory of the rows and cells.
set_element_factory
fn set_element_factory(self: &Self, value: Option<Rc<TreeDataGridElementFactory>>)
items
fn items(self: &Self) -> Option<Rc<dyn ITreeDataGridRows>>
The rows the presenter shows.
set_items
fn set_items(self: &Self, value: Option<Rc<dyn ITreeDataGridRows>>)
realized_elements
fn realized_elements(self: &Self) -> Vec<Option<Ref<Control>>>
The realized rows, with an empty slot for each row of the realized range that has no
element yet (RealizedElements).
viewport
fn viewport(self: &Self) -> Rect
The effective viewport of the presenter (Viewport).
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 row at index into view (BringIntoView).
get_realized_elements
fn get_realized_elements(self: &Self) -> Vec<Ref<Control>>
The realized rows (GetRealizedElements).
try_get_element
fn try_get_element(self: &Self, index: i32) -> Option<Ref<Control>>
The realized row at index, if any (TryGetElement).
recycle_all_elements
fn recycle_all_elements(self: &Self)
Recycles all the realized rows (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 row changes (ChildIndexChanged). Disposing the
returned handle unsubscribes.
update_selection
fn update_selection(self: &Self, selection: Option<&dyn ITreeDataGridSelectionInteraction>)
Updates the selection state of the realized rows (UpdateSelection).
get_child_index
fn get_child_index(self: &Self, child: &StyledElement) -> i32
The index of a row (IChildIndexProvider.GetChildIndex).
try_get_total_count
fn try_get_total_count(self: &Self) -> Option<i32>
The number of rows (IChildIndexProvider.TryGetTotalCount).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherControlImplExtDerefUpcast<T>Upcast<TreeDataGridRowsPresenter>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleInteractiveImplInputElementImplControlImplFerroObjectImplStyledElementImplVisualImplLayoutableImplTreeDataGridPresenterHooks
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.