Struct dioxus::prelude::PointerData
source · pub struct PointerData { /* private fields */ }
html
only.Implementations§
source§impl PointerData
impl PointerData
sourcepub fn new(data: impl HasPointerData + 'static) -> PointerData
pub fn new(data: impl HasPointerData + 'static) -> PointerData
Create a new PointerData
source§impl PointerData
impl PointerData
sourcepub fn pointer_id(&self) -> i32
pub fn pointer_id(&self) -> i32
Gets the unique identifier of the pointer causing the event.
sourcepub fn width(&self) -> i32
pub fn width(&self) -> i32
Gets the width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.
sourcepub fn height(&self) -> i32
pub fn height(&self) -> i32
Gets the height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.
sourcepub fn pressure(&self) -> f32
pub fn pressure(&self) -> f32
Gets the normalized pressure of the pointer input in the range of 0 to 1,
sourcepub fn tangential_pressure(&self) -> f32
pub fn tangential_pressure(&self) -> f32
Gets the normalized tangential pressure of the pointer input (also known as barrel pressure or cylinder stress) in the range -1 to 1,
sourcepub fn tilt_x(&self) -> i32
pub fn tilt_x(&self) -> i32
Gets the plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.
sourcepub fn tilt_y(&self) -> i32
pub fn tilt_y(&self) -> i32
Gets the plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.
sourcepub fn twist(&self) -> i32
pub fn twist(&self) -> i32
Gets the clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0 to 359.The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0 to 359.
sourcepub fn pointer_type(&self) -> String
pub fn pointer_type(&self) -> String
Gets the device type that caused the event (mouse, pen, touch, etc.).
sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Gets if the pointer represents the primary pointer of this pointer type.
Trait Implementations§
source§impl Debug for PointerData
impl Debug for PointerData
source§impl<'de> Deserialize<'de> for PointerData
impl<'de> Deserialize<'de> for PointerData
source§fn deserialize<D>(
deserializer: D
) -> Result<PointerData, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<PointerData, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
source§impl From<&PlatformEventData> for PointerData
impl From<&PlatformEventData> for PointerData
source§fn from(val: &PlatformEventData) -> PointerData
fn from(val: &PlatformEventData) -> PointerData
source§impl From<&PointerData> for SerializedPointerData
impl From<&PointerData> for SerializedPointerData
source§fn from(data: &PointerData) -> SerializedPointerData
fn from(data: &PointerData) -> SerializedPointerData
source§impl<E> From<E> for PointerDatawhere
E: HasPointerData + 'static,
impl<E> From<E> for PointerDatawhere
E: HasPointerData + 'static,
source§fn from(e: E) -> PointerData
fn from(e: E) -> PointerData
source§impl InteractionElementOffset for PointerData
impl InteractionElementOffset for PointerData
source§fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
source§fn coordinates(&self) -> Coordinates
fn coordinates(&self) -> Coordinates
source§impl InteractionLocation for PointerData
impl InteractionLocation for PointerData
source§fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
source§fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
source§impl ModifiersInteraction for PointerData
impl ModifiersInteraction for PointerData
source§impl PartialEq for PointerData
impl PartialEq for PointerData
source§fn eq(&self, other: &PointerData) -> bool
fn eq(&self, other: &PointerData) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PointerInteraction for PointerData
impl PointerInteraction for PointerData
source§impl Serialize for PointerData
impl Serialize for PointerData
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Auto Trait Implementations§
impl Freeze for PointerData
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
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<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
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
source§impl<Cfg> TryIntoConfig for Cfg
impl<Cfg> TryIntoConfig for Cfg
source§fn into_config(self) -> Option<Cfg>
fn into_config(self) -> Option<Cfg>
launch
only.