Enum winit::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
impl Copy for MouseScrollDelta
impl StructuralPartialEq for MouseScrollDelta
Auto Trait Implementations§
impl Freeze for MouseScrollDelta
impl RefUnwindSafe for MouseScrollDelta
impl Send for MouseScrollDelta
impl Sync for MouseScrollDelta
impl Unpin for MouseScrollDelta
impl UnwindSafe for MouseScrollDelta
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.