Struct unsegen::container::HSplit[][src]

pub struct HSplit<'a, C: ContainerProvider> { /* fields omitted */ }
Expand description

A Layout laying out all children horizontally, separated by vertical lines.

Implementations

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

pub fn new(elms: Vec<(Box<dyn Layout<C> + 'a>, f64)>) -> Self[src]

Create a HSplit from its children, each with a specified weight that is used to distribute available (horizontal) space.

The order of children defines the drawing order from left to right.

Trait Implementations

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

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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

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

Calculate the space demand required for all of the provided containers

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

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

Auto Trait Implementations

impl<'a, C> !RefUnwindSafe for HSplit<'a, C>

impl<'a, C> !Send for HSplit<'a, C>

impl<'a, C> !Sync for HSplit<'a, C>

impl<'a, C> Unpin for HSplit<'a, C>

impl<'a, C> !UnwindSafe for HSplit<'a, C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.