GesturePan

GtkGesturePan is a GtkGesture for 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 [method@Gtk.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 [signal@Gtk.GesturePan::pan] signal will be emitted as input events are received, containing the offset in the given axis.

Constructors

this
this(GtkGesturePan* gtkGesturePan, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(GtkOrientation orientation)

Returns a newly created GtkGesture that recognizes pan gestures.

Members

Functions

addOnPan
gulong addOnPan(void delegate(GtkPanDirection, double, GesturePan) dlg, ConnectFlags connectFlags)

Emitted once a panning gesture along the expected axis is detected.

getGesturePanStruct
GtkGesturePan* getGesturePanStruct(bool transferOwnership)

Get the main Gtk struct

getOrientation
GtkOrientation getOrientation()

Returns the orientation of the pan gestures that this @gesture expects.

getStruct
void* getStruct()

the main Gtk struct as a void*

setOrientation
void setOrientation(GtkOrientation orientation)

Sets the orientation to be expected on pan gestures.

Static functions

getType
GType getType()

Variables

gtkGesturePan
GtkGesturePan* gtkGesturePan;

the main Gtk struct

Inherited Members

From GestureDrag

gtkGestureDrag
GtkGestureDrag* gtkGestureDrag;

the main Gtk struct

getGestureDragStruct
GtkGestureDrag* getGestureDragStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getOffset
bool getOffset(double x, double y)

Gets the offset from the start point.

getStartPoint
bool getStartPoint(double x, double y)

Gets the point where the drag started.

addOnDragBegin
gulong addOnDragBegin(void delegate(double, double, GestureDrag) dlg, ConnectFlags connectFlags)

Emitted whenever dragging starts.

addOnDragEnd
gulong addOnDragEnd(void delegate(double, double, GestureDrag) dlg, ConnectFlags connectFlags)

Emitted whenever the dragging is finished.

addOnDragUpdate
gulong addOnDragUpdate(void delegate(double, double, GestureDrag) dlg, ConnectFlags connectFlags)

Emitted whenever the dragging point moves.

Meta