[][src]Struct tui::widgets::Clear

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

impl Clone for Clear[src]

impl Debug for Clear[src]

impl Widget for Clear[src]

Auto Trait Implementations

impl RefUnwindSafe for Clear

impl Send for Clear

impl Sync for Clear

impl Unpin for Clear

impl UnwindSafe for Clear

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.