pub struct Tabs<'a> { /* private fields */ }Expand description
Tabs widget.
Implementations§
Source§impl<'a> Tabs<'a>
impl<'a> Tabs<'a>
Sourcepub fn new(tabs: impl IntoIterator<Item = Tab<'a>>) -> Self
pub fn new(tabs: impl IntoIterator<Item = Tab<'a>>) -> Self
Create tabs from an iterator.
Sourcepub fn active_style(self, style: Style) -> Self
pub fn active_style(self, style: Style) -> Self
Set active tab style.
Sourcepub fn close_active(&mut self, state: &mut TabsState) -> Option<Tab<'a>>
pub fn close_active(&mut self, state: &mut TabsState) -> Option<Tab<'a>>
Close the active tab if it is closable.
Sourcepub fn move_active_left(&mut self, state: &mut TabsState) -> bool
pub fn move_active_left(&mut self, state: &mut TabsState) -> bool
Move active tab one position to the left.
Sourcepub fn move_active_right(&mut self, state: &mut TabsState) -> bool
pub fn move_active_right(&mut self, state: &mut TabsState) -> bool
Move active tab one position to the right.
Trait Implementations§
Source§impl Accessible for Tabs<'_>
impl Accessible for Tabs<'_>
Source§fn accessibility_nodes(&self, area: Rect) -> Vec<A11yNodeInfo>
fn accessibility_nodes(&self, area: Rect) -> Vec<A11yNodeInfo>
Return accessibility node(s) for this widget at the given bounds. Read more
Source§impl StatefulWidget for Tabs<'_>
impl StatefulWidget for Tabs<'_>
Auto Trait Implementations§
impl<'a> Freeze for Tabs<'a>
impl<'a> RefUnwindSafe for Tabs<'a>
impl<'a> Send for Tabs<'a>
impl<'a> Sync for Tabs<'a>
impl<'a> Unpin for Tabs<'a>
impl<'a> UnsafeUnpin for Tabs<'a>
impl<'a> UnwindSafe for Tabs<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more