pub struct UseMouseOptions<El, T, Ex>where
El: Clone + Into<ElementMaybeSignal<T, EventTarget>>,
T: Into<EventTarget> + Clone + 'static,
Ex: UseMouseEventExtractor + Clone,{ /* private fields */ }
Expand description
Options for use_mouse_with_options
.
Implementations§
Source§impl<El, T, Ex> UseMouseOptions<El, T, Ex>where
El: Clone + Into<ElementMaybeSignal<T, EventTarget>>,
T: Into<EventTarget> + Clone + 'static,
Ex: UseMouseEventExtractor + Clone,
impl<El, T, Ex> UseMouseOptions<El, T, Ex>where
El: Clone + Into<ElementMaybeSignal<T, EventTarget>>,
T: Into<EventTarget> + Clone + 'static,
Ex: UseMouseEventExtractor + Clone,
Sourcepub fn coord_type<New__Ex>(
self,
value: UseMouseCoordType<New__Ex>,
) -> UseMouseOptions<El, T, New__Ex>where
El: Clone + Into<ElementMaybeSignal<T, EventTarget>>,
T: Into<EventTarget> + Clone + 'static,
New__Ex: UseMouseEventExtractor + Clone,
pub fn coord_type<New__Ex>(
self,
value: UseMouseCoordType<New__Ex>,
) -> UseMouseOptions<El, T, New__Ex>where
El: Clone + Into<ElementMaybeSignal<T, EventTarget>>,
T: Into<EventTarget> + Clone + 'static,
New__Ex: UseMouseEventExtractor + Clone,
How to extract the x, y coordinates from mouse events or touches
Sourcepub fn target<New__El, New__T>(
self,
value: New__El,
) -> UseMouseOptions<New__El, New__T, Ex>where
New__El: Clone + Into<ElementMaybeSignal<New__T, EventTarget>>,
New__T: Into<EventTarget> + Clone + 'static,
Ex: UseMouseEventExtractor + Clone,
pub fn target<New__El, New__T>(
self,
value: New__El,
) -> UseMouseOptions<New__El, New__T, Ex>where
New__El: Clone + Into<ElementMaybeSignal<New__T, EventTarget>>,
New__T: Into<EventTarget> + Clone + 'static,
Ex: UseMouseEventExtractor + Clone,
Listen events on target
element. Defaults to window
Sourcepub fn reset_on_touch_ends(self, value: bool) -> Self
pub fn reset_on_touch_ends(self, value: bool) -> Self
Reset to initial value when touchend
event fired. Defaults to false
Sourcepub fn initial_value(self, value: Position) -> Self
pub fn initial_value(self, value: Position) -> Self
Initial values. Defaults to {x: 0.0, y: 0.0}
.
Trait Implementations§
Auto Trait Implementations§
impl<El, T, Ex> Freeze for UseMouseOptions<El, T, Ex>
impl<El, T, Ex> RefUnwindSafe for UseMouseOptions<El, T, Ex>
impl<El, T, Ex> Send for UseMouseOptions<El, T, Ex>
impl<El, T, Ex> Sync for UseMouseOptions<El, T, Ex>
impl<El, T, Ex> Unpin for UseMouseOptions<El, T, Ex>
impl<El, T, Ex> UnwindSafe for UseMouseOptions<El, T, Ex>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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