Skip to main content

Pointer

Struct Pointer 

Source
pub struct Pointer { /* private fields */ }
Expand description

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

Implementations§

Source§

impl Pointer

Source

pub fn get_next_free_id() -> i32

Returns a pointer identifier that is not in use.

Source

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

Creates a pointer.

Source

pub 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

pub fn platform_capture_lost(&self)

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

Source

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

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

Source

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

The gesture recognizer that captures the pointer, if any.

Source

pub fn capture_source(&self) -> CaptureSource

What requested the current capture state.

Source

pub fn is_gesture_recognition_skipped(&self) -> bool

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

Source

pub fn set_is_gesture_recognition_skipped(&self, value: bool)

Sets whether gesture recognition is skipped for the pointer.

Source

pub fn dispose(&self)

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

Trait Implementations§

Source§

impl IPointer for Pointer

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. Read more
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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.