Enum druid::MouseButton
source · pub enum MouseButton {
None,
Left,
Right,
Middle,
X1,
X2,
}
Expand description
An indicator of which mouse button was pressed.
Variants§
None
No mouse button.
Left
Left mouse button.
Right
Right mouse button.
Middle
Middle mouse button.
X1
First X button.
X2
Second X button.
Implementations§
source§impl MouseButton
impl MouseButton
sourcepub fn is_left(self) -> bool
pub fn is_left(self) -> bool
Returns true
if this is MouseButton::Left
.
sourcepub fn is_right(self) -> bool
pub fn is_right(self) -> bool
Returns true
if this is MouseButton::Right
.
sourcepub fn is_middle(self) -> bool
pub fn is_middle(self) -> bool
Returns true
if this is MouseButton::Middle
.
sourcepub fn is_x1(self) -> bool
pub fn is_x1(self) -> bool
Returns true
if this is MouseButton::X1
.
sourcepub fn is_x2(self) -> bool
pub fn is_x2(self) -> bool
Returns true
if this is MouseButton::X2
.
Trait Implementations§
source§impl Clone for MouseButton
impl Clone for MouseButton
source§fn clone(&self) -> MouseButton
fn clone(&self) -> MouseButton
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 MouseButton
impl Debug for MouseButton
source§impl PartialEq<MouseButton> for MouseButton
impl PartialEq<MouseButton> for MouseButton
source§fn eq(&self, other: &MouseButton) -> bool
fn eq(&self, other: &MouseButton) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for MouseButton
impl Eq for MouseButton
impl StructuralEq for MouseButton
impl StructuralPartialEq for MouseButton
Auto Trait Implementations§
impl RefUnwindSafe for MouseButton
impl Send for MouseButton
impl Sync for MouseButton
impl Unpin for MouseButton
impl UnwindSafe for MouseButton
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>
§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.