pub enum MouseEvent {
Down {
pos: Point,
button: MouseButton,
modifiers: Modifiers,
},
Up {
pos: Point,
button: MouseButton,
modifiers: Modifiers,
},
Move {
pos: Point,
modifiers: Modifiers,
},
Enter {
pos: Point,
},
Leave {
pos: Point,
},
DoubleClick {
pos: Point,
button: MouseButton,
modifiers: Modifiers,
},
TripleClick {
pos: Point,
button: MouseButton,
modifiers: Modifiers,
},
Scroll {
pos: Point,
delta: ScrollDelta,
modifiers: Modifiers,
},
DragStart {
pos: Point,
button: MouseButton,
},
DragMove {
pos: Point,
delta: Point,
},
DragEnd {
pos: Point,
button: MouseButton,
},
}Expand description
A pointer (mouse / trackpad) event in tree-local coordinates.
Variants§
Down
A button was pressed.
Fields
Which button.
Up
A button was released.
Fields
Which button.
Move
The pointer moved without a press/release.
Enter
The pointer entered a widget’s bounds.
Leave
The pointer left a widget’s bounds.
DoubleClick
A double click (two Downs within the platform double-click window).
TripleClick
A triple click (three rapid Downs; selects a paragraph by convention).
Scroll
A scroll-wheel / trackpad scroll, discrete or smooth (see ScrollDelta).
Fields
§
delta: ScrollDeltaScroll delta.
DragStart
A drag gesture began (button held and moved past the start threshold).
DragMove
The pointer moved while dragging.
DragEnd
A drag gesture ended (button released).
Implementations§
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