FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TreeDataGridPresenterBase

    struct · ferroui-controls-treedatagrid · v0.5.0

    struct TreeDataGridPresenterBase
    

    The state of the reference's TreeDataGridPresenterBase<TItem>.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    element_factory

    fn element_factory(self: &Self) -> Option<Rc<TreeDataGridElementFactory>>
    

    The element factory (ElementFactory).

    Source

    realized_elements

    fn realized_elements(self: &Self) -> Vec<Option<Ref<Control>>>
    

    The realized elements, with an empty slot for each item of the realized range that has no element yet (RealizedElements).

    Source

    realized_element_count

    fn realized_element_count(self: &Self) -> usize
    

    The number of realized elements, empty slots included.

    Source

    is_in_layout

    fn is_in_layout(self: &Self) -> bool
    

    Whether the presenter is in its measure or arrange pass (IsInLayout).

    Source

    is_layout_in_progress

    fn is_layout_in_progress(self: &Self) -> bool
    

    Whether the presenter is in its measure or arrange pass (IsLayoutInProgress).

    Source

    viewport

    fn viewport(self: &Self) -> Rect
    

    The effective viewport of the presenter, intersected with its bounds (Viewport).

    Source

    start_u

    fn start_u(self: &Self) -> f64
    

    Gets the position of the first realized element on the primary axis (StartU).

    Source

    first_index

    fn first_index(self: &Self) -> i32
    

    The index of the first realized element (FirstIndex).

    Source

    bring_into_view

    fn bring_into_view<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H, index: i32, rect: Option<Rect>) -> Option<Ref<Control>>
    

    Brings the item at index into view, realizing its element if needed (BringIntoView). rect is the area of the element to bring into view. Returns the element, or None when the item cannot be brought into view.

    Source

    get_realized_elements

    fn get_realized_elements(self: &Self) -> Vec<Ref<Control>>
    

    The realized elements (GetRealizedElements).

    Source

    try_get_element

    fn try_get_element(self: &Self, index: i32) -> Option<Ref<Control>>
    

    The realized element of the item at index, if any (TryGetElement).

    Source

    recycle_all_elements

    fn recycle_all_elements<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H, preserve_visual_tree_membership: bool, preserve_logical_tree_membership: bool)
    

    Recycles all the realized elements (RecycleAllElements).

    Source

    recycle_all_elements_on_item_removed

    fn recycle_all_elements_on_item_removed<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H, preserve_visual_tree_membership: bool, preserve_logical_tree_membership: bool)
    

    Recycles all the realized elements as if their items were removed (RecycleAllElementsOnItemRemoved).

    Source

    default_measure_element

    fn default_measure_element(element: &Control, available_size: Size) -> Size
    

    The base MeasureElement.

    Optimization: skips the measure if the element was already measured with the same constraint and its measure is still valid. This significantly improves reattachment performance.

    Source

    get_element_from_factory_for

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

    The base GetElementFromFactory(object data, int index, Control parent): the element of the element factory for data, preferring one recycled from parent.

    Source

    default_get_or_estimate_anchor_element_for_viewport

    fn default_get_or_estimate_anchor_element_for_viewport(self: &Self, viewport_start: f64, viewport_end: f64, item_count: i32) -> (i32, f64)
    

    The base GetOrEstimateAnchorElementForViewport.

    Source

    default_estimate_element_size_u

    fn default_estimate_element_size_u(self: &Self) -> f64
    

    The base EstimateElementSizeU.

    Source

    default_on_effective_viewport_changed

    fn default_on_effective_viewport_changed<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H, e: &EffectiveViewportChangedEventArgs)
    

    The base OnEffectiveViewportChanged.

    Source

    is_viewport_covered_by_realized_elements

    fn is_viewport_covered_by_realized_elements(self: &Self, orientation: Orientation, viewport: Rect) -> bool
    

    Whether the realized elements cover viewport on the primary axis (IsViewportCoveredByRealizedElements).

    Source

    measure_override

    fn measure_override<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H, available_size: Size) -> Size
    

    The base MeasureOverride.

    Source

    arrange_override

    fn arrange_override<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H, final_size: Size) -> Size
    

    The base ArrangeOverride.

    Source

    on_attached_to_visual_tree

    fn on_attached_to_visual_tree<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H)
    

    The base OnAttachedToVisualTree, after the parent class's.

    Source

    on_detached_from_visual_tree

    fn on_detached_from_visual_tree<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H)
    

    The base OnDetachedFromVisualTree, after the parent class's.

    Source

    on_detached_from_logical_tree

    fn on_detached_from_logical_tree<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H)
    

    The base OnDetachedFromLogicalTree, after the parent class's.

    Source

    subscribe_to_item_changes

    fn subscribe_to_item_changes<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H)
    

    Subscribes to the changes of the presenter's items, if they notify and the presenter is not subscribed yet (SubscribeToItemChanges).

    Source

    unsubscribe_from_item_changes

    fn unsubscribe_from_item_changes<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H)
    

    Removes the subscription to the changes of the presenter's items (UnsubscribeFromItemChanges). Called before the items are replaced, while the presenter still holds the items it subscribed to.

    Source

    on_items_collection_changed

    fn on_items_collection_changed<H: TreeDataGridPresenterHooks>(self: &Self, hooks: &H, e: &PresenterItemsChange)
    

    Handles a change of the items (OnItemsCollectionChanged); a presenter also calls it with a reset when its items are replaced.

    Source

    Trait implementations

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

    Availability

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