pub trait WindowLayout {
// Provided methods
fn alignment(&self) -> (HorizontalAlignment, VerticalAlignment) { ... }
fn desired_size_pre_hook(&mut self, available_size: TPoint) { ... }
fn desired_size(&self, available_size: TPoint) -> TPoint { ... }
fn margin(&self) -> Thickness { ... }
fn border(&self) -> BorderStyle { ... }
fn is_visible(&self) -> bool { ... }
}Expand description
Properties which define how the window is drawn
Provided Methods§
Sourcefn alignment(&self) -> (HorizontalAlignment, VerticalAlignment)
fn alignment(&self) -> (HorizontalAlignment, VerticalAlignment)
Sourcefn desired_size_pre_hook(&mut self, available_size: TPoint)
fn desired_size_pre_hook(&mut self, available_size: TPoint)
This is similar to desired_size but will not return anything and can mutably change self This is executed before WindowLayout::desired_size Only implement if actually necessary
Sourcefn desired_size(&self, available_size: TPoint) -> TPoint
fn desired_size(&self, available_size: TPoint) -> TPoint
Parents call this to get the desired size of the child
This must not exceed available_size on any axis
When the result’s product is equal to 0, this window wont be drawn
fn margin(&self) -> Thickness
fn border(&self) -> BorderStyle
fn is_visible(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".