[][src]Trait miniquad::EventHandler

pub trait EventHandler {
    fn update(&mut self, _ctx: &mut Context);
fn draw(&mut self, _ctx: &mut Context); fn resize_event(&mut self, _ctx: &mut Context, _width: f32, _height: f32) { ... }
fn mouse_motion_event(
        &mut self,
        _ctx: &mut Context,
        _x: f32,
        _y: f32,
        _dx: f32,
        _dy: f32
    ) { ... }
fn mouse_wheel_event(&mut self, _ctx: &mut Context, _x: f32, _y: f32) { ... }
fn mouse_button_down_event(
        &mut self,
        _ctx: &mut Context,
        _button: MouseButton,
        _x: f32,
        _y: f32
    ) { ... }
fn mouse_button_up_event(
        &mut self,
        _ctx: &mut Context,
        _button: MouseButton,
        _x: f32,
        _y: f32
    ) { ... }
fn key_down_event(
        &mut self,
        _ctx: &mut Context,
        _keycode: KeyCode,
        _keymods: KeyMods,
        _repeat: bool
    ) { ... }
fn key_up_event(
        &mut self,
        _ctx: &mut Context,
        _keycode: KeyCode,
        _keymods: KeyMods
    ) { ... } }

Required methods

fn update(&mut self, _ctx: &mut Context)

fn draw(&mut self, _ctx: &mut Context)

Loading content...

Provided methods

fn resize_event(&mut self, _ctx: &mut Context, _width: f32, _height: f32)

fn mouse_motion_event(
    &mut self,
    _ctx: &mut Context,
    _x: f32,
    _y: f32,
    _dx: f32,
    _dy: f32
)

fn mouse_wheel_event(&mut self, _ctx: &mut Context, _x: f32, _y: f32)

fn mouse_button_down_event(
    &mut self,
    _ctx: &mut Context,
    _button: MouseButton,
    _x: f32,
    _y: f32
)

fn mouse_button_up_event(
    &mut self,
    _ctx: &mut Context,
    _button: MouseButton,
    _x: f32,
    _y: f32
)

fn key_down_event(
    &mut self,
    _ctx: &mut Context,
    _keycode: KeyCode,
    _keymods: KeyMods,
    _repeat: bool
)

fn key_up_event(
    &mut self,
    _ctx: &mut Context,
    _keycode: KeyCode,
    _keymods: KeyMods
)

Loading content...

Implementors

Loading content...