pub trait Layout<Props: ?Sized>: DynClone {
// Required methods
fn get_props(&self) -> &Props;
fn stage<'a>(
&self,
area: PxRect,
limits: PxLimits,
window: &mut WindowState,
) -> Box<dyn Staged + 'a>;
}
Expand description
Represents an arbitrary layout node that hasn’t been staged yet. The vast majority of
the time, components should simply use the standard Node
implementation of this
trait, which handles most common layout cases. However, some components, like the text
component, have complex layout logic or special cases that Node
can’t cover.