GesturePan

#GtkGesturePan is a #GtkGesture implementation able to recognize pan gestures, those 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 gtk.gesture_pan.GesturePan.setOrientation.

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 #GtkGesturePan::pan signal will be emitted as input events are received, containing the offset in the given axis.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(gtk.widget.Widget widget, gtk.types.Orientation orientation)

Returns a newly created #GtkGesture that recognizes pan gestures.

Members

Functions

connectPan
gulong connectPan(T callback, Flag!"After" after)

Connect to Pan signal.

getOrientation
gtk.types.Orientation getOrientation()

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

self
GesturePan self()

Returns this, for use in with statements.

setOrientation
void setOrientation(gtk.types.Orientation orientation)

Sets the orientation to be expected on pan gestures.

Properties

_gType
GType _gType [@property getter]
orientation
gtk.types.Orientation orientation [@property getter]

Get orientation property.

orientation
gtk.types.Orientation orientation [@property setter]

Set orientation property.

Static functions

_getGType
GType _getGType()
builder
GesturePanGidBuilder builder()

Get builder for gtk.gesture_pan.GesturePan

Inherited Members

From GestureDrag

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
GestureDrag self()

Returns this, for use in with statements.

builder
GestureDragGidBuilder builder()

Get builder for gtk.gesture_drag.GestureDrag

getOffset
bool getOffset(double x, double y)

If the gesture is active, this function returns true and fills in x and y with the coordinates of the current point, as an offset to the starting drag point.

getStartPoint
bool getStartPoint(double x, double y)

If the gesture is active, this function returns true and fills in x and y with the drag start coordinates, in window-relative coordinates.

connectDragBegin
gulong connectDragBegin(T callback, Flag!"After" after)

Connect to DragBegin signal.

connectDragEnd
gulong connectDragEnd(T callback, Flag!"After" after)

Connect to DragEnd signal.

connectDragUpdate
gulong connectDragUpdate(T callback, Flag!"After" after)

Connect to DragUpdate signal.