Trait event::MouseScrollEvent [−] [src]

pub trait MouseScrollEvent {
    fn from_xy(x: f64, y: f64, old_event: &Self) -> Option<Self>;
    fn mouse_scroll<U, F>(&self, f: F) -> Option<U> where F: FnMut(f64, f64) -> U;

    fn mouse_scroll_args(&self) -> Option<[f64; 2]> { ... }
}

The scroll of the mouse wheel

Required Methods

fn from_xy(x: f64, y: f64, old_event: &Self) -> Option<Self>

Creates a mouse scroll event.

fn mouse_scroll<U, F>(&self, f: F) -> Option<U> where F: FnMut(f64, f64) -> U

Calls a closure if this is a mouse scroll event.

Provided Methods

fn mouse_scroll_args(&self) -> Option<[f64; 2]>

Returns mouse scroll arguments.

Implementors