FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    LayoutableImpl

    trait · ferroui-base · v0.5.0

    trait LayoutableImpl: VisualImpl + $crate::Upcast<Layoutable>
    

    The overridable members introduced by the class.

    View source

    Members

    apply_template

    fn apply_template(this: &Self)
    

    Creates the visual children of the control, if necessary.

    Source

    measure_core

    fn measure_core(this: &Self, available_size: Size) -> Size
    

    The default implementation of the control's measure pass.

    This calculates the desired size taking into account the control's margin and min/max/explicit size, and calls measure_override for the content. Usually measure_override is what you want to override.

    Source

    measure_override

    fn measure_override(this: &Self, available_size: Size) -> Size
    

    Measures the control and its child elements as part of a layout pass. Returns the size the control would like to be.

    Source

    measure_hold_override

    fn measure_hold_override(this: &Self, constraint: Size) -> Option<crate::layout::MeasureHold>
    

    The range of constraints, around the one measure_override was just given, over which it returns the same size and leaves the descendants as they are, or None (the default) when only that constraint is known to. An addition (desktop-performance.md section 9.15): an element is not measured again at an available size inside the hold.

    Source

    arrange_core

    fn arrange_core(this: &Self, final_rect: Rect)
    

    The default implementation of the control's arrange pass.

    This calculates the final bounds taking into account the control's margin, alignment and size constraints, and calls arrange_override for the content. Usually arrange_override is what you want to override.

    Source

    arrange_override

    fn arrange_override(this: &Self, final_size: Size) -> Size
    

    Positions child elements as part of a layout pass. Returns the size used.

    Source

    on_measure_invalidated

    fn on_measure_invalidated(this: &Self)
    

    Called by invalidate_measure.

    Source

    Trait implementations

    Availability

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