pub struct MouseData { /* private fields */ }
Expand description
A synthetic event that wraps a web-style MouseEvent
Data associated with a mouse event
Implementations§
Trait Implementations§
source§impl From<&PlatformEventData> for MouseData
impl From<&PlatformEventData> for MouseData
source§fn from(val: &PlatformEventData) -> MouseData
fn from(val: &PlatformEventData) -> MouseData
Converts to this type from the input type.
source§impl<E> From<E> for MouseDatawhere
E: HasMouseData + 'static,
impl<E> From<E> for MouseDatawhere
E: HasMouseData + 'static,
source§impl InteractionElementOffset for MouseData
impl InteractionElementOffset for MouseData
source§fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
Gets the coordinates of the event relative to the target element.
source§fn coordinates(&self) -> Coordinates
fn coordinates(&self) -> Coordinates
Gets the coordinates of the event.
source§impl InteractionLocation for MouseData
impl InteractionLocation for MouseData
source§fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
Gets the coordinates of the event relative to the browser viewport.
source§fn page_coordinates(&self) -> Point2D<f64, PageSpace>
fn page_coordinates(&self) -> Point2D<f64, PageSpace>
Gets the coordinates of the event relative to the page.
source§fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
Gets the coordinates of the event relative to the screen.
source§impl ModifiersInteraction for MouseData
impl ModifiersInteraction for MouseData
source§impl<E> PartialEq<E> for MouseDatawhere
E: HasMouseData,
impl<E> PartialEq<E> for MouseDatawhere
E: HasMouseData,
source§impl PointerInteraction for MouseData
impl PointerInteraction for MouseData
The set of mouse buttons which were held when the event occurred.
The mouse button that triggered the event
This is only guaranteed to indicate which button was pressed during events caused by pressing or releasing a button. As such, it is not reliable for events such as mouseenter, mouseleave, mouseover, mouseout, or mousemove. For example, a value of MouseButton::Primary may also indicate that no button was pressed.
Auto Trait Implementations§
impl Freeze for MouseData
impl !RefUnwindSafe for MouseData
impl !Send for MouseData
impl !Sync for MouseData
impl Unpin for MouseData
impl !UnwindSafe for MouseData
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
source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.