Class: Gdk::ScrollEvent
Overview
An event related to a scrolling motion.
Constant Summary
Constants inherited from Event
Instance Method Summary collapse
-
#direction ⇒ Gdk::ScrollDirection
Extracts the direction of a scroll event.
-
#get_deltas(delta_x, delta_y) ⇒ nil
Extracts the scroll deltas of a scroll event.
-
#is_stop ⇒ Boolean
Check whether a scroll event is a stop scroll event.
-
#unit ⇒ Gdk::ScrollUnit
Extracts the scroll delta unit of a scroll event.
Methods inherited from Event
#_get_angle, #_get_center, #_get_distance, #device, #device_tool, #display, #event_sequence, #event_type, #get_axes, #get_axis, #get_history, #get_position, #modifier_state, #pointer_emulated, #ref, #seat, #send_event?, #surface, #time, #triggers_context_menu, #unref
Instance Method Details
#direction ⇒ Gdk::ScrollDirection
Extracts the direction of a scroll event.
#get_deltas(delta_x, delta_y) ⇒ nil
Extracts the scroll deltas of a scroll event.
The deltas will be zero unless the scroll direction is %GDK_SCROLL_SMOOTH.
For the representation unit of these deltas, see [methodGdk.ScrollEvent.get_unit].
#is_stop ⇒ Boolean
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.
#unit ⇒ Gdk::ScrollUnit
Extracts the scroll delta unit of a scroll event.
The unit will always be %GDK_SCROLL_UNIT_WHEEL if the scroll direction is not %GDK_SCROLL_SMOOTH.