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,
{ ... }
}
Expand description
Base requirements for a Widget
Required Methods§
Provided Methods§
sourcefn background(&self, area: &Rect, buf: &mut Buffer, color: Color)
fn background(&self, area: &Rect, buf: &mut Buffer, color: Color)
Helper method to quickly set the background of all cells inside the specified area.