Controller

Trait Controller 

Source
pub trait Controller {
    // Required method
    fn handle_key(&mut self, ev: KeyEvent);

    // Provided methods
    fn handle_focus_gained(&mut self) { ... }
    fn handle_focus_lost(&mut self) { ... }
    fn handle_mouse(&mut self, ev: MouseEvent) { ... }
    fn handle_paste(&mut self, data: String) { ... }
    fn handle_resize(&mut self, x: u16, y: u16) { ... }
    fn should_quit(&self) -> bool { ... }
    fn on_tick(&mut self) { ... }
}

Required Methods§

Source

fn handle_key(&mut self, ev: KeyEvent)

Provided Methods§

Source

fn handle_focus_gained(&mut self)

Source

fn handle_focus_lost(&mut self)

Source

fn handle_mouse(&mut self, ev: MouseEvent)

Source

fn handle_paste(&mut self, data: String)

Source

fn handle_resize(&mut self, x: u16, y: u16)

Source

fn should_quit(&self) -> bool

Source

fn on_tick(&mut self)

Implementors§