TreeDataGridElementFactory
struct · ferroui-controls-treedatagrid · v0.5.0
struct TreeDataGridElementFactory
Creates the elements of the presenters and keeps the recycled ones, by recycle key and by the parent they were recycled from.
Members
newwith_implget_or_create_elementrecycle_elementcan_reuse_elementcreate_elementget_data_recycle_keyget_element_recycle_keydefault_create_elementdefault_data_recycle_keydefault_element_recycle_key
new
fn new() -> Rc<Self>
A factory with the default behaviour.
with_impl
fn with_impl(behavior: impl TreeDataGridElementFactoryImpl + 'static) -> Rc<Self>
A factory whose overridable members are those of behavior (a subclass of the reference's
factory).
get_or_create_element
fn get_or_create_element(self: &Self, data: &dyn Any, parent: &Control) -> Ref<Control>
Gets a recycled element for data, preferring one recycled from parent, or creates one.
recycle_element
fn recycle_element(self: &Self, element: &Ref<Control>)
Returns element to the pool of its recycle key.
can_reuse_element
fn can_reuse_element(self: &Self, element: &Control, data: &dyn Any) -> bool
Determines whether an existing element can be reused for the supplied data without returning it to this factory's recycle pool.
This is useful for controls which retain a realized child in the visual tree while changing its model, avoiding a detach and subsequent style reapplication.
create_element
fn create_element(self: &Self, data: &dyn Any) -> Ref<Control>
Creates a new element for data through the factory's behaviour (CreateElement).
get_data_recycle_key
fn get_data_recycle_key(self: &Self, data: &dyn Any) -> RecycleKey
The recycle key of the element that shows data (GetDataRecycleKey).
get_element_recycle_key
fn get_element_recycle_key(self: &Self, element: &Control) -> RecycleKey
The recycle key of element (GetElementRecycleKey).
default_create_element
fn default_create_element(self: &Self, data: &dyn Any) -> Ref<Control>
The factory's own CreateElement: the control for a check box cell, a template cell, an
expander cell, any other cell, a column header or a row.
default_data_recycle_key
fn default_data_recycle_key(self: &Self, data: &dyn Any) -> RecycleKey
The factory's own GetDataRecycleKey: the full name of the type of the element
default_create_element creates for data.
default_element_recycle_key
fn default_element_recycle_key(self: &Self, element: &Control) -> RecycleKey
The factory's own GetElementRecycleKey: the full name of the element's type.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherTreeModelPartialEqDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.