LayoutableImpl
trait · ferroui-base · v0.5.0
trait LayoutableImpl: VisualImpl + $crate::Upcast<Layoutable>
The overridable members introduced by the class.
Members
apply_templatemeasure_coremeasure_overridemeasure_hold_overridearrange_corearrange_overrideon_measure_invalidated
apply_template
fn apply_template(this: &Self)
Creates the visual children of the control, if necessary.
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.
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.
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.
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.
arrange_override
fn arrange_override(this: &Self, final_size: Size) -> Size
Positions child elements as part of a layout pass. Returns the size used.
on_measure_invalidated
fn on_measure_invalidated(this: &Self)
Called by invalidate_measure.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.