[][src]Struct titik::TabBox

pub struct TabBox<MSG> { /* fields omitted */ }

A Tab box contains multiple box which can only be shown one at a time

This example is not tested
     ╭──────╮──────┬──────╮
     │ tab1 │ tab2 │ tab2 │
  ┌──┘      └──────┴──────┴────────┐
  │                                │
  │                                │
  │                                │
  │                                │
  │                                │
  └────────────────────────────────┘

Implementations

impl<MSG> TabBox<MSG>[src]

pub fn new() -> Self[src]

creates a new tab box

pub fn clear_children(&mut self)[src]

remove all children of this flex_box

pub fn vertical(&mut self)[src]

set to vertical column direction

pub fn horizontal(&mut self)[src]

set to horizontal row direction

pub fn draw_labels(
    &self,
    buf: &mut Buffer,
    canvas: &mut Canvas,
    layout_tree: &LayoutTree
)
[src]

╭──────╮──────┬──────╮ │ tab1 │ tab2 │ tab2 │ └──────┴──────┴──────┴

pub fn set_tab_labels(&mut self, labels: Vec<String>)[src]

set the tab labels

pub fn set_active_tab(&mut self, index: usize)[src]

set the active tab index

Trait Implementations

impl<MSG: Debug> Debug for TabBox<MSG>[src]

impl<MSG> Widget<MSG> for TabBox<MSG> where
    MSG: Debug + 'static, 
[src]

Auto Trait Implementations

impl<MSG> !RefUnwindSafe for TabBox<MSG>

impl<MSG> !Send for TabBox<MSG>

impl<MSG> !Sync for TabBox<MSG>

impl<MSG> Unpin for TabBox<MSG>

impl<MSG> !UnwindSafe for TabBox<MSG>

Blanket Implementations

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

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

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

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

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

impl<T> SetParameter for T

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.