pub struct Pointer { /* private fields */ }Expand description
Identifies a specific input pointer and tracks the element that captures it.
Implementations§
Source§impl Pointer
impl Pointer
Sourcepub fn get_next_free_id() -> i32
pub fn get_next_free_id() -> i32
Returns a pointer identifier that is not in use.
Sourcepub fn with_platform_capture(
id: i32,
type_: PointerType,
is_primary: bool,
platform_capture: impl Fn(Option<&Ref<InputElement>>) + 'static,
) -> Rc<Pointer>
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.
Sourcepub fn platform_capture_lost(&self)
pub fn platform_capture_lost(&self)
Notifies the pointer that its capture was lost in the platform.
Sourcepub fn capture_with_source(
&self,
control: Option<&Ref<InputElement>>,
source: CaptureSource,
)
pub fn capture_with_source( &self, control: Option<&Ref<InputElement>>, source: CaptureSource, )
Captures pointer input to the specified control, on behalf of
source.
Sourcepub fn captured_gesture_recognizer(&self) -> Option<Ref<GestureRecognizer>>
pub fn captured_gesture_recognizer(&self) -> Option<Ref<GestureRecognizer>>
The gesture recognizer that captures the pointer, if any.
Sourcepub fn capture_source(&self) -> CaptureSource
pub fn capture_source(&self) -> CaptureSource
What requested the current capture state.
Sourcepub fn is_gesture_recognition_skipped(&self) -> bool
pub fn is_gesture_recognition_skipped(&self) -> bool
Whether gesture recognition is skipped for the pointer until it is released.
Sourcepub fn set_is_gesture_recognition_skipped(&self, value: bool)
pub fn set_is_gesture_recognition_skipped(&self, value: bool)
Sets whether gesture recognition is skipped for the pointer.
Trait Implementations§
Source§impl IPointer for Pointer
impl IPointer for Pointer
Source§fn capture(&self, control: Option<&Ref<InputElement>>)
fn capture(&self, control: Option<&Ref<InputElement>>)
Captures pointer input to the specified control. Read more
Source§fn captured(&self) -> Option<Ref<InputElement>>
fn captured(&self) -> Option<Ref<InputElement>>
The control that is currently capturing the pointer, if any.
Source§fn type_(&self) -> PointerType
fn type_(&self) -> PointerType
The type of the pointer.
Source§fn is_primary(&self) -> bool
fn is_primary(&self) -> bool
Whether the pointer is the primary pointer of its type.
Auto Trait Implementations§
impl !Freeze for Pointer
impl !RefUnwindSafe for Pointer
impl !Send for Pointer
impl !Sync for Pointer
impl !UnwindSafe for Pointer
impl Unpin for Pointer
impl UnsafeUnpin for Pointer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
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