Gtk.GesturePan
Gtk.GesturePan — Pan gesture
Object Hierarchy:
GObject
╰── Gtk.EventController
╰── Gtk.Gesture
╰── Gtk.GestureSingle
╰── Gtk.GestureDrag
╰── Gtk.GesturePan
Functions:
- new
(widget:Gtk.Widget, orientation:Gtk.Orientation) -> Gtk.Gesture
- get_orientation
(self) -> Gtk.Orientation
- set_orientation
(self, orientation:Gtk.Orientation)
Signals:
- “pan”
(gesture, direction, offset, user_data)
Description:
Gtk.GesturePan
is a GtkGesture implementation able to recognize pan gestures, those are drags that are locked to happen along one axis. The axis that a Gtk.GesturePan
handles is defined at construct time, and can be changed through Gtk.GesturePan::set_orientation()
.
When the gesture starts to be recognized, Gtk.GesturePan
will attempt to determine as early as possible whether the sequence is moving in the expected direction, and denying the sequence if this does not happen.
Once a panning gesture along the expected axis is recognized, are received, containing the offset in the given axis.
Function Details:
new()
new (widget:Gtk.Widget, orientation:Gtk.Orientation) -> Gtk.Gesture
Returns a newly created Gtk.Gesture
that recognizes pan gestures.
Returns: a newly created Gtk.GesturePan
Since: 3.14
get_orientation()
get_orientation (self) -> Gtk.Orientation
Returns the orientation of the pan gestures that this gesture
expects.
Returns: the expected orientation for pan gestures
Since: 3.14
set_orientation()
set_orientation (self, orientation:Gtk.Orientation)
Sets the orientation to be expected on pan gestures.
- Since: 3.14