FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    fn new() -> Rc<Self>
    

    A factory with the default behaviour.

    Source

    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).

    Source

    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.

    Source

    recycle_element

    fn recycle_element(self: &Self, element: &Ref<Control>)
    

    Returns element to the pool of its recycle key.

    Source

    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.

    Source

    create_element

    fn create_element(self: &Self, data: &dyn Any) -> Ref<Control>
    

    Creates a new element for data through the factory's behaviour (CreateElement).

    Source

    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).

    Source

    get_element_recycle_key

    fn get_element_recycle_key(self: &Self, element: &Control) -> RecycleKey
    

    The recycle key of element (GetElementRecycleKey).

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • TreeModel
    • PartialEq
    • Default

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.