Struct components::foundation::MouseEvent
source · [−]pub struct MouseEvent {
pub timestamp: f32,
pub state: InteractState,
pub button: MouseButton,
pub x: i32,
pub y: i32,
pub xrel: i32,
pub yrel: i32,
pub bubble: bool,
}
Fields
timestamp: f32
The time in seconds when this mouse event occurred, useful for deltas
state: InteractState
The state this event is in
The button id, if the event state
is down
or up
x: i32
The x position in the window of the mouse event
y: i32
The y position in the window of the mouse event
xrel: i32
The relative x position if state
is move
or a window has grabbed state
yrel: i32
The relative y position if state
is move
or a window has grabbed state
bubble: bool
Whether or not the event should bubble further. set to false to stop propagation
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
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
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn 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
.