[][src]Trait orbtk::prelude::Layout

pub trait Layout: Any {
    fn measure(
        &self,
        render_context_2_d: &mut RenderContext2D,
        entity: Entity,
        ecm: &mut EntityComponentManager<Tree, StringComponentStore>,
        layouts: &BTreeMap<Entity, Box<dyn Layout + 'static>>,
        theme: &Theme
    ) -> DirtySize;
fn arrange(
        &self,
        render_context_2_d: &mut RenderContext2D,
        parent_size: (f64, f64),
        entity: Entity,
        ecm: &mut EntityComponentManager<Tree, StringComponentStore>,
        layouts: &BTreeMap<Entity, Box<dyn Layout + 'static>>,
        theme: &Theme
    ) -> (f64, f64); }

A layout is used to dynamic order the children of a widget.

Required methods

fn measure(
    &self,
    render_context_2_d: &mut RenderContext2D,
    entity: Entity,
    ecm: &mut EntityComponentManager<Tree, StringComponentStore>,
    layouts: &BTreeMap<Entity, Box<dyn Layout + 'static>>,
    theme: &Theme
) -> DirtySize

fn arrange(
    &self,
    render_context_2_d: &mut RenderContext2D,
    parent_size: (f64, f64),
    entity: Entity,
    ecm: &mut EntityComponentManager<Tree, StringComponentStore>,
    layouts: &BTreeMap<Entity, Box<dyn Layout + 'static>>,
    theme: &Theme
) -> (f64, f64)

Arranges and sizes the children.

Loading content...

Implementors

impl Layout for AbsoluteLayout[src]

impl Layout for FixedSizeLayout[src]

impl Layout for GridLayout[src]

impl Layout for PaddingLayout[src]

impl Layout for PopupLayout[src]

impl Layout for StackLayout[src]

impl Layout for TextSelectionLayout[src]

Loading content...