pub enum MouseEvent {
CursorMoved {
position: Point,
modifiers: Modifiers,
},
ButtonPressed {
button: MouseButton,
modifiers: Modifiers,
},
ButtonReleased {
button: MouseButton,
modifiers: Modifiers,
},
WheelScrolled {
delta: ScrollDelta,
modifiers: Modifiers,
},
CursorEntered,
CursorLeft,
DragEntered {
position: Point,
modifiers: Modifiers,
data: DropData,
},
DragMoved {
position: Point,
modifiers: Modifiers,
data: DropData,
},
DragLeft,
DragDropped {
position: Point,
modifiers: Modifiers,
data: DropData,
},
}Variants§
CursorMoved
The mouse cursor was moved
Fields
ButtonPressed
A mouse button was pressed.
Fields
The button that was pressed.
ButtonReleased
A mouse button was released.
Fields
The button that was released.
WheelScrolled
The mouse wheel was scrolled.
Fields
§
delta: ScrollDeltaHow much was scrolled, in factional lines.
CursorEntered
The mouse cursor entered the window.
May not be available on all platforms.
CursorLeft
The mouse cursor left the window.
May not be available on all platforms.
DragEntered
Fields
DragMoved
Fields
DragLeft
DragDropped
Trait Implementations§
Source§impl Clone for MouseEvent
impl Clone for MouseEvent
Source§fn clone(&self) -> MouseEvent
fn clone(&self) -> MouseEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MouseEvent
impl Debug for MouseEvent
Source§impl PartialEq for MouseEvent
impl PartialEq for MouseEvent
Source§fn eq(&self, other: &MouseEvent) -> bool
fn eq(&self, other: &MouseEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MouseEvent
Auto Trait Implementations§
impl Freeze for MouseEvent
impl RefUnwindSafe for MouseEvent
impl Send for MouseEvent
impl Sync for MouseEvent
impl Unpin for MouseEvent
impl UnsafeUnpin for MouseEvent
impl UnwindSafe for MouseEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more