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.GestureDrag
is aGtk.Gesture
implementation that recognizes drag operations. The drag operation itself can be tracked throught theGtk.GestureDrag
::drag-begin
,Gtk.GestureDrag
::drag-update
andGtk.GestureDrag
::drag-end
signals, or the relevant coordinates be extracted throughGtk.GestureDrag.get_offset
() andGtk.GestureDrag.get_start_point
().- classmethod new(widget)[source]¶
- Parameters:
widget (
Gtk.Widget
) – aGtk.Widget
- Returns:
a newly created
Gtk.GestureDrag
- Return type:
Returns a newly created
Gtk.Gesture
that recognizes drags.New in version 3.14.
- get_offset()[source]¶
- Returns:
True
if 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
True
and 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:
True
if 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
True
and 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 signalstart_x (
float
) – X coordinate, relative to the widget allocationstart_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 signaloffset_x (
float
) – X offset, relative to the start pointoffset_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 signaloffset_x (
float
) – X offset, relative to the start pointoffset_y (
float
) – Y offset, relative to the start point
This signal is emitted whenever the dragging point moves.
New in version 3.14.