Gtk.Gesture_Pan.Gtk_Gesture_Pan is a Gtk.Gesture.Gtk_Gesture implementation able to recognize pan gestures, those are drags that are locked to happen along one axis. The axis that a Gtk.Gesture_Pan.Gtk_Gesture_Pan handles is defined at construct time, and can be changed through Gtk.Gesture_Pan.Set_Orientation.
When the gesture starts to be recognized, Gtk.Gesture_Pan.Gtk_Gesture_Pan 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 Gtk.Gesture_Pan.Gtk_Gesture_Pan::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. Since: gtk+ 3.14
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
(Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class;
Orientation : Gtk.Enums.Gtk_Orientation) return Gtk_Gesture_Pan
Returns a newly created Gtk.Gesture.Gtk_Gesture that recognizes pan gestures. Since: gtk+ 3.14
a Gtk.Widget.Gtk_Widget
expected orientation
type Gtk_Gesture_Pan_Record is new Gtk_Gesture_Drag_Record with null record;
procedure Gtk_New
(Self : out Gtk_Gesture_Pan;
Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class;
Orientation : Gtk.Enums.Gtk_Orientation)
Returns a newly created Gtk.Gesture.Gtk_Gesture that recognizes pan gestures. Since: gtk+ 3.14 Initialize does nothing if the object was already created with another call to Initialize* or G_New.
a Gtk.Widget.Gtk_Widget
expected orientation
procedure Initialize
(Self : not null access Gtk_Gesture_Pan_Record'Class;
Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class;
Orientation : Gtk.Enums.Gtk_Orientation)
Returns a newly created Gtk.Gesture.Gtk_Gesture that recognizes pan gestures. Since: gtk+ 3.14 Initialize does nothing if the object was already created with another call to Initialize* or G_New.
a Gtk.Widget.Gtk_Widget
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)
This signal is 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)
This signal is 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. Since: gtk+ 3.14
expected orientation
Signal_Pan : constant Glib.Signal_Name := "pan";
This signal is 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