Struct freya::prelude::events::pointer::PointerData
pub struct PointerData {
pub screen_coordinates: Point2D<f64, Measure>,
pub element_coordinates: Point2D<f64, Measure>,
pub point_type: PointerType,
}
Expand description
Data of a Mouse event.
Fields§
§screen_coordinates: Point2D<f64, Measure>
§element_coordinates: Point2D<f64, Measure>
§point_type: PointerType
Implementations§
§impl PointerData
impl PointerData
pub fn new( screen_coordinates: Point2D<f64, Measure>, element_coordinates: Point2D<f64, Measure>, point_type: PointerType ) -> PointerData
§impl PointerData
impl PointerData
pub fn get_screen_coordinates(&self) -> Point2D<f64, Measure>
pub fn get_screen_coordinates(&self) -> Point2D<f64, Measure>
Get the mouse coordinates relative to the window bounds.
pub fn get_element_coordinates(&self) -> Point2D<f64, Measure>
pub fn get_element_coordinates(&self) -> Point2D<f64, Measure>
Get the mouse coordinates relatives to the element bounds.
pub fn get_pointer_type(&self) -> PointerType
pub fn get_pointer_type(&self) -> PointerType
Get the pointer type that triggered this event.
Trait Implementations§
§impl Clone for PointerData
impl Clone for PointerData
§fn clone(&self) -> PointerData
fn clone(&self) -> PointerData
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 moreAuto Trait Implementations§
impl RefUnwindSafe for PointerData
impl Send for PointerData
impl Sync for PointerData
impl Unpin for PointerData
impl UnwindSafe for PointerData
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