pub struct MouseEvent {
pub view_x: f32,
pub view_y: f32,
pub button: Option<MouseButton>,
pub id: i32,
}
Expand description
Represents an event coming from a mouse.
NOTE: For performance reasons, MouseEvent instances are reused. Use clone()
to
retain a reference to an event.
Fields
view_x: f32
The X position of the mouse, in view (stage) coordinates.
view_y: f32
The Y position of the mouse, in view (stage) coordinates.
The mouse button that caused this event, or None for movement events.
id: i32
An incrementing ID unique to every dispatched mouse event.
Implementations
Trait Implementations
sourceimpl Clone for MouseEvent
impl Clone for MouseEvent
sourcefn clone(&self) -> MouseEvent
fn clone(&self) -> MouseEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MouseEvent
impl Debug for MouseEvent
sourceimpl Default for MouseEvent
impl Default for MouseEvent
sourcefn default() -> MouseEvent
fn default() -> MouseEvent
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for MouseEvent
impl Send for MouseEvent
impl Sync for MouseEvent
impl Unpin for MouseEvent
impl UnwindSafe for MouseEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.