
Gnome::Gtk4::GesturePan
Description
Gnome::Gtk4::GesturePan is a Gnome::Gtk4::Gesture for pan gestures.
These are drags that are locked to happen along one axis. The axis that a Gnome::Gtk4::GesturePan handles is defined at construct time, and can be changed through .set-orientation().
When the gesture starts to be recognized, Gnome::Gtk4::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, the pan signal will be emitted as input events are received, containing the offset in the given axis.
Uml Diagram

Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
new-gesturepan
Returns a newly created Gnome::Gtk4::Gesture that recognizes pan gestures.
method new-gesturepan ( GtkOrientation $orientation --> Gnome::Gtk4::GesturePan )
$orientation; expected orientation.
Methods
get-orientation
Returns the orientation of the pan gestures that this $gesture expects.
method get-orientation (--> GtkOrientation )
Return value; the expected orientation for pan gestures.
set-orientation
Sets the orientation to be expected on pan gestures.
method set-orientation ( GtkOrientation $orientation )
$orientation; expected orientation.
Signals
pan
Emitted once a panning gesture along the expected axis is detected.
method handler ( $direction, gdouble $offset, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::GesturePan :$_widget, *%user-options )
$direction; current direction of the pan gesture.
$offset; Offset along the gesture orientation.
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This is a native Gnome::Gtk4::GesturePan object.
%user-options; A list of named arguments provided by .register-signal() in class Object.
About all my projects