FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<GestureRecognizer>
    

    Returns a strong reference to this object.

    Source

    pointer_pressed

    fn pointer_pressed(self: &Self, e: &PointerPressedEventArgs)
    

    Called when a pointer is pressed on the target.

    Source

    pointer_released

    fn pointer_released(self: &Self, e: &PointerReleasedEventArgs)
    

    Called when a pointer is released on the target.

    Source

    pointer_moved

    fn pointer_moved(self: &Self, e: &PointerEventArgs)
    

    Called when a pointer moves over the target.

    Source

    pointer_capture_lost

    fn pointer_capture_lost(self: &Self, pointer: &Rc<dyn IPointer>)
    

    Called when the capture of a pointer is lost.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see crate::FerroObject::construct.

    Source

    target

    fn target(self: &Self) -> Option<Ref<InputElement>>
    

    The element the recognizer is attached to.

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.