Struct freya_elements::events::pointer::PointerData
source · pub struct PointerData {
pub screen_coordinates: CursorPoint,
pub element_coordinates: CursorPoint,
pub point_type: PointerType,
}
Expand description
Data of a Mouse event.
Fields§
§screen_coordinates: CursorPoint
§element_coordinates: CursorPoint
§point_type: PointerType
Implementations§
source§impl PointerData
impl PointerData
pub fn new( screen_coordinates: CursorPoint, element_coordinates: CursorPoint, point_type: PointerType ) -> Self
source§impl PointerData
impl PointerData
sourcepub fn get_screen_coordinates(&self) -> CursorPoint
pub fn get_screen_coordinates(&self) -> CursorPoint
Get the mouse coordinates relative to the window bounds.
sourcepub fn get_element_coordinates(&self) -> CursorPoint
pub fn get_element_coordinates(&self) -> CursorPoint
Get the mouse coordinates relatives to the element bounds.
sourcepub fn get_pointer_type(&self) -> PointerType
pub fn get_pointer_type(&self) -> PointerType
Get the pointer type that triggered this event.
Trait Implementations§
source§impl Clone for PointerData
impl Clone for PointerData
source§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