Gtk.GestureDrag¶
- Subclasses:
Methods¶
- Inherited:
- Gtk.GestureSingle (8), Gtk.Gesture (19), Gtk.EventController (5), GObject.Object (37) 
- Structs:
| class | 
 | 
| 
 | |
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
- Gtk.GestureSingle (3), Gtk.Gesture (2), Gtk.EventController (2) 
Signals¶
- Inherited:
| Name | Short Description | 
|---|---|
| This signal is emitted whenever dragging starts. | |
| This signal is emitted whenever the dragging is finished. | |
| This signal is emitted whenever the dragging point moves. | 
Fields¶
- Inherited:
Class Details¶
- class Gtk.GestureDrag(**kwargs)¶
- Bases:
- Abstract:
- No 
- Structure:
 - 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:
 - 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:
 - 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:
 - 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. 
 
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. 
- 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. 
- 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.