pub enum MouseEventKind {
Down(MouseButton),
Up(MouseButton),
Drag(MouseButton),
Moved,
ScrollDown,
ScrollUp,
ScrollLeft,
ScrollRight,
}
Expand description
Variants§
Down(MouseButton)
Pressed mouse button. Contains the button that was pressed.
Up(MouseButton)
Released mouse button. Contains the button that was released.
Drag(MouseButton)
Moved the mouse cursor while pressing the contained mouse button.
Moved
Moved the mouse cursor while not pressing a mouse button.
ScrollDown
Scrolled mouse wheel downwards (towards the user).
ScrollUp
Scrolled mouse wheel upwards (away from the user).
ScrollLeft
Scrolled mouse wheel left (mostly on a laptop touchpad).
ScrollRight
Scrolled mouse wheel right (mostly on a laptop touchpad).
Implementations§
Source§impl MouseEventKind
impl MouseEventKind
Sourcepub const fn is_down(&self) -> bool
pub const fn is_down(&self) -> bool
Returns true
if this value is of type Down
. Returns false
otherwise
Sourcepub const fn is_up(&self) -> bool
pub const fn is_up(&self) -> bool
Returns true
if this value is of type Up
. Returns false
otherwise
Sourcepub const fn is_drag(&self) -> bool
pub const fn is_drag(&self) -> bool
Returns true
if this value is of type Drag
. Returns false
otherwise
Sourcepub const fn is_moved(&self) -> bool
pub const fn is_moved(&self) -> bool
Returns true
if this value is of type Moved
. Returns false
otherwise
Sourcepub const fn is_scroll_down(&self) -> bool
pub const fn is_scroll_down(&self) -> bool
Returns true
if this value is of type ScrollDown
. Returns false
otherwise
Sourcepub const fn is_scroll_up(&self) -> bool
pub const fn is_scroll_up(&self) -> bool
Returns true
if this value is of type ScrollUp
. Returns false
otherwise
Sourcepub const fn is_scroll_left(&self) -> bool
pub const fn is_scroll_left(&self) -> bool
Returns true
if this value is of type ScrollLeft
. Returns false
otherwise
Sourcepub const fn is_scroll_right(&self) -> bool
pub const fn is_scroll_right(&self) -> bool
Returns true
if this value is of type ScrollRight
. Returns false
otherwise
Trait Implementations§
Source§impl Clone for MouseEventKind
impl Clone for MouseEventKind
Source§fn clone(&self) -> MouseEventKind
fn clone(&self) -> MouseEventKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more