It derives from <GtkEventController>.
Handles scroll events.
It is capable of handling both discrete and continuous scroll events
from mice or touchpads, abstracting them both with the
event-controller-scroll:scroll signal. Deltas in the discrete
case are multiples of 1.
In the case of continuous scroll events,
<GtkEventControllerScroll> encloses
all event-controller-scroll:scroll emissions between two
event-controller-scroll:scroll-begin and
event-controller-scroll:scroll-end signals.
The behavior of the event controller can be modified by the flags given
at creation time, or modified at a later point through
event-controller-scroll:set-flags (e.g. because the
scrolling conditions of the widget changed).
The controller can be set up to emit motion for either/both vertical and
horizontal scroll events through
vertical,
horizontal and
both-axes. If any axis is
disabled, the respective event-controller-scroll:scroll delta will be 0. Vertical
scroll events will be translated to horizontal motion for the devices
incapable of horizontal scrolling.
The event controller can also be forced to emit discrete events on all
devices through discrete. This
can be used to implement discrete actions triggered through scroll
events (e.g. switching across combobox options).
The kinetic flag toggles the
emission of the event-controller-scroll:decelerate signal, emitted at the
end of scrolling with two X/Y velocity arguments that are consistent
with the motion that was received.
The flags affecting event controller behavior.
Its value is a
<GtkEventControllerScrollFlags>
(or, to set it, a list of its symbols, or one of them).
Set it with (set! (event-controller-scroll:flags self) value).
Gets the flags conditioning the scroll controller behavior.
Passed: a
<GtkEventControllerScroll>.
Returned: a
<GtkEventControllerScrollFlags>.
the controller flags.
Gets the scroll unit of the last event-controller-scroll:scroll signal received.
Always returns wheel if the
discrete flag is set.
Passed: a
<GtkEventControllerScroll>.
Returned: a <GdkScrollUnit>.
the scroll unit.
Creates a new event controller that will handle scroll events.
Passed: a
<GtkEventControllerScrollFlags>,
or a list of its symbols, or one of them.
flags affecting the controller behavior
Returned: a <GtkEventController>.
Sets the flags conditioning scroll controller behavior.
Passed: a
<GtkEventControllerScroll>.
Passed: a
<GtkEventControllerScrollFlags>,
or a list of its symbols, or one of them.
flags affecting the controller behavior
Connect a handler with (connect object
event-controller-scroll:decelerate handler). It is called as
(handler self vel-x vel-y).
Emitted after scroll is finished if the
kinetic flag is set.
vel-x and vel-y express the initial velocity that was imprinted by the scroll events. vel-x and vel-y are expressed in pixels/ms.
Passed: a
<GtkEventControllerScroll>.
Passed: a real number.
X velocity
Passed: a real number.
Y velocity
Connect a handler with (connect object
event-controller-scroll:scroll handler). It is called as
(handler self dx dy) ⇒ %return.
Signals that the widget should scroll by the amount specified by dx and dy.
For the representation unit of the deltas, see
event-controller-scroll:get-unit.
Passed: a
<GtkEventControllerScroll>.
Passed: a real number.
X delta
Passed: a real number.
Y delta
Returned: a boolean.
#t if the scroll event was handled, #f otherwise.
Connect a handler with (connect object
event-controller-scroll:scroll-begin handler). It is called as
(handler self).
Signals that a new scrolling operation has begun.
It will only be emitted on devices capable of it.
Passed: a
<GtkEventControllerScroll>.
Connect a handler with (connect object
event-controller-scroll:scroll-end handler). It is called as
(handler self).
Signals that a scrolling operation has finished.
It will only be emitted on devices capable of it.
Passed: a
<GtkEventControllerScroll>.