FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Pointer

    struct · ferroui-base · v0.5.0

    struct Pointer
    

    Identifies a specific input pointer and tracks the element that captures it.

    View source

    Members

    get_next_free_id

    fn get_next_free_id() -> i32
    

    Returns a pointer identifier that is not in use.

    Source

    new

    fn new(id: i32, type_: PointerType, is_primary: bool) -> Rc<Pointer>
    

    Creates a pointer.

    Source

    with_platform_capture

    fn with_platform_capture(id: i32, type_: PointerType, is_primary: bool, platform_capture: impl Fn(Option<&Ref<InputElement>>) -> () + 'static) -> Rc<Pointer>
    

    Creates a pointer that captures the pointer in the platform through platform_capture whenever the capturing element changes.

    Source

    platform_capture_lost

    fn platform_capture_lost(self: &Self)
    

    Notifies the pointer that its capture was lost in the platform.

    Source

    capture_with_source

    fn capture_with_source(self: &Self, control: Option<&Ref<InputElement>>, source: CaptureSource)
    

    Captures pointer input to the specified control, on behalf of source.

    Source

    captured_gesture_recognizer

    fn captured_gesture_recognizer(self: &Self) -> Option<Ref<GestureRecognizer>>
    

    The gesture recognizer that captures the pointer, if any.

    Source

    capture_source

    fn capture_source(self: &Self) -> CaptureSource
    

    What requested the current capture state.

    Source

    is_gesture_recognition_skipped

    fn is_gesture_recognition_skipped(self: &Self) -> bool
    

    Whether gesture recognition is skipped for the pointer until it is released.

    Source

    set_is_gesture_recognition_skipped

    fn set_is_gesture_recognition_skipped(self: &Self, value: bool)
    

    Sets whether gesture recognition is skipped for the pointer.

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the pointer: its capture is lost and it can no longer be captured.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • IPointer

    Availability

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