Struct titik::TabBox[][src]

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

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

     ╭──────╮──────┬──────╮
     │ tab1tab2tab2 │
  ┌──┘      └──────┴──────┴────────┐
  │                                │
  │                                │
  │                                │
  │                                │
  │                                │
  └────────────────────────────────┘

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 add_child_to_tab(
    &mut self,
    tab_index: usize,
    child: Box<dyn Widget<MSG>>
) -> bool
[src]

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)[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]

fn get_offset(&self) -> (f32, f32)[src]

the tab box has an offset of 2 from the top before drawing the child components

fn add_child(&mut self, child: Box<dyn Widget<MSG>>) -> bool[src]

add a child widget to the current active tab

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> Pointable for T

type Init = T

The type for initializers.

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.