[−][src]Struct orbtk_widgets::TabWidgetState
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]
fn default() -> TabWidgetState
[src]
impl State for TabWidgetState
[src]
fn init(&mut self, registry: &mut Registry, ctx: &mut Context<'_>)
[src]
fn update(&mut self, _: &mut Registry, ctx: &mut Context<'_>)
[src]
fn cleanup(&mut self, _registry: &mut Registry, _ctx: &mut Context<'_>)
[src]
fn update_post_layout(
&mut self,
_registry: &mut Registry,
_ctx: &mut Context<'_>
)
[src]
&mut self,
_registry: &mut Registry,
_ctx: &mut Context<'_>
)
Auto Trait Implementations
impl RefUnwindSafe for TabWidgetState
impl Send for TabWidgetState
impl Sync for TabWidgetState
impl Unpin for TabWidgetState
impl UnwindSafe for TabWidgetState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,