GestureRecognizer
struct · ferroui-base · v0.5.0
struct GestureRecognizer
The base class of gesture recognizers.
A recognizer is attached to an input element through the element's gesture recognizer collection and receives the pointer events of that element. A recognizer that detects its gesture captures the pointer, after which pointer input goes to the recognizer only.
Members
TYPEto_refpointer_pressedpointer_releasedpointer_movedpointer_capture_lostconstructtargetcapture
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<GestureRecognizer>
Returns a strong reference to this object.
pointer_pressed
fn pointer_pressed(self: &Self, e: &PointerPressedEventArgs)
Called when a pointer is pressed on the target.
pointer_released
fn pointer_released(self: &Self, e: &PointerReleasedEventArgs)
Called when a pointer is released on the target.
pointer_moved
fn pointer_moved(self: &Self, e: &PointerEventArgs)
Called when a pointer moves over the target.
pointer_capture_lost
fn pointer_capture_lost(self: &Self, pointer: &Rc<dyn IPointer>)
Called when the capture of a pointer is lost.
construct
fn construct() -> Self
Creates the class data; see crate::FerroObject::construct.
target
fn target(self: &Self) -> Option<Ref<InputElement>>
The element the recognizer is attached to.
capture
fn capture(self: &Self, pointer: &Rc<dyn IPointer>)
Captures a pointer to the recognizer: further input of the pointer goes to the recognizer and other recognizers are skipped.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeGestureRecognizerImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyErasedDestructorIntoEitherDerefUpcast<T>Upcast<GestureRecognizer>StaticTypeObjectTypeSubclassable<T>FerroObjectImplStyledElementImplGestureRecognizerImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.