Struct tui::widgets::Tabs [−][src]
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));
Methods
impl<'a, T> Tabs<'a, T> where
T: AsRef<str>,
[src]
impl<'a, T> Tabs<'a, T> where
T: AsRef<str>,
pub fn block(self, block: Block<'a>) -> Tabs<'a, T>
[src]
pub fn block(self, block: Block<'a>) -> Tabs<'a, T>
pub fn titles(self, titles: &'a [T]) -> Tabs<'a, T>
[src]
pub fn titles(self, titles: &'a [T]) -> Tabs<'a, T>
pub fn select(self, selected: usize) -> Tabs<'a, T>
[src]
pub fn select(self, selected: usize) -> Tabs<'a, T>
pub fn style(self, style: Style) -> Tabs<'a, T>
[src]
pub fn style(self, style: Style) -> Tabs<'a, T>
pub fn highlight_style(self, style: Style) -> Tabs<'a, T>
[src]
pub fn highlight_style(self, style: Style) -> Tabs<'a, T>
Trait Implementations
impl<'a, T> Default for Tabs<'a, T> where
T: AsRef<str>,
[src]
impl<'a, T> Default for Tabs<'a, T> where
T: AsRef<str>,
impl<'a, T> Widget for Tabs<'a, T> where
T: AsRef<str>,
[src]
impl<'a, T> Widget for Tabs<'a, T> where
T: AsRef<str>,
fn draw(&mut self, area: Rect, buf: &mut Buffer)
[src]
fn draw(&mut self, area: Rect, buf: &mut Buffer)
Draws the current state of the widget in the given buffer. That the only method required to implement a custom widget. Read more
fn background(&self, area: &Rect, buf: &mut Buffer, color: Color)
[src]
fn background(&self, area: &Rect, buf: &mut Buffer, color: Color)
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]
fn render<B>(&mut self, f: &mut Frame<B>, area: Rect) where
Self: Sized,
B: Backend,
Helper method that can be chained with a widget's builder methods to render it.