FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TreeDataGridPresenterHooks

    trait · ferroui-controls-treedatagrid · v0.5.0

    trait TreeDataGridPresenterHooks: ObjectType + Upcast<ferroui_controls::Control> + 'static
    

    The abstract and virtual members of the reference's presenter base, implemented by each presenter class. The defaults are the base implementations.

    View source

    Members

    Item

    type Item: Clone + 'static
    

    The type of the items the presenter shows.

    Source

    presenter_base

    fn presenter_base(self: &Self) -> &TreeDataGridPresenterBase
    

    The state of the base.

    Source

    presenter_control

    fn presenter_control(self: &Self) -> &Control
    

    The presenter as a control.

    Source

    orientation

    fn orientation(self: &Self) -> Orientation
    

    The axis along which the items are laid out.

    Source

    item_count

    fn item_count(self: &Self) -> Option<usize>
    

    The number of items, or None when the presenter has no items (Items is null).

    Source

    item_at

    fn item_at(self: &Self, index: usize) -> <Self as >::Item
    

    The item at index.

    Source

    subscribe_to_items

    fn subscribe_to_items(self: &Self, handler: Rc<dyn Fn(&PresenterItemsChange) -> ()>) -> Option<u64>
    

    Subscribes to the changes of the items; None when the items do not notify.

    Source

    unsubscribe_from_items

    fn unsubscribe_from_items(self: &Self, token: u64)
    

    Removes a subscription of subscribe_to_items.

    Source

    realize_element

    fn realize_element(self: &Self, element: &Ref<Control>, item: &<Self as >::Item, index: i32)
    

    Prepares element to show item, at index (RealizeElement).

    Source

    update_element_index

    fn update_element_index(self: &Self, element: &Ref<Control>, old_index: i32, new_index: i32)
    

    The index of a realized element changed (UpdateElementIndex).

    Source

    unrealize_element

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

    Clears element before it is recycled (UnrealizeElement).

    Source

    unrealize_element_on_item_removed

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

    Clears element before it is recycled because its item was removed (UnrealizeElementOnItemRemoved).

    Source

    finalize_recycled_element

    fn finalize_recycled_element(self: &Self, _element: &Ref<Control>)
    

    Releases what a recycled element retained when it is no longer needed for a quick reuse (FinalizeRecycledElement).

    Source

    arrange_element

    fn arrange_element(self: &Self, _index: i32, element: &Ref<Control>, rect: Rect) -> Rect
    

    Arranges element (ArrangeElement); returns the rect it was arranged in.

    Source

    measure_element

    fn measure_element(self: &Self, _index: i32, element: &Ref<Control>, available_size: Size) -> Size
    

    Measures element (MeasureElement); returns its size.

    Source

    get_initial_constraint

    fn get_initial_constraint(self: &Self, _element: &Ref<Control>, _index: i32, available_size: Size) -> Size
    

    Gets the initial constraint for the first pass of the two-pass measure (GetInitialConstraint).

    The measure pass is split into two parts:

    • The initial pass is used to determine the "natural" size of the elements. In this pass, infinity can be used as the measure constraint if the element has no other constraints on its size.
    • The final pass is made once the "natural" sizes of the elements are known and any layout logic has been run. This pass is needed because controls should not be arranged with a size less than that passed as the constraint during the measure pass. This pass is only run if needs_final_measure_pass returns true.

    Source

    needs_final_measure_pass

    fn needs_final_measure_pass(self: &Self, _first_index: i32, _elements: &[Option<Ref<Control>>]) -> bool
    

    Called when the initial pass of the two-pass measure has been completed, in order to determine whether a final measure pass is necessary (NeedsFinalMeasurePass). first_index is the index of the first element in elements.

    Source

    get_final_constraint

    fn get_final_constraint(self: &Self, element: &Ref<Control>, _index: i32, _available_size: Size) -> Size
    

    Gets the final constraint for the second pass of the two-pass measure (GetFinalConstraint).

    Source

    get_element_from_factory

    fn get_element_from_factory(self: &Self, item: &<Self as >::Item, _index: i32) -> Ref<Control>
    

    Gets the element that shows item from the element factory (GetElementFromFactory).

    Source

    get_element_at

    fn get_element_at(self: &Self, _position: f64) -> (i32, f64)
    

    The index and position of the element at position (GetElementAt).

    Source

    get_element_position

    fn get_element_position(self: &Self, _index: i32) -> f64
    

    The position of the element at index (GetElementPosition).

    Source

    calculate_size_u

    fn calculate_size_u(self: &Self, _available_size: Size) -> f64
    

    The estimated size of all the items on the primary axis (CalculateSizeU).

    Source

    get_or_estimate_anchor_element_for_viewport

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

    The anchor element from which realization starts (GetOrEstimateAnchorElementForViewport).

    Source

    estimate_element_size_u

    fn estimate_element_size_u(self: &Self) -> f64
    

    The estimated size of an element on the primary axis (EstimateElementSizeU).

    Source

    get_parent_presenter_viewport

    fn get_parent_presenter_viewport(self: &Self) -> Option<Rect>
    

    The viewport of the parent presenter, if the presenter is nested in one (GetParentPresenterViewPort).

    Source

    get_measure_viewport

    fn get_measure_viewport(self: &Self, viewport: Rect) -> Rect
    

    The viewport realization fills, from the effective viewport (GetMeasureViewport).

    Source

    needs_measure_for_viewport_change

    fn needs_measure_for_viewport_change(self: &Self, _measure_viewport: Rect, _viewport: Rect) -> bool
    

    Whether a change of the effective viewport needs a new measure (NeedsMeasureForViewportChange).

    Source

    on_effective_viewport_changed

    fn on_effective_viewport_changed(self: &Self, e: &EffectiveViewportChangedEventArgs)
    

    Called when the effective viewport of the presenter changes (OnEffectiveViewportChanged).

    Source

    as_final_measure_selector

    fn as_final_measure_selector(self: &Self) -> Option<&dyn IFinalMeasureSelector>
    

    The presenter as a selector of the elements of the final measure pass (this is IFinalMeasureSelector).

    Source

    trace_enabled

    fn trace_enabled(self: &Self) -> bool
    

    Whether the diagnostic trace of the presenter is written (the rows presenter's).

    Source

    Trait implementations

    Availability

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