Trait tui::widgets::Widget[][src]

pub trait Widget {
    fn draw(&mut self, area: Rect, buf: &mut Buffer);

    fn background(&self, area: &Rect, buf: &mut Buffer, color: Color) { ... }
fn render<B>(&mut self, f: &mut Frame<B>, area: Rect)
    where
        Self: Sized,
        B: Backend
, { ... } }

Base requirements for a Widget

Required Methods

Draws the current state of the widget in the given buffer. That the only method required to implement a custom widget.

Provided Methods

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

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

Implementors