GesturePan#
Superclasses: GestureDrag
, GestureSingle
, Gesture
, EventController
, Object
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 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 pan
signal will be emitted as input
events are received, containing the offset in the given axis.
Constructors#
- class GesturePan
- classmethod new(orientation: Orientation) Gesture #
Returns a newly created
GtkGesture
that recognizes pan gestures.- Parameters:
orientation – expected orientation
Methods#
- class GesturePan
- get_orientation() Orientation #
Returns the orientation of the pan gestures that this
gesture
expects.
- set_orientation(orientation: Orientation) None #
Sets the orientation to be expected on pan gestures.
- Parameters:
orientation – expected orientation
Properties#
- class GesturePan
- props.orientation: Orientation#
The type of the None singleton.
Signals#
- class GesturePan.signals
- pan(direction: PanDirection, offset: float) None #
The type of the None singleton.
- Parameters:
direction – current direction of the pan gesture
offset – Offset along the gesture orientation