#[repr(u8)]pub enum PointerButton {
None = 0,
Primary = 1,
Secondary = 2,
Auxiliary = 3,
X1 = 4,
X2 = 5,
}Expand description
Identifies a specific button on a pointer device.
Variants§
None = 0
Primary = 1
The primary pointer button, usually the left mouse button.
Secondary = 2
The secondary pointer button, usually the right mouse button.
Auxiliary = 3
The auxiliary pointer button, usually the wheel or middle mouse button.
X1 = 4
The fourth pointer button, usually the back button.
X2 = 5
The fifth pointer button, usually the forward button.
Implementations§
Source§impl PointerButton
impl PointerButton
Sourcepub fn is_primary(self) -> bool
pub fn is_primary(self) -> bool
Returns true if this is PointerButton::Primary.
Sourcepub fn is_secondary(self) -> bool
pub fn is_secondary(self) -> bool
Returns true if this is PointerButton::Secondary.
Sourcepub fn is_auxiliary(self) -> bool
pub fn is_auxiliary(self) -> bool
Returns true if this is PointerButton::Auxiliary.
Sourcepub fn is_x1(self) -> bool
pub fn is_x1(self) -> bool
Returns true if this is PointerButton::X1.
Sourcepub fn is_x2(self) -> bool
pub fn is_x2(self) -> bool
Returns true if this is PointerButton::X2.
Trait Implementations§
Source§impl Clone for PointerButton
impl Clone for PointerButton
Source§fn clone(&self) -> PointerButton
fn clone(&self) -> PointerButton
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 PointerButton
Source§impl Debug for PointerButton
impl Debug for PointerButton
Source§impl Default for PointerButton
impl Default for PointerButton
Source§fn default() -> PointerButton
fn default() -> PointerButton
Returns the “default value” for a type. Read more
impl Eq for PointerButton
Source§impl From<isize> for PointerButton
impl From<isize> for PointerButton
Source§impl PartialEq for PointerButton
impl PartialEq for PointerButton
Source§fn eq(&self, other: &PointerButton) -> bool
fn eq(&self, other: &PointerButton) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PointerButton
Auto Trait Implementations§
impl Freeze for PointerButton
impl RefUnwindSafe for PointerButton
impl Send for PointerButton
impl Sync for PointerButton
impl Unpin for PointerButton
impl UnsafeUnpin for PointerButton
impl UnwindSafe for PointerButton
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.