pub struct GestureRecognizerCollection(/* private fields */);Expand description
The gesture recognizers attached to an input element.
The value is a shared handle: clones refer to the same collection, and handles compare by identity.
Implementations§
Source§impl GestureRecognizerCollection
impl GestureRecognizerCollection
Sourcepub fn new(input_element: &Ref<InputElement>) -> Self
pub fn new(input_element: &Ref<InputElement>) -> Self
Creates the collection of an input element.
Sourcepub fn add(&self, recognizer: impl IntoRef<GestureRecognizer>)
pub fn add(&self, recognizer: impl IntoRef<GestureRecognizer>)
Attaches a recognizer to the element.
Sourcepub fn remove(&self, recognizer: &GestureRecognizer) -> bool
pub fn remove(&self, recognizer: &GestureRecognizer) -> bool
Detaches a recognizer from the element. Returns whether it was attached.
Sourcepub fn to_vec(&self) -> Vec<Ref<GestureRecognizer>>
pub fn to_vec(&self) -> Vec<Ref<GestureRecognizer>>
The attached recognizers.
Trait Implementations§
Source§impl Clone for GestureRecognizerCollection
impl Clone for GestureRecognizerCollection
Source§impl Debug for GestureRecognizerCollection
impl Debug for GestureRecognizerCollection
Source§impl MarkupTyped for GestureRecognizerCollection
impl MarkupTyped for GestureRecognizerCollection
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Auto Trait Implementations§
impl !RefUnwindSafe for GestureRecognizerCollection
impl !Send for GestureRecognizerCollection
impl !Sync for GestureRecognizerCollection
impl !UnwindSafe for GestureRecognizerCollection
impl Freeze for GestureRecognizerCollection
impl Unpin for GestureRecognizerCollection
impl UnsafeUnpin for GestureRecognizerCollection
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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