pub struct MouseWheelArgs {
pub timestamp: DInstant,
pub window_id: WindowId,
pub device_id: InputDeviceId,
pub position: DipPoint,
pub modifiers: ModifiersState,
pub delta: MouseScrollDelta,
pub phase: TouchPhase,
pub hits: HitTestInfo,
pub target: InteractionPath,
/* private fields */
}Expand description
MOUSE_WHEEL_EVENT arguments.
Fields§
§timestamp: DInstantInstant the event happened.
window_id: WindowIdId of window that received the event.
device_id: InputDeviceIdId of device that generated the event.
position: DipPointPosition of the mouse in the coordinates of target.
modifiers: ModifiersStateWhat modifier keys where pressed when this event happened.
delta: MouseScrollDeltaWheel motion delta, value is in pixels if the wheel is a touchpad.
phase: TouchPhaseTouch state if the device that generated the event is a touchpad.
hits: HitTestInfoHit-test result for the mouse point in the window, at the moment the wheel event was generated.
target: InteractionPathFull path to the widget that got scrolled.
Implementations§
Source§impl MouseWheelArgs
impl MouseWheelArgs
Sourcepub fn new(
timestamp: impl Into<DInstant>,
propagation_handle: EventPropagationHandle,
window_id: impl Into<WindowId>,
device_id: impl Into<InputDeviceId>,
position: impl Into<DipPoint>,
modifiers: impl Into<ModifiersState>,
delta: impl Into<MouseScrollDelta>,
phase: impl Into<TouchPhase>,
hits: impl Into<HitTestInfo>,
target: impl Into<InteractionPath>,
) -> Self
pub fn new( timestamp: impl Into<DInstant>, propagation_handle: EventPropagationHandle, window_id: impl Into<WindowId>, device_id: impl Into<InputDeviceId>, position: impl Into<DipPoint>, modifiers: impl Into<ModifiersState>, delta: impl Into<MouseScrollDelta>, phase: impl Into<TouchPhase>, hits: impl Into<HitTestInfo>, target: impl Into<InteractionPath>, ) -> Self
New args from values that convert into the argument types.
Sourcepub fn now(
window_id: impl Into<WindowId>,
device_id: impl Into<InputDeviceId>,
position: impl Into<DipPoint>,
modifiers: impl Into<ModifiersState>,
delta: impl Into<MouseScrollDelta>,
phase: impl Into<TouchPhase>,
hits: impl Into<HitTestInfo>,
target: impl Into<InteractionPath>,
) -> Self
pub fn now( window_id: impl Into<WindowId>, device_id: impl Into<InputDeviceId>, position: impl Into<DipPoint>, modifiers: impl Into<ModifiersState>, delta: impl Into<MouseScrollDelta>, phase: impl Into<TouchPhase>, hits: impl Into<HitTestInfo>, target: impl Into<InteractionPath>, ) -> Self
Arguments for event that happened now (INSTANT.now).
Source§impl MouseWheelArgs
impl MouseWheelArgs
Sourcepub fn shifted_delta(&self) -> MouseScrollDelta
pub fn shifted_delta(&self) -> MouseScrollDelta
Swaps the delta axis if modifiers contains SHIFT.
Sourcepub fn is_scroll(&self) -> bool
pub fn is_scroll(&self) -> bool
If the modifiers allow the event to be used for scrolling.
Is true if only SHIFT, ALT or none modifiers are pressed. If true the
scroll_delta method returns a value.
If contextual CTRL_SCROLL_VAR is true the CTRL modifier must be pressed for this to be true.
Sourcepub fn scroll_delta(
&self,
alt_factor: impl Into<Factor>,
) -> Option<MouseScrollDelta>
pub fn scroll_delta( &self, alt_factor: impl Into<Factor>, ) -> Option<MouseScrollDelta>
Sourcepub fn is_zoom(&self) -> bool
pub fn is_zoom(&self) -> bool
If the modifiers allow the event to be used for zooming.
Is true if only CTRL is pressed. If true the zoom_delta method returns a value.
If contextual CTRL_SCROLL_VAR is true no modifiers must be pressed for this to be true.
Sourcepub fn zoom_delta(&self) -> Option<MouseScrollDelta>
pub fn zoom_delta(&self) -> Option<MouseScrollDelta>
Sourcepub fn position_wgt(&self) -> Option<PxPoint>
pub fn position_wgt(&self) -> Option<PxPoint>
Gets position in the widget inner bounds.
Trait Implementations§
Source§impl AnyEventArgs for MouseWheelArgs
impl AnyEventArgs for MouseWheelArgs
Source§fn delivery_list(&self, list: &mut UpdateDeliveryList)
fn delivery_list(&self, list: &mut UpdateDeliveryList)
The target.
Source§fn clone_any(&self) -> Box<dyn AnyEventArgs>
fn clone_any(&self) -> Box<dyn AnyEventArgs>
Source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
Source§impl Clone for MouseWheelArgs
impl Clone for MouseWheelArgs
Source§fn clone(&self) -> MouseWheelArgs
fn clone(&self) -> MouseWheelArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MouseWheelArgs
impl Debug for MouseWheelArgs
Auto Trait Implementations§
impl Freeze for MouseWheelArgs
impl RefUnwindSafe for MouseWheelArgs
impl Send for MouseWheelArgs
impl Sync for MouseWheelArgs
impl Unpin for MouseWheelArgs
impl UnwindSafe for MouseWheelArgs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more