pub struct ViewGestures {
pub wheel: [ViewAction; 8],
pub scroll: [ViewAction; 8],
pub pinch: [ViewAction; 8],
pub click: [[ViewAction; 5]; 8],
pub double_click: [[ViewAction; 5]; 8],
pub drag_pan: [[bool; 5]; 8],
}Expand description
A view’s pointer gestures: per set of modifiers (index), what
the wheel, a scroll and a pinch do, what a click and a double click
of each button do, and which buttons’ drags pan.
Fields§
§wheel: [ViewAction; 8]§scroll: [ViewAction; 8]§pinch: [ViewAction; 8]§click: [[ViewAction; 5]; 8]Per set of modifiers, per button (Button::ALL’s order).
double_click: [[ViewAction; 5]; 8]§drag_pan: [[bool; 5]; 8]Implementations§
Source§impl ViewGestures
impl ViewGestures
Sourcepub fn from_map(map: &PointerMap, scope: &str) -> ViewGestures
pub fn from_map(map: &PointerMap, scope: &str) -> ViewGestures
A scope’s bindings in a pointer map.
Sourcepub fn wheel_action(&self, input: &WheelInput) -> ViewAction
pub fn wheel_action(&self, input: &WheelInput) -> ViewAction
What a wheel, scroll or pinch input does.
Sourcepub fn drag_pans(&self, b: PointerButton, modifiers: Modifiers) -> bool
pub fn drag_pans(&self, b: PointerButton, modifiers: Modifiers) -> bool
Whether a drag of this button with these modifiers pans.
Sourcepub fn click_action(&self, b: PointerButton, modifiers: Modifiers) -> ViewAction
pub fn click_action(&self, b: PointerButton, modifiers: Modifiers) -> ViewAction
What a click of this button with these modifiers does.
Sourcepub fn double_click_action(
&self,
b: PointerButton,
modifiers: Modifiers,
) -> ViewAction
pub fn double_click_action( &self, b: PointerButton, modifiers: Modifiers, ) -> ViewAction
What a double click of this button with these modifiers does.
Trait Implementations§
Source§impl Clone for ViewGestures
impl Clone for ViewGestures
Source§fn clone(&self) -> ViewGestures
fn clone(&self) -> ViewGestures
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ViewGestures
impl Debug for ViewGestures
Source§impl Default for ViewGestures
impl Default for ViewGestures
Source§fn default() -> ViewGestures
fn default() -> ViewGestures
Returns the “default value” for a type. Read more
Source§impl PartialEq for ViewGestures
impl PartialEq for ViewGestures
impl Copy for ViewGestures
impl Eq for ViewGestures
impl StructuralPartialEq for ViewGestures
Auto Trait Implementations§
impl Freeze for ViewGestures
impl RefUnwindSafe for ViewGestures
impl Send for ViewGestures
impl Sync for ViewGestures
impl Unpin for ViewGestures
impl UnsafeUnpin for ViewGestures
impl UnwindSafe for ViewGestures
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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