pub enum ScrollDelta {
PageDelta(f32, f32),
LineDelta(f32, f32),
PixelDelta(PhysicalPosition<f64>),
}
Expand description
Scroll delta.
Deltas are in a Y-down coordinate system, and represent a ‘navigation’ direction; a positive Y value means that the viewport should move downward relative to the content.
For mouse wheel events, only LineDelta
and PixelDelta
are typical.
For scroll deltas generated by scrollbars or other elements, PageDelta
may be used (for example, when clicking in the well of the scrollbar).
Variants§
Trait Implementations§
Source§impl Clone for ScrollDelta
impl Clone for ScrollDelta
Source§fn clone(&self) -> ScrollDelta
fn clone(&self) -> ScrollDelta
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 ScrollDelta
impl Debug for ScrollDelta
Source§impl PartialEq for ScrollDelta
impl PartialEq for ScrollDelta
impl Copy for ScrollDelta
impl StructuralPartialEq for ScrollDelta
Auto Trait Implementations§
impl Freeze for ScrollDelta
impl RefUnwindSafe for ScrollDelta
impl Send for ScrollDelta
impl Sync for ScrollDelta
impl Unpin for ScrollDelta
impl UnwindSafe for ScrollDelta
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