#[repr(u8)]pub enum MouseButton {
Left = 1,
Right = 2,
Middle = 4,
LeftRight = 3,
LeftMiddle = 5,
RightMiddle = 6,
All = 7,
Release = 0,
}Expand description
Represents mouse button states and combinations.
This enum defines individual mouse buttons and their combinations, with values that can be used as bitmasks for mouse operations.
Variants§
Left = 1
Left mouse button.
Right = 2
Right mouse button.
Middle = 4
Middle mouse button (wheel click).
LeftRight = 3
Left and right mouse buttons pressed simultaneously.
LeftMiddle = 5
Left and middle mouse buttons pressed simultaneously.
RightMiddle = 6
Right and middle mouse buttons pressed simultaneously.
All = 7
All mouse buttons pressed simultaneously.
Release = 0
No mouse buttons pressed (release state).
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<MouseButton> for u8
impl From<MouseButton> for u8
Source§fn from(button: MouseButton) -> Self
fn from(button: MouseButton) -> Self
Converts to this type from the input type.
impl Copy 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