FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    PointerEventArgs

    struct · ferroui-base · v0.5.0

    struct PointerEventArgs
    

    Provides data for pointer events.

    View source

    Members

    new

    fn new<T: ?Sized>(routed_event: Option<&RoutedEvent<T>>, source: impl Into<Nullable<FerroObject>>, pointer: Rc<dyn IPointer>, root_visual: Option<&Visual>, root_visual_position: Point, timestamp: u64, properties: PointerPointProperties, modifiers: KeyModifiers) -> Self
    

    Creates pointer event args.

    root_visual is the root of the tree that observed the event and root_visual_position the position of the pointer in its coordinates. timestamp is the platform time stamp of the input.

    Source

    with_previous_points

    fn with_previous_points(self: Self, previous_points: Option<IntermediatePoints>) -> Self
    

    Adds the intermediate points of the event.

    Source

    fn with_platform_input_event_cookie(self: Self, cookie: Option<Rc<dyn Any>>) -> Self
    

    Adds the platform's cookie for the input event.

    Source

    pointer

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

    The pointer that caused the event.

    Source

    timestamp

    fn timestamp(self: &Self) -> u64
    

    The time when the pointer event occurred, as reported by the platform.

    Source

    fn platform_input_event_cookie(self: &Self) -> Option<&Rc<dyn Any>>
    

    The platform's opaque cookie for the input event that caused this event, if any.

    Source

    key_modifiers

    fn key_modifiers(self: &Self) -> KeyModifiers
    

    The key modifiers held down when the event occurred.

    Source

    get_position

    fn get_position(self: &Self, relative_to: Option<&Visual>) -> Point
    

    Gets the pointer position relative to a control, or relative to the root of the tree that observed the event when relative_to is None.

    Source

    get_current_point

    fn get_current_point(self: &Self, relative_to: Option<&Visual>) -> PointerPoint
    

    Returns the pointer point associated with the current event, positioned relative to a control.

    Source

    get_intermediate_points

    fn get_intermediate_points(self: &Self, relative_to: Option<&Visual>) -> Vec<PointerPoint>
    

    Returns all points since the last relevant pointer event, positioned relative to a control. The last one is the current point.

    Source

    prevent_gesture_recognition

    fn prevent_gesture_recognition(self: &Self)
    

    Prevents this event from being handled by other gesture recognizers in the route.

    Source

    properties

    fn properties(self: &Self) -> PointerPointProperties
    

    The state of the pointer device at the time of the event.

    Source

    Trait implementations

    Availability

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