Struct gdk4::ScrollEvent [−][src]
pub struct ScrollEvent(_);
Expand description
An event related to a scrolling motion.
Implementations
Extracts the scroll deltas of a scroll event.
The deltas will be zero unless the scroll direction
is ScrollDirection::Smooth
.
Returns
delta_x
return location for x scroll delta
delta_y
return location for y scroll delta
Check whether a scroll event is a stop scroll event.
Scroll sequences with smooth scroll information may provide a stop scroll event once the interaction with the device finishes, e.g. by lifting a finger. This stop scroll event is the signal that a widget may trigger kinetic scrolling based on the current velocity.
Stop scroll events always have a delta of 0/0.
Returns
true
if the event is a scroll stop event
Methods from Deref<Target = Event>
Retrieves the history of the device that self
is for, as a list of
time and coordinates.
The history includes positions that are not delivered as separate events
to the application because they occurred in the same frame as self
.
Note that only motion and scroll events record history, and motion events do it only if one of the mouse buttons is down.
Returns
an array of time and coordinates
Returns the timestamp of self
.
Not all events have timestamps. In that case, this function
returns GDK_CURRENT_TIME
.
Returns
timestamp field from self
Returns whether a Event
should trigger a context menu,
according to platform conventions.
The right mouse button typically triggers context menus.
This function should always be used instead of simply checking for
event->button == GDK_BUTTON_SECONDARY
.
Returns
true
if the event should trigger a context menu.
Trait Implementations
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for ScrollEvent
impl !Send for ScrollEvent
impl !Sync for ScrollEvent
impl Unpin for ScrollEvent
impl UnwindSafe for ScrollEvent
Blanket Implementations
Mutably borrows from an owned value. Read more