pub enum MouseButton {
Left,
Middle,
Right,
WheelUp,
WheelDown,
WheelLeft,
WheelRight,
Back,
Forward,
Other(u8),
}Expand description
Which mouse button an event concerns. None on a MouseEvent means bare
motion with no button held.
Variants§
Left
Middle
Right
WheelUp
WheelDown
WheelLeft
Horizontal scroll / tilt-wheel — xterm buttons 6 and 7, encoded in the same 64-base wheel group as up/down.
WheelRight
Back
The thumb buttons — X11 buttons 8 and 9, the “back”/“forward” of the 128-base extra group.
Forward
Other(u8)
Any further mouse button by its X11 number (gaming-mouse side buttons, 10+). Encoded via the xterm bit formula; use the named variants above for buttons that have one.
Trait Implementations§
Source§impl Clone for MouseButton
impl Clone for MouseButton
Source§fn clone(&self) -> MouseButton
fn clone(&self) -> MouseButton
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 moreimpl Copy for MouseButton
Source§impl Debug for MouseButton
impl Debug for MouseButton
impl Eq for MouseButton
Source§impl PartialEq for MouseButton
impl PartialEq for MouseButton
Source§fn eq(&self, other: &MouseButton) -> bool
fn eq(&self, other: &MouseButton) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MouseButton
Auto Trait Implementations§
impl Freeze for MouseButton
impl RefUnwindSafe for MouseButton
impl Send for MouseButton
impl Sync for MouseButton
impl Unpin for MouseButton
impl UnsafeUnpin for MouseButton
impl UnwindSafe for MouseButton
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