MouseScrollEvent

Trait MouseScrollEvent 

Source
pub trait MouseScrollEvent: Sized {
    // Required methods
    fn from_pos(pos: [f64; 2], old_event: &Self) -> Option<Self>;
    fn mouse_scroll<U, F>(&self, f: F) -> Option<U>
       where F: FnMut([f64; 2]) -> U;

    // Provided method
    fn mouse_scroll_args(&self) -> Option<[f64; 2]> { ... }
}
Expand description

The scroll of the mouse wheel.

Required Methods§

Source

fn from_pos(pos: [f64; 2], old_event: &Self) -> Option<Self>

Creates a mouse scroll event.

Preserves time stamp from original input event, if any.

Source

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

Calls a closure if this is a mouse scroll event.

Provided Methods§

Source

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

Returns mouse scroll arguments.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§