pub struct ClickTracker { /* private fields */ }Expand description
Implementations§
Source§impl ClickTracker
impl ClickTracker
Sourcepub fn track<V: IntoView>(&self, view: V) -> impl IntoView + use<V>
pub fn track<V: IntoView>(&self, view: V) -> impl IntoView + use<V>
Wrap a view to track when it receives clicks.
The view will have on_click_stop added to it.
Sourcepub fn track_named<V: IntoView>(
&self,
name: &str,
view: V,
) -> impl IntoView + use<V>
pub fn track_named<V: IntoView>( &self, name: &str, view: V, ) -> impl IntoView + use<V>
Wrap a view to track when it receives clicks, with a name for identification.
The view will have on_click_stop added to it.
Sourcepub fn track_named_cont<V: IntoView>(
&self,
name: &str,
view: V,
) -> impl IntoView + use<V>
pub fn track_named_cont<V: IntoView>( &self, name: &str, view: V, ) -> impl IntoView + use<V>
Wrap a view to track when it receives clicks, with a name for identification.
The view will have on_click_cont added to it, allowing the event to bubble.
Sourcepub fn was_clicked(&self) -> bool
pub fn was_clicked(&self) -> bool
Returns true if any tracked view was clicked.
Sourcepub fn click_count(&self) -> usize
pub fn click_count(&self) -> usize
Returns the number of clicks recorded.
Sourcepub fn clicked(&self) -> Vec<Option<String>>
pub fn clicked(&self) -> Vec<Option<String>>
Returns the names of clicked views in order.
Views tracked without names will be represented as None.
Sourcepub fn clicked_names(&self) -> Vec<String>
pub fn clicked_names(&self) -> Vec<String>
Returns just the names of clicked views (ignoring unnamed ones).
Sourcepub fn track_double_click<V: IntoView>(
&self,
name: &str,
view: V,
) -> impl IntoView + use<V>
pub fn track_double_click<V: IntoView>( &self, name: &str, view: V, ) -> impl IntoView + use<V>
Wrap a view to track when it receives double clicks, with a name for identification.
The view will have on_double_click_stop added to it.
Sourcepub fn double_click_count(&self) -> usize
pub fn double_click_count(&self) -> usize
Returns the number of double clicks recorded.
Sourcepub fn double_clicked_names(&self) -> Vec<String>
pub fn double_clicked_names(&self) -> Vec<String>
Returns the names of double-clicked views in order.
Sourcepub fn track_secondary_click<V: IntoView>(
&self,
name: &str,
view: V,
) -> impl IntoView + use<V>
pub fn track_secondary_click<V: IntoView>( &self, name: &str, view: V, ) -> impl IntoView + use<V>
Wrap a view to track when it receives secondary (right) clicks, with a name.
The view will have on_secondary_click_stop added to it.
Sourcepub fn secondary_click_count(&self) -> usize
pub fn secondary_click_count(&self) -> usize
Returns the number of secondary (right) clicks recorded.
Sourcepub fn secondary_clicked_names(&self) -> Vec<String>
pub fn secondary_clicked_names(&self) -> Vec<String>
Returns the names of secondary-clicked views in order.
Trait Implementations§
Source§impl Clone for ClickTracker
impl Clone for ClickTracker
Source§fn clone(&self) -> ClickTracker
fn clone(&self) -> ClickTracker
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ClickTracker
impl Default for ClickTracker
Source§fn default() -> ClickTracker
fn default() -> ClickTracker
Auto Trait Implementations§
impl Freeze for ClickTracker
impl !RefUnwindSafe for ClickTracker
impl !Send for ClickTracker
impl !Sync for ClickTracker
impl Unpin for ClickTracker
impl UnsafeUnpin for ClickTracker
impl !UnwindSafe for ClickTracker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().