[−][src]Struct tui::widgets::Tabs
A widget to display available tabs in a multiple panels context.
Examples
Tabs::default() .block(Block::default().title("Tabs").borders(Borders::ALL)) .titles(&["Tab1", "Tab2", "Tab3", "Tab4"]) .style(Style::default().fg(Color::White)) .highlight_style(Style::default().fg(Color::Yellow)) .divider(DOT);
Methods
impl<'a, T> Tabs<'a, T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
pub fn block(self, block: Block<'a>) -> Tabs<'a, T>
[src]
pub fn titles(self, titles: &'a [T]) -> Tabs<'a, T>
[src]
pub fn select(self, selected: usize) -> Tabs<'a, T>
[src]
pub fn style(self, style: Style) -> Tabs<'a, T>
[src]
pub fn highlight_style(self, style: Style) -> Tabs<'a, T>
[src]
pub fn divider(self, divider: &'a str) -> Tabs<'a, T>
[src]
Trait Implementations
impl<'a, T> Widget for Tabs<'a, T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
fn draw(&mut self, area: Rect, buf: &mut Buffer)
[src]
fn background(&self, area: Rect, buf: &mut Buffer, color: Color)
[src]
fn render<B>(&mut self, f: &mut Frame<B>, area: Rect) where
Self: Sized,
B: Backend,
[src]
Self: Sized,
B: Backend,
impl<'a, T> Default for Tabs<'a, T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
Auto Trait Implementations
impl<'a, T> Send for Tabs<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Sync for Tabs<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for Tabs<'a, T>
impl<'a, T> UnwindSafe for Tabs<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> RefUnwindSafe for Tabs<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,