Skip to main content

IPointer

Trait IPointer 

Source
pub trait IPointer {
    // Required methods
    fn id(&self) -> i32;
    fn capture(&self, control: Option<&Ref<InputElement>>);
    fn captured(&self) -> Option<Ref<InputElement>>;
    fn type_(&self) -> PointerType;
    fn is_primary(&self) -> bool;
    fn as_any(&self) -> &dyn Any;
}
Expand description

Identifies a specific input pointer, e.g. a mouse, a touch contact or a pen.

Required Methods§

Source

fn id(&self) -> i32

The unique identifier of the pointer.

Source

fn capture(&self, control: Option<&Ref<InputElement>>)

Captures pointer input to the specified control.

When an element captures the pointer, it receives pointer input whether the cursor is within the control’s bounds or not. The current pointer capture control is exposed by captured.

Source

fn captured(&self) -> Option<Ref<InputElement>>

The control that is currently capturing the pointer, if any.

Source

fn type_(&self) -> PointerType

The type of the pointer.

Source

fn is_primary(&self) -> bool

Whether the pointer is the primary pointer of its type.

Source

fn as_any(&self) -> &dyn Any

The pointer as Any, for downcasting to the concrete pointer.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§