pub struct MouseWheel {
pub delta: Vec2,
pub position: Vec2,
pub local: Option<Vec2>,
}Expand description
Mouse-wheel scroll event. delta is in logical pixels and follows the DOM
WheelEvent convention: positive y scrolls toward the end of the content
(the wheel turned toward the user), positive x toward the right.
Backends normalise line-based wheel input to pixels with a fixed 32 px/line.
Fields§
§delta: Vec2Scroll delta in logical pixels.
position: Vec2Cursor position at the moment of the scroll, used for hit-testing.
local: Option<Vec2>The position relative to the target’s border box, when the backend
measured that box itself: a page asks the browser, which lays it out.
None leaves it to Lumen’s own layout, which is what a native window
backend does.
Trait Implementations§
Source§impl Clone for MouseWheel
impl Clone for MouseWheel
Source§fn clone(&self) -> MouseWheel
fn clone(&self) -> MouseWheel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MouseWheel
impl Debug for MouseWheel
impl Copy for MouseWheel
impl Message for MouseWheel
Auto Trait Implementations§
impl Freeze for MouseWheel
impl RefUnwindSafe for MouseWheel
impl Send for MouseWheel
impl Sync for MouseWheel
impl Unpin for MouseWheel
impl UnsafeUnpin for MouseWheel
impl UnwindSafe for MouseWheel
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<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.