pub trait LayoutableImpl: VisualImpl + Upcast<Layoutable> {
// Provided methods
fn apply_template(this: &Self) { ... }
fn measure_core(this: &Self, available_size: Size) -> Size { ... }
fn measure_override(this: &Self, available_size: Size) -> Size { ... }
fn arrange_core(this: &Self, final_rect: Rect) { ... }
fn arrange_override(this: &Self, final_size: Size) -> Size { ... }
fn on_measure_invalidated(this: &Self) { ... }
}Expand description
The overridable members introduced by the class.
Provided Methods§
Sourcefn apply_template(this: &Self)
fn apply_template(this: &Self)
Creates the visual children of the control, if necessary.
Sourcefn measure_core(this: &Self, available_size: Size) -> Size
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.
Sourcefn measure_override(this: &Self, available_size: Size) -> Size
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.
Sourcefn arrange_core(this: &Self, final_rect: Rect)
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.
Sourcefn arrange_override(this: &Self, final_size: Size) -> Size
fn arrange_override(this: &Self, final_size: Size) -> Size
Positions child elements as part of a layout pass. Returns the size used.
Sourcefn on_measure_invalidated(this: &Self)
fn on_measure_invalidated(this: &Self)
Called by invalidate_measure.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".