Gtk.GestureDrag¶
- Subclasses:
Methods¶
- Inherited:
Gtk.GestureSingle (8), Gtk.Gesture (17), Gtk.EventController (13), GObject.Object (37)
- Structs:
class |
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Gtk.GestureSingle (3), Gtk.Gesture (1), Gtk.EventController (4)
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted whenever dragging starts. |
|
Emitted whenever the dragging is finished. |
|
Emitted whenever the dragging point moves. |
Fields¶
- Inherited:
Class Details¶
- class Gtk.GestureDrag(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GtkGestureDrag
is aGtkGesture
implementation for drags.The drag operation itself can be tracked throughout the [signal`Gtk`.GestureDrag::drag-begin], [signal`Gtk`.GestureDrag::drag-update] and [signal`Gtk`.GestureDrag::drag-end] signals, and the relevant coordinates can be extracted through [method`Gtk`.GestureDrag.get_offset] and [method`Gtk`.GestureDrag.get_start_point].
- classmethod new()[source]¶
- Returns:
a newly created
GtkGestureDrag
- Return type:
Returns a newly created
GtkGesture
that recognizes drags.
- 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:
Gets the offset from the start point.
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.
- 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:
Gets the point where the drag started.
If the self is active, this function returns
True
and fills in x and y with the drag start coordinates, in widget-relative coordinates.
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
Emitted whenever dragging starts.
- 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
Emitted whenever the dragging is finished.
- 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
Emitted whenever the dragging point moves.