Struct tui::widgets::Gauge
[−]
[src]
pub struct Gauge<'a> { /* fields omitted */ }
A widget to display a task progress.
Examples:
Gauge::default() .block(Block::default().borders(Borders::ALL).title("Progress")) .style(Style::default().fg(Color::White).bg(Color::Black).modifier(Modifier::Italic)) .percent(20);
Methods
impl<'a> Gauge<'a>
[src]
fn block(&mut self, block: Block<'a>) -> &mut Gauge<'a>
[src]
fn percent(&mut self, percent: u16) -> &mut Gauge<'a>
[src]
fn label(&mut self, string: &'a str) -> &mut Gauge<'a>
[src]
fn style(&mut self, style: Style) -> &mut Gauge<'a>
[src]
Trait Implementations
impl<'a> Default for Gauge<'a>
[src]
impl<'a> Widget for Gauge<'a>
[src]
fn draw(&mut self, area: &Rect, buf: &mut Buffer)
[src]
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]
Helper method to quickly set the background of all cells inside the specified area.
fn render<B>(&mut self, t: &mut Terminal<B>, area: &Rect) where
Self: Sized,
B: Backend,
[src]
Self: Sized,
B: Backend,
Helper method that can be chained with a widget's builder methods to render it.