Gtk.GesturePan¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | Gtk.GestureDrag (3), Gtk.GestureSingle (8), Gtk.Gesture (19), Gtk.EventController (5), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(widget, orientation) | 
| get_orientation() | |
| set_orientation(orientation) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
| Inherited: | Gtk.GestureSingle (3), Gtk.Gesture (2), Gtk.EventController (2) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| orientation | Gtk.Orientation | r/w/en | Allowed orientations | 
Signals¶
| Inherited: | Gtk.GestureDrag (3), Gtk.Gesture (5), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| pan | This signal is emitted once a panning gesture along the expected axis is detected. | 
Fields¶
| Inherited: | Gtk.GestureDrag (3), Gtk.Gesture (5), GObject.Object (1) | 
|---|
Class Details¶
- 
class Gtk.GesturePan(**kwargs)¶
- Bases: - Gtk.GestureDrag- Abstract: - No - Structure: - Gtk.GesturePanClass- Gtk.GesturePanis a- Gtk.Gestureimplementation able to recognize pan gestures, those are drags that are locked to happen along one axis. The axis that a- Gtk.GesturePanhandles is defined at construct time, and can be changed through- Gtk.GesturePan.set_orientation().- When the gesture starts to be recognized, - Gtk.GesturePanwill 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.GesturePan- ::pansignal will be emitted as input events are received, containing the offset in the given axis.- 
classmethod new(widget, orientation)[source]¶
- Parameters: - widget (Gtk.Widget) – aGtk.Widget
- orientation (Gtk.Orientation) – expected orientation
 - Returns: - a newly created - Gtk.GesturePan- Return type: - Returns a newly created - Gtk.Gesturethat recognizes pan gestures.- New in version 3.14. 
- widget (
 - 
get_orientation()[source]¶
- Returns: - the expected orientation for pan gestures - Return type: - Gtk.Orientation- Returns the orientation of the pan gestures that this self expects. - New in version 3.14. 
 - 
set_orientation(orientation)[source]¶
- Parameters: - orientation ( - Gtk.Orientation) – expected orientation- Sets the orientation to be expected on pan gestures. - New in version 3.14. 
 
- 
classmethod 
Signal Details¶
- 
Gtk.GesturePan.signals.pan(gesture_pan, direction, offset)¶
- Signal Name: - pan- Flags: - Parameters: - gesture_pan (Gtk.GesturePan) – The object which received the signal
- direction (Gtk.PanDirection) – current direction of the pan gesture
- offset (float) – Offset along the gesture orientation
 - This signal is emitted once a panning gesture along the expected axis is detected. - New in version 3.14. 
- gesture_pan (
Property Details¶
- 
Gtk.GesturePan.props.orientation¶
- Name: - orientation- Type: - Gtk.Orientation- Default Value: - Gtk.Orientation.HORIZONTAL- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- The expected orientation of pan gestures. - New in version 3.14.