pub struct Tabbed<'a> { /* private fields */ }Expand description
A tabbed widget.
This widget draws the tabs and handles events.
Use TabbedState::selected and TabbedState::widget_area to render the actual content of the tab.
Implementations§
source§impl<'a> Tabbed<'a>
impl<'a> Tabbed<'a>
pub fn new() -> Self
sourcepub fn placement(self, placement: TabPlacement) -> Self
pub fn placement(self, placement: TabPlacement) -> Self
Tab placement.
sourcepub fn tabs(self, tabs: impl IntoIterator<Item = impl Into<Line<'a>>>) -> Self
pub fn tabs(self, tabs: impl IntoIterator<Item = impl Into<Line<'a>>>) -> Self
Tab-text.
sourcepub fn closeable(self, closeable: bool) -> Self
pub fn closeable(self, closeable: bool) -> Self
Closeable tabs?
Renders a close symbol and reacts with TabbedOutcome::Close.
sourcepub fn styles(self, styles: TabbedStyle) -> Self
pub fn styles(self, styles: TabbedStyle) -> Self
Set combined styles.
sourcepub fn select_style(self, style: Style) -> Self
pub fn select_style(self, style: Style) -> Self
Style for the selected tab.
sourcepub fn focus_style(self, style: Style) -> Self
pub fn focus_style(self, style: Style) -> Self
Style for a focused tab.
Trait Implementations§
source§impl<'a> StatefulWidget for Tabbed<'a>
impl<'a> StatefulWidget for Tabbed<'a>
Auto Trait Implementations§
impl<'a> Freeze for Tabbed<'a>
impl<'a> RefUnwindSafe for Tabbed<'a>
impl<'a> Send for Tabbed<'a>
impl<'a> Sync for Tabbed<'a>
impl<'a> Unpin for Tabbed<'a>
impl<'a> UnwindSafe for Tabbed<'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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more