Enum nannou::event::MouseScrollDelta
source · pub enum MouseScrollDelta {
LineDelta(f32, f32),
PixelDelta(PhysicalPosition<f64>),
}
Expand description
Describes a difference in the mouse scroll wheel state.
Variants§
LineDelta(f32, f32)
Amount in lines or rows to scroll in the horizontal and vertical directions.
Positive values indicate that the content that is being scrolled should move right and down (revealing more content left and up).
PixelDelta(PhysicalPosition<f64>)
Amount in pixels to scroll in the horizontal and vertical direction.
Scroll events are expressed as a PixelDelta
if
supported by the device (eg. a touchpad) and
platform.
Positive values indicate that the content being scrolled should move right/down.
For a ‘natural scrolling’ touch pad (that acts like a touch screen) this means moving your fingers right and down should give positive values, and move the content right and down (to reveal more things left and up).
Trait Implementations§
source§impl Clone for MouseScrollDelta
impl Clone for MouseScrollDelta
source§fn clone(&self) -> MouseScrollDelta
fn clone(&self) -> MouseScrollDelta
Returns a copy 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 MouseScrollDelta
impl Debug for MouseScrollDelta
source§impl PartialEq for MouseScrollDelta
impl PartialEq for MouseScrollDelta
source§fn eq(&self, other: &MouseScrollDelta) -> bool
fn eq(&self, other: &MouseScrollDelta) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for MouseScrollDelta
impl StructuralPartialEq for MouseScrollDelta
Auto Trait Implementations§
impl RefUnwindSafe for MouseScrollDelta
impl Send for MouseScrollDelta
impl Sync for MouseScrollDelta
impl Unpin for MouseScrollDelta
impl UnwindSafe for MouseScrollDelta
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds
error is returned which contains the unclamped color. Read more