EventControllerScroll


Object Hierarchy:

Gtk.EventControllerScroll Gtk.EventControllerScroll Gtk.EventControllerScroll Gtk.EventController Gtk.EventController Gtk.EventController->Gtk.EventControllerScroll GLib.Object GLib.Object GLib.Object->Gtk.EventController

Description:

[ CCode ( type_id = "gtk_event_controller_scroll_get_type ()" ) ]
public class EventControllerScroll : EventController

`GtkEventControllerScroll` is an event controller that handles scroll events.

It is capable of handling both discrete and continuous scroll events from mice or touchpads, abstracting them both with the [ [email protected]:GtkEventControllerScroll:scroll] signal. Deltas in the discrete case are multiples of 1.

In the case of continuous scroll events, `GtkEventControllerScroll` encloses all [[email protected]: GtkEventControllerScroll:scroll] emissions between two [[email protected]: GtkEventControllerScroll:scroll-begin] and [[email protected]:GtkEventControllerScroll: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 [ [email protected]_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 gtk_event_controller_scroll_vertical, gtk_event_controller_scroll_horizontal and gtk_event_controller_scroll_both_axes. If any axis is disabled, the respective [ [email protected]:GtkEventControllerScroll: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 gtk_event_controller_scroll_discrete. This can be used to implement discrete actions triggered through scroll events (e.g. switching across combobox options).

The gtk_event_controller_scroll_kinetic flag toggles the emission of the [ [email protected]:GtkEventControllerScroll:decelerate] signal, emitted at the end of scrolling with two X/Y velocity arguments that are consistent with the motion that was received.


Namespace: Gtk
Package: gtk4

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class GLib.Object



2022 vala-language.org