Recognizes pan gestures.
These are drags that are locked to happen along one axis. The axis that a GtkGesturePan handles is defined at construct time, and can be changed through [methodGtk.GesturePan.set_orientation].
When the gesture starts to be recognized, GtkGesturePan 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 [signalGtk.GesturePan::pan] signal will be emitted as input events are received, containing the offset in the given axis.
type Cb_GObject_Gtk_Pan_Direction_Gdouble_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Direction : Gtk.Enums.Gtk_Pan_Direction;
Offset : Gdouble);
type Cb_Gtk_Gesture_Pan_Gtk_Pan_Direction_Gdouble_Void is not null access procedure
(Self : access Gtk_Gesture_Pan_Record'Class;
Direction : Gtk.Enums.Gtk_Pan_Direction;
Offset : Gdouble);
function Get_Orientation
(Self : not null access Gtk_Gesture_Pan_Record)
return Gtk.Enums.Gtk_Orientation
Returns the orientation of the pan gestures that this Gesture expects.
the expected orientation for pan gestures
function Get_Type return Glib.GType
type Gtk_Gesture_Pan is access all Gtk_Gesture_Pan_Record'Class;
function Gtk_Gesture_Pan_New
(Orientation : Gtk.Enums.Gtk_Orientation) return Gtk_Gesture_Pan
Returns a newly created GtkGesture that recognizes pan gestures.
expected orientation
type Gtk_Gesture_Pan_Record is new Gtk_Gesture_Drag_Record with null record;
procedure Gtk_New
(Self : out Gtk_Gesture_Pan;
Orientation : Gtk.Enums.Gtk_Orientation)
Returns a newly created GtkGesture that recognizes pan gestures. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
expected orientation
procedure Initialize
(Self : not null access Gtk_Gesture_Pan_Record'Class;
Orientation : Gtk.Enums.Gtk_Orientation)
Returns a newly created GtkGesture that recognizes pan gestures. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
expected orientation
procedure On_Pan
(Self : not null access Gtk_Gesture_Pan_Record;
Call : Cb_GObject_Gtk_Pan_Direction_Gdouble_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted once a panning gesture along the expected axis is detected.
Callback parameters: -- @param Direction current direction of the pan gesture -- @param Offset Offset along the gesture orientation
procedure On_Pan
(Self : not null access Gtk_Gesture_Pan_Record;
Call : Cb_Gtk_Gesture_Pan_Gtk_Pan_Direction_Gdouble_Void;
After : Boolean := False)
Emitted once a panning gesture along the expected axis is detected.
Callback parameters: -- @param Direction current direction of the pan gesture -- @param Offset Offset along the gesture orientation
Orientation_Property : constant Gtk.Enums.Property_Gtk_Orientation;
The expected orientation of pan gestures.
procedure Set_Orientation
(Self : not null access Gtk_Gesture_Pan_Record;
Orientation : Gtk.Enums.Gtk_Orientation)
Sets the orientation to be expected on pan gestures.
expected orientation
Signal_Pan : constant Glib.Signal_Name := "pan";
Emitted once a panning gesture along the expected axis is detected.
Callback parameters: -- @param Direction current direction of the pan gesture -- @param Offset Offset along the gesture orientation