Enum sauron::MouseButton
source · #[repr(i16)]pub enum MouseButton {
Primary = 0,
Auxiliary = 1,
Secondary = 2,
Fourth = 3,
Fifth = 4,
}
Expand description
Mouse button used in the MouseEvent
Variants§
Primary = 0
Main button pressed, usually the left button or the un-initialized state
Auxiliary = 1
Auxiliary button pressed, usually the wheel button or the middle button (if present)
Secondary = 2
Secondary button pressed, usually the right button
Fourth = 3
Fourth button, typically the Browser Back button
Fifth = 4
Fifth button, typically the Browser Forward button
Implementations§
source§impl MouseButton
impl MouseButton
sourcepub fn is_primary(me: &MouseEvent) -> bool
pub fn is_primary(me: &MouseEvent) -> bool
check if the mouse event is on the primary button
sourcepub fn is_auxiliary(me: &MouseEvent) -> bool
pub fn is_auxiliary(me: &MouseEvent) -> bool
check if the mouse event is on the auxiliary button
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 moreimpl 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 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