Trait input::ButtonEvent[][src]

pub trait ButtonEvent: Sized {
    fn from_button_args(args: ButtonArgs, old_event: &Self) -> Option<Self>;
fn button<U, F>(&self, f: F) -> Option<U>
    where
        F: FnMut(ButtonArgs) -> U
; fn button_args(&self) -> Option<ButtonArgs> { ... } }

Changed button state.

Required methods

fn from_button_args(args: ButtonArgs, old_event: &Self) -> Option<Self>[src]

Creates a button event.

Preserves time stamp from original input event, if any.

fn button<U, F>(&self, f: F) -> Option<U> where
    F: FnMut(ButtonArgs) -> U, 
[src]

Calls closure if this is a button event.

Loading content...

Provided methods

fn button_args(&self) -> Option<ButtonArgs>[src]

Returns button arguments.

Loading content...

Implementors

impl ButtonEvent for Event[src]

Loading content...