Struct cursive::view::KeyEventView
[−]
[src]
pub struct KeyEventView { // some fields omitted }
A simple wrapper view that catches some ignored event from its child.
Events ignored by its child without a callback will stay ignored.
Methods
impl KeyEventView
[src]
fn new<V: View + 'static>(view: V) -> Self
Wraps the given view in a new KeyEventView.
fn register<F, E: ToEvent>(self, event: E, cb: F) -> Self where F: Fn(&mut Cursive) + 'static
Registers a callback when the given key is ignored by the child.
Trait Implementations
impl ViewWrapper for KeyEventView
[src]
fn get_view(&self) -> &View
Get an immutable reference to the wrapped view, so that we can forward some calls to it.
fn get_view_mut(&mut self) -> &mut View
Get a mutable reference to the wrapped view, for the mutable methods.
fn wrap_on_event(&mut self, event: Event) -> EventResult
Wraps the on_event method.
fn wrap_draw(&mut self, printer: &Printer)
Wraps the draw method.
fn wrap_get_min_size(&self, req: SizeRequest) -> Vec2
Wraps the get_min_size method.
fn wrap_layout(&mut self, size: Vec2)
Wraps the layout method
fn wrap_take_focus(&mut self) -> bool
Wraps the take_focus method