Struct cursive::views::KeyEventView [] [src]

pub struct KeyEventView {
    // some fields omitted
}

A simple wrapper view that catches some ignored event from its child.

If the event doesn't have a corresponding callback, it will stay ignored.

Examples

let view = KeyEventView::new(TextView::new("This view has an event!"))
                        .register('q', |s| s.quit())
                        .register(Key::Esc, |s| s.quit());

Methods

impl KeyEventView
[src]

Wraps the given view in a new KeyEventView.

Registers a callback when the given key is ignored by the child.

Trait Implementations

impl ViewWrapper for KeyEventView
[src]

Get an immutable reference to the wrapped view.

Get a mutable reference to the wrapped view.

Wraps the on_event method.

Wraps the draw method.

Wraps the get_min_size method.

Wraps the layout method.

Wraps the take_focus method.

Wraps the find method.

Wraps the needs_relayout method.