[][src]Trait unsegen::container::Layout

pub trait Layout<C: ContainerProvider> {
    fn space_demand(&self, containers: &C) -> Demand2D;
fn layout(
        &self,
        available_area: Rectangle,
        containers: &C
    ) -> LayoutOutput<C::Index>; }

A Layouter managing screen real estate for multiple containers

Required methods

fn space_demand(&self, containers: &C) -> Demand2D

Calculate the space demand required for all of the provided containers

fn layout(
    &self,
    available_area: Rectangle,
    containers: &C
) -> LayoutOutput<C::Index>

Specify how the provided containers should be layed out in the provided area, and how they should be separated by lines.

Note that the implementor is strictly required to enforce that returned windows and lines DO NOT INTERSECT!

Loading content...

Implementors

impl<'a, C: ContainerProvider> Layout<C> for HSplit<'a, C>[src]

impl<'a, C: ContainerProvider> Layout<C> for VSplit<'a, C>[src]

impl<C: ContainerProvider> Layout<C> for Leaf<C>[src]

Loading content...