pub struct PointerPointProperties {Show 14 fields
pub contact_rect: Rect,
pub is_left_button_pressed: bool,
pub is_middle_button_pressed: bool,
pub is_right_button_pressed: bool,
pub is_x_button_1_pressed: bool,
pub is_x_button_2_pressed: bool,
pub is_barrel_button_pressed: bool,
pub is_eraser: bool,
pub is_inverted: bool,
pub twist: f32,
pub pressure: f32,
pub x_tilt: f32,
pub y_tilt: f32,
pub pointer_update_kind: PointerUpdateKind,
}Expand description
Provides extended properties for a pointer point.
Fields§
§contact_rect: RectThe bounding rectangle of the contact area (typically from touch input).
Whether the pointer input was triggered by the primary action mode of an input device.
Whether the pointer input was triggered by the tertiary action mode of an input device.
Whether the pointer input was triggered by the secondary action mode (if supported) of an input device.
Whether the pointer input was triggered by the first extended mouse button (XButton1).
Whether the pointer input was triggered by the second extended mouse button (XButton2).
Whether the barrel button of the pen/stylus device is pressed.
is_eraser: boolWhether the input is from a pen eraser.
is_inverted: boolWhether the digitizer input is from an inverted pen.
twist: f32The clockwise rotation in degrees of a pen device around its own major axis (such as when the user spins the pen in their fingers). A value between 0.0 and 359.0 in degrees of rotation; the default value is 0.0.
pressure: f32A value that indicates the force that the pointer device (typically a pen/stylus) exerts on the surface of the digitizer. A value from 0 to 1.0; the default value is 0.5.
x_tilt: f32The plane angle between the Y-Z plane and the plane that contains the Y axis and the axis of the input device (typically a pen/stylus). The value is 0.0 when the finger or pen is perpendicular to the digitizer surface, between 0.0 and 90.0 when tilted to the right of perpendicular, and between 0.0 and -90.0 when tilted to the left of perpendicular. The default value is 0.0.
y_tilt: f32The plane angle between the X-Z plane and the plane that contains the X axis and the axis of the input device (typically a pen/stylus). The value is 0.0 when the finger or pen is perpendicular to the digitizer surface, between 0.0 and 90.0 when tilted towards the user, and between 0.0 and -90.0 when tilted away from the user. The default value is 0.0.
pointer_update_kind: PointerUpdateKindThe kind of pointer state change.
Implementations§
Source§impl PointerPointProperties
impl PointerPointProperties
Sourcepub const NONE: PointerPointProperties
pub const NONE: PointerPointProperties
The default properties: nothing pressed.
Sourcepub fn new(modifiers: RawInputModifiers, kind: PointerUpdateKind) -> Self
pub fn new(modifiers: RawInputModifiers, kind: PointerUpdateKind) -> Self
Creates properties from raw input modifiers and the kind of state change.
Sourcepub fn with_pen_state(
modifiers: RawInputModifiers,
kind: PointerUpdateKind,
twist: f32,
pressure: f32,
x_tilt: f32,
y_tilt: f32,
) -> Self
pub fn with_pen_state( modifiers: RawInputModifiers, kind: PointerUpdateKind, twist: f32, pressure: f32, x_tilt: f32, y_tilt: f32, ) -> Self
Creates properties with pen state.
Sourcepub fn with_pen_state_and_contact_rect(
modifiers: RawInputModifiers,
kind: PointerUpdateKind,
twist: f32,
pressure: f32,
x_tilt: f32,
y_tilt: f32,
contact_rect: Rect,
) -> Self
pub fn with_pen_state_and_contact_rect( modifiers: RawInputModifiers, kind: PointerUpdateKind, twist: f32, pressure: f32, x_tilt: f32, y_tilt: f32, contact_rect: Rect, ) -> Self
Creates properties with pen state and a contact rectangle.
Sourcepub fn from_raw_point(
modifiers: RawInputModifiers,
kind: PointerUpdateKind,
raw_point: RawPointerPoint,
) -> Self
pub fn from_raw_point( modifiers: RawInputModifiers, kind: PointerUpdateKind, raw_point: RawPointerPoint, ) -> Self
Creates properties from a raw pointer point.
Sourcepub fn based_on(
based_on: PointerPointProperties,
raw_point: RawPointerPoint,
) -> Self
pub fn based_on( based_on: PointerPointProperties, raw_point: RawPointerPoint, ) -> Self
Creates the properties of an intermediate point: the button state of
based_on with the pen state of a raw pointer point.
Trait Implementations§
Source§impl Clone for PointerPointProperties
impl Clone for PointerPointProperties
impl Copy for PointerPointProperties
Source§impl Debug for PointerPointProperties
impl Debug for PointerPointProperties
Source§impl Default for PointerPointProperties
impl Default for PointerPointProperties
Source§impl PartialEq for PointerPointProperties
impl PartialEq for PointerPointProperties
impl StructuralPartialEq for PointerPointProperties
Auto Trait Implementations§
impl Freeze for PointerPointProperties
impl RefUnwindSafe for PointerPointProperties
impl Send for PointerPointProperties
impl Sync for PointerPointProperties
impl Unpin for PointerPointProperties
impl UnsafeUnpin for PointerPointProperties
impl UnwindSafe for PointerPointProperties
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more