[][src]Struct tuikit::container::HSplit

pub struct HSplit<'a> { /* fields omitted */ }

HSplit will split the area horizontally. It will

  1. Count the total width(basis) of the split items it contains
  2. Judge if the current width is enough or not for the split items
  3. shrink/grow the split items according to their factors / (total factors)
  4. If still not enough room, the last one(s) would be set width 0

Methods

impl<'a> HSplit<'a>[src]

pub fn split(self, split: impl Split + 'a) -> Self[src]

pub fn basis(self, basis: impl Into<Size>) -> Self[src]

pub fn grow(self, grow: usize) -> Self[src]

pub fn shrink(self, shrink: usize) -> Self[src]

Trait Implementations

impl<'a> Split for HSplit<'a>[src]

fn inner_size(&self) -> (Size, Size)[src]

get the default size of inner content, will be used if basis is Default

impl<'a> Draw for HSplit<'a>[src]

impl<'a> Default for HSplit<'a>[src]

Auto Trait Implementations

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

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

Blanket Implementations

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

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

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.

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.

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

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

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