[][src]Struct orbtk_widgets::TabWidgetState

pub struct TabWidgetState { /* fields omitted */ }

Through the TabWidgetState it is possible to control the behaviour of TabWidget. Nearly every called function on TabWidgetState will not be executed immediatly, but they are instead stored and executed during the update phase, in the same order they are submitted.

Implementations

impl TabWidgetState[src]

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

Switch the selected tab with one with the passed index. If the index is greater than the tab count, the last one will be selected.

pub fn select_by_body(&mut self, entity: Entity)[src]

Switch the selected tab with one with the passed body. If the no such body is found among the present tabs, nothing happen.

pub fn remove_by_body(&mut self, entity: Entity)[src]

Remove the tab with the passed body. If the no such body is found among the present tabs, nothing happen.

pub fn add_tab<T: Into<String>>(&mut self, header: T, body: Entity)[src]

Add a new tab to the widget.

pub fn set_close_button_visibility(&mut self, value: bool)[src]

Set the close button visibility of all the tabs.

pub fn get_close_button_visibility(&self) -> bool[src]

Get the close button visibility status

pub fn get_index(&self, tab_body: Entity) -> Option<usize>[src]

Get the tab index associated with the passed body. If it is not found, None is returned.

Trait Implementations

impl AsAny for TabWidgetState[src]

impl Default for TabWidgetState[src]

impl State for TabWidgetState[src]

Auto Trait Implementations

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<E> Component for E where
    E: Any
[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.