[−][src]Trait pugl_ui::layout::Layouter
A trait describing layouters in order to assign them to a
LayoutWidget
.
Associated Types
type Target
A type to describe the target where the Layouter
is supposed
to put the widget.
type Implementor: LayouterImpl
The actual layout performing type
Required methods
fn new_implementor() -> Box<dyn LayouterImpl>
Supposed to create a heap allocated instance of the
Implementor
type.
fn pack(
&mut self,
layout_impl: &mut Self::Implementor,
subnode_id: Id,
target: Self::Target
)
&mut self,
layout_impl: &mut Self::Implementor,
subnode_id: Id,
target: Self::Target
)
Supposed to register the widget subnode_id
fn expandable() -> (bool, bool)
Supposed to indicate if the layout is expandable
The return value is a tuple (bool, bool)
, the first for the
x-direction, the second for the y-direction
Implementors
impl Layouter for HorizontalLayouter
[src]
type Target = StackDirection
type Implementor = HorizontalLayouterImpl
fn new_implementor() -> Box<dyn LayouterImpl>
[src]
fn pack(
&mut self,
layout_impl: &mut Self::Implementor,
subnode_id: Id,
target: Self::Target
)
[src]
&mut self,
layout_impl: &mut Self::Implementor,
subnode_id: Id,
target: Self::Target
)
fn expandable() -> (bool, bool)
[src]
impl Layouter for VerticalLayouter
[src]
type Target = StackDirection
type Implementor = VerticalLayouterImpl
fn new_implementor() -> Box<dyn LayouterImpl>
[src]
fn pack(
&mut self,
layout_impl: &mut Self::Implementor,
subnode_id: Id,
target: Self::Target
)
[src]
&mut self,
layout_impl: &mut Self::Implementor,
subnode_id: Id,
target: Self::Target
)