Struct druid::MouseButtons
source · pub struct MouseButtons(_);
Expand description
A set of MouseButton
s.
Implementations§
source§impl MouseButtons
impl MouseButtons
sourcepub fn new() -> MouseButtons
pub fn new() -> MouseButtons
Create a new empty set.
sourcepub fn insert(&mut self, button: MouseButton)
pub fn insert(&mut self, button: MouseButton)
Add the button
to the set.
sourcepub fn remove(&mut self, button: MouseButton)
pub fn remove(&mut self, button: MouseButton)
Remove the button
from the set.
sourcepub fn with(self, button: MouseButton) -> MouseButtons
pub fn with(self, button: MouseButton) -> MouseButtons
Builder-style method for adding the button
to the set.
sourcepub fn without(self, button: MouseButton) -> MouseButtons
pub fn without(self, button: MouseButton) -> MouseButtons
Builder-style method for removing the button
from the set.
sourcepub fn contains(self, button: MouseButton) -> bool
pub fn contains(self, button: MouseButton) -> bool
Returns true
if the button
is in the set.
sourcepub fn is_superset(self, buttons: MouseButtons) -> bool
pub fn is_superset(self, buttons: MouseButtons) -> bool
Returns true
if all the buttons
are in the set.
sourcepub fn has_left(self) -> bool
pub fn has_left(self) -> bool
Returns true
if MouseButton::Left
is in the set.
sourcepub fn has_right(self) -> bool
pub fn has_right(self) -> bool
Returns true
if MouseButton::Right
is in the set.
sourcepub fn has_middle(self) -> bool
pub fn has_middle(self) -> bool
Returns true
if MouseButton::Middle
is in the set.
sourcepub fn has_x1(self) -> bool
pub fn has_x1(self) -> bool
Returns true
if MouseButton::X1
is in the set.
sourcepub fn has_x2(self) -> bool
pub fn has_x2(self) -> bool
Returns true
if MouseButton::X2
is in the set.
sourcepub fn extend(&mut self, buttons: MouseButtons)
pub fn extend(&mut self, buttons: MouseButtons)
Adds all the buttons
to the set.
sourcepub fn union(self, other: MouseButtons) -> MouseButtons
pub fn union(self, other: MouseButtons) -> MouseButtons
Returns a union of the values in self
and other
.
Trait Implementations§
source§impl Clone for MouseButtons
impl Clone for MouseButtons
source§fn clone(&self) -> MouseButtons
fn clone(&self) -> MouseButtons
Returns a copy 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 Debug for MouseButtons
impl Debug for MouseButtons
source§impl Default for MouseButtons
impl Default for MouseButtons
source§fn default() -> MouseButtons
fn default() -> MouseButtons
Returns the “default value” for a type. Read more
source§impl PartialEq<MouseButtons> for MouseButtons
impl PartialEq<MouseButtons> for MouseButtons
source§fn eq(&self, other: &MouseButtons) -> bool
fn eq(&self, other: &MouseButtons) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for MouseButtons
impl Eq for MouseButtons
impl StructuralEq for MouseButtons
impl StructuralPartialEq for MouseButtons
Auto Trait Implementations§
impl RefUnwindSafe for MouseButtons
impl Send for MouseButtons
impl Sync for MouseButtons
impl Unpin for MouseButtons
impl UnwindSafe for MouseButtons
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.