Enum speedy2d::window::MouseScrollDistance
source · [−]pub enum MouseScrollDistance {
Lines {
x: f64,
y: f64,
z: f64,
},
Pixels {
x: f64,
y: f64,
z: f64,
},
Pages {
x: f64,
y: f64,
z: f64,
},
}
Expand description
Describes a difference in the mouse scroll wheel position.
Variants
Lines
Fields
x: f64
The horizontal scroll distance. Negative values indicate scrolling left, and positive values indicate scrolling right.
y: f64
The vertical scroll distance. Negative values indicate scrolling down, and positive values indicate scrolling up.
z: f64
The forward/backward scroll distance, supported on some 3D mice.
Number of lines or rows to scroll in each direction. The y
field
represents the vertical scroll direction on a typical mouse wheel.
Pixels
Fields
x: f64
The horizontal scroll distance. Negative values indicate scrolling left, and positive values indicate scrolling right.
y: f64
The vertical scroll distance. Negative values indicate scrolling down, and positive values indicate scrolling up.
z: f64
The forward/backward scroll distance, supported on some 3D mice.
Number of pixels to scroll in each direction. Scroll events are
expressed in pixels if supported by the device (eg. a touchpad) and
platform. The y
field represents the vertical scroll direction on a
typical mouse wheel.
Pages
Fields
x: f64
The horizontal scroll distance. Negative values indicate scrolling left, and positive values indicate scrolling right.
y: f64
The vertical scroll distance. Negative values indicate scrolling down, and positive values indicate scrolling up.
z: f64
The forward/backward scroll distance, supported on some 3D mice.
Number of pages to scroll in each direction (only supported for
WebCanvas). The y
field represents the vertical scroll direction on a
typical mouse wheel.
Trait Implementations
sourceimpl Clone for MouseScrollDistance
impl Clone for MouseScrollDistance
sourcefn clone(&self) -> MouseScrollDistance
fn clone(&self) -> MouseScrollDistance
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MouseScrollDistance
impl Debug for MouseScrollDistance
sourceimpl PartialEq<MouseScrollDistance> for MouseScrollDistance
impl PartialEq<MouseScrollDistance> for MouseScrollDistance
sourcefn eq(&self, other: &MouseScrollDistance) -> bool
fn eq(&self, other: &MouseScrollDistance) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Copy for MouseScrollDistance
impl StructuralPartialEq for MouseScrollDistance
Auto Trait Implementations
impl RefUnwindSafe for MouseScrollDistance
impl Send for MouseScrollDistance
impl Sync for MouseScrollDistance
impl Unpin for MouseScrollDistance
impl UnwindSafe for MouseScrollDistance
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more