Gtk.Gesture_Pan

Entities

Tagged Types

Access Types

Constants

Subprograms

Description

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.

Cb_GObject_Gtk_Pan_Direction_Gdouble_Void

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);
Parameters
Self
Direction
Offset

Cb_Gtk_Gesture_Pan_Gtk_Pan_Direction_Gdouble_Void

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);
Parameters
Self
Direction
Offset

Get_Orientation

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

Parameters
Self
Return Value

the expected orientation for pan gestures

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Gesture_Pan

type Gtk_Gesture_Pan is access all Gtk_Gesture_Pan_Record'Class;

Gtk_Gesture_Pan_New

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

Parameters
Widget

a Gtk.Widget.Gtk_Widget

Orientation

expected orientation

Return Value

Gtk_Gesture_Pan_Record

type Gtk_Gesture_Pan_Record is new Gtk_Gesture_Drag_Record with null record;

Gtk_New

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.

Parameters
Self
Widget

a Gtk.Widget.Gtk_Widget

Orientation

expected orientation

Initialize

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.

Parameters
Self
Widget

a Gtk.Widget.Gtk_Widget

Orientation

expected orientation

On_Pan

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

Parameters
Self
Call
Slot
After

On_Pan

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

Parameters
Self
Call
After

Orientation_Property

Orientation_Property : constant Gtk.Enums.Property_Gtk_Orientation;

The expected orientation of pan gestures.

Set_Orientation

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

Parameters
Self
Orientation

expected orientation

Signal_Pan

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