pub struct PointerButtons(/* private fields */);Expand description
A set of pressed pointer buttons.
Implementations§
Source§impl PointerButtons
impl PointerButtons
Sourcepub fn empty() -> PointerButtons
pub fn empty() -> PointerButtons
Creates an empty set of buttons.
Sourcepub fn insert(&mut self, button: PointerButton)
pub fn insert(&mut self, button: PointerButton)
Adds a button to the set.
Sourcepub fn insert_all(&mut self, buttons: PointerButtons)
pub fn insert_all(&mut self, buttons: PointerButtons)
Adds multiple buttons to the set.
Sourcepub fn remove(&mut self, button: PointerButton)
pub fn remove(&mut self, button: PointerButton)
Removes a button from the set.
Sourcepub fn remove_all(&mut self, buttons: PointerButtons)
pub fn remove_all(&mut self, buttons: PointerButtons)
Removes multiple buttons from the set.
Sourcepub fn with(self, button: PointerButton) -> PointerButtons
pub fn with(self, button: PointerButton) -> PointerButtons
Returns the set with a button added.
Sourcepub fn without(self, button: PointerButton) -> PointerButtons
pub fn without(self, button: PointerButton) -> PointerButtons
Returns the set with a button removed.
Sourcepub fn contains(self, button: PointerButton) -> bool
pub fn contains(self, button: PointerButton) -> bool
Returns true if button is in the set.
Sourcepub fn is_superset(self, buttons: PointerButtons) -> bool
pub fn is_superset(self, buttons: PointerButtons) -> bool
Returns true if all buttons are in the set.
Sourcepub fn has_primary(self) -> bool
pub fn has_primary(self) -> bool
Returns true if PointerButton::Primary is in the set.
Sourcepub fn has_secondary(self) -> bool
pub fn has_secondary(self) -> bool
Returns true if PointerButton::Secondary is in the set.
Sourcepub fn has_auxiliary(self) -> bool
pub fn has_auxiliary(self) -> bool
Returns true if PointerButton::Auxiliary is in the set.
Sourcepub fn has_x1(self) -> bool
pub fn has_x1(self) -> bool
Returns true if PointerButton::X1 is in the set.
Sourcepub fn has_x2(self) -> bool
pub fn has_x2(self) -> bool
Returns true if PointerButton::X2 is in the set.
Trait Implementations§
Source§impl Clone for PointerButtons
impl Clone for PointerButtons
Source§fn clone(&self) -> PointerButtons
fn clone(&self) -> PointerButtons
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 PointerButtons
Source§impl Debug for PointerButtons
impl Debug for PointerButtons
Source§impl Default for PointerButtons
impl Default for PointerButtons
Source§fn default() -> PointerButtons
fn default() -> PointerButtons
Returns the “default value” for a type. Read more
impl Eq for PointerButtons
Source§impl From<u8> for PointerButtons
impl From<u8> for PointerButtons
Source§impl PartialEq for PointerButtons
impl PartialEq for PointerButtons
Source§fn eq(&self, other: &PointerButtons) -> bool
fn eq(&self, other: &PointerButtons) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PointerButtons
Auto Trait Implementations§
impl Freeze for PointerButtons
impl RefUnwindSafe for PointerButtons
impl Send for PointerButtons
impl Sync for PointerButtons
impl Unpin for PointerButtons
impl UnsafeUnpin for PointerButtons
impl UnwindSafe for PointerButtons
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.