Struct tui::widgets::Clear [−][src]
pub struct Clear;
A widget to to clear/reset a certain area to allow overdrawing (e.g. for popups)
Examples
fn draw_on_clear<B: Backend>(f: &mut Frame<B>, area: Rect) { let block = Block::default().title("Block").borders(Borders::ALL); f.render_widget(Clear, area); // <- this will clear/reset the area first f.render_widget(block, area); // now render the block widget }
Popup Example
For a more complete example how to utilize Clear
to realize popups see
the example examples/popup.rs
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Clear
impl RefUnwindSafe for Clear
impl UnwindSafe for Clear
impl UnwindSafe for Clear