PointerPointProperties
struct · ferroui-base · v0.5.0
struct PointerPointProperties
Provides extended properties for a pointer point.
Members
contact_rectis_left_button_pressedis_middle_button_pressedis_right_button_pressedis_x_button_1_pressedis_x_button_2_pressedis_barrel_button_pressedis_eraseris_invertedtwistpressurex_tilty_tiltpointer_update_kindNONEnewwith_pen_statewith_pen_state_and_contact_rectfrom_raw_pointbased_on
contact_rect
contact_rect: crate::Rect
The bounding rectangle of the contact area (typically from touch input).
is_left_button_pressed
is_left_button_pressed: bool
Whether the pointer input was triggered by the primary action mode of an input device.
is_middle_button_pressed
is_middle_button_pressed: bool
Whether the pointer input was triggered by the tertiary action mode of an input device.
is_right_button_pressed
is_right_button_pressed: bool
Whether the pointer input was triggered by the secondary action mode (if supported) of an input device.
is_x_button_1_pressed
is_x_button_1_pressed: bool
Whether the pointer input was triggered by the first extended mouse button (XButton1).
is_x_button_2_pressed
is_x_button_2_pressed: bool
Whether the pointer input was triggered by the second extended mouse button (XButton2).
is_barrel_button_pressed
is_barrel_button_pressed: bool
Whether the barrel button of the pen/stylus device is pressed.
is_eraser
is_eraser: bool
Whether the input is from a pen eraser.
is_inverted
is_inverted: bool
Whether the digitizer input is from an inverted pen.
twist
twist: f32
The 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
pressure: f32
A 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
x_tilt: f32
The 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
y_tilt: f32
The 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
pointer_update_kind: PointerUpdateKind
The kind of pointer state change.
NONE
const NONE: PointerPointProperties
The default properties: nothing pressed.
new
fn new(modifiers: RawInputModifiers, kind: PointerUpdateKind) -> Self
Creates properties from raw input modifiers and the kind of state change.
with_pen_state
fn with_pen_state(modifiers: RawInputModifiers, kind: PointerUpdateKind, twist: f32, pressure: f32, x_tilt: f32, y_tilt: f32) -> Self
Creates properties with pen state.
with_pen_state_and_contact_rect
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.
from_raw_point
fn from_raw_point(modifiers: RawInputModifiers, kind: PointerUpdateKind, raw_point: RawPointerPoint) -> Self
Creates properties from a raw pointer point.
based_on
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
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneCopyDebugStructuralPartialEqPartialEqDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.