Gtk.GestureDrag¶
| Subclasses: | Gtk.GesturePan | 
|---|
Methods¶
| Inherited: | Gtk.GestureSingle (8), Gtk.Gesture (19), Gtk.EventController (5), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(widget) | 
| get_offset() | |
| get_start_point() | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
| Inherited: | Gtk.GestureSingle (3), Gtk.Gesture (2), Gtk.EventController (2) | 
|---|
Signals¶
| Inherited: | Gtk.Gesture (5), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| drag-begin | This signal is emitted whenever dragging starts. | 
| drag-end | This signal is emitted whenever the dragging is finished. | 
| drag-update | This signal is emitted whenever the dragging point moves. | 
Fields¶
| Inherited: | Gtk.Gesture (5), GObject.Object (1) | 
|---|
Class Details¶
- 
class Gtk.GestureDrag(**kwargs)¶
- Bases: - Gtk.GestureSingle- Abstract: - No - Structure: - Gtk.GestureDragClass- Gtk.GestureDragis a- Gtk.Gestureimplementation that recognizes drag operations. The drag operation itself can be tracked throught the- Gtk.GestureDrag- ::drag-begin,- Gtk.GestureDrag- ::drag-updateand- Gtk.GestureDrag- ::drag-endsignals, or the relevant coordinates be extracted through- Gtk.GestureDrag.get_offset() and- Gtk.GestureDrag.get_start_point().- 
classmethod new(widget)[source]¶
- Parameters: - widget ( - Gtk.Widget) – a- Gtk.Widget- Returns: - a newly created - Gtk.GestureDrag- Return type: - Gtk.Gesture- Returns a newly created - Gtk.Gesturethat recognizes drags.- New in version 3.14. 
 - 
get_offset()[source]¶
- Returns: - Trueif the gesture is active- x: - X offset for the current point - y: - Y offset for the current point - Return type: - ( - bool, x:- float, y:- float)- If the self is active, this function returns - Trueand fills in x and y with the coordinates of the current point, as an offset to the starting drag point.- New in version 3.14. 
 - 
get_start_point()[source]¶
- Returns: - Trueif the gesture is active- x: - X coordinate for the drag start point - y: - Y coordinate for the drag start point - Return type: - ( - bool, x:- float, y:- float)- If the self is active, this function returns - Trueand fills in x and y with the drag start coordinates, in window-relative coordinates.- New in version 3.14. 
 
- 
classmethod 
Signal Details¶
- 
Gtk.GestureDrag.signals.drag_begin(gesture_drag, start_x, start_y)¶
- Signal Name: - drag-begin- Flags: - Parameters: - gesture_drag (Gtk.GestureDrag) – The object which received the signal
- start_x (float) – X coordinate, relative to the widget allocation
- start_y (float) – Y coordinate, relative to the widget allocation
 - This signal is emitted whenever dragging starts. - New in version 3.14. 
- gesture_drag (
- 
Gtk.GestureDrag.signals.drag_end(gesture_drag, offset_x, offset_y)¶
- Signal Name: - drag-end- Flags: - Parameters: - gesture_drag (Gtk.GestureDrag) – The object which received the signal
- offset_x (float) – X offset, relative to the start point
- offset_y (float) – Y offset, relative to the start point
 - This signal is emitted whenever the dragging is finished. - New in version 3.14. 
- gesture_drag (
- 
Gtk.GestureDrag.signals.drag_update(gesture_drag, offset_x, offset_y)¶
- Signal Name: - drag-update- Flags: - Parameters: - gesture_drag (Gtk.GestureDrag) – The object which received the signal
- offset_x (float) – X offset, relative to the start point
- offset_y (float) – Y offset, relative to the start point
 - This signal is emitted whenever the dragging point moves. - New in version 3.14. 
- gesture_drag (