[][src]Struct tui::widgets::Tabs

pub struct Tabs<'a, T> where
    T: AsRef<str> + 'a, 
{ /* fields omitted */ }

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]

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]

fn background(&self, area: Rect, buf: &mut Buffer, color: Color)[src]

Helper method to quickly set the background of all cells inside the specified area.

fn render<B>(&mut self, f: &mut Frame<B>, area: Rect) where
    Self: Sized,
    B: Backend
[src]

Helper method that can be chained with a widget's builder methods to render it.

impl<'a, T> Default for Tabs<'a, T> where
    T: AsRef<str>, 
[src]

Auto Trait Implementations

impl<'a, T> Send for Tabs<'a, T> where
    T: Sync

impl<'a, T> Sync for Tabs<'a, T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]