Gtk.DropControllerMotion¶
class — extends EventController
An event controller tracking the pointer during Drag-and-Drop operations.
It is modeled after EventControllerMotion so if you
have used that, this should feel really familiar.
This controller is not able to accept drops, use DropTarget
for that purpose.
Constructors¶
new¶
Creates a new event controller that will handle pointer motion events during drag and drop.
Methods¶
contains_pointer¶
Returns if a Drag-and-Drop operation is within the widget
self or one of its children.
get_drop¶
Returns the GdkDrop of a current Drag-and-Drop operation
over the widget of self.
is_pointer¶
Returns if a Drag-and-Drop operation is within the widget
self, not one of its children.
Properties¶
contains_pointer¶
Whether the pointer of a Drag-and-Drop operation is in the controller's widget or a descendant.
See also DropControllerMotion.is-pointer.
When handling crossing events, this property is updated
before DropControllerMotion.enter, but after
DropControllerMotion.leave is emitted.
drop¶
The ongoing drop operation over the controller's widget or its descendant.
If no drop operation is going on, this property returns None.
The event controller should not modify the drop, but it might
want to query its properties.
When handling crossing events, this property is updated
before DropControllerMotion.enter, but after
DropControllerMotion.leave is emitted.
is_pointer¶
Whether the pointer is in the controllers widget itself, as opposed to in a descendent widget.
See also DropControllerMotion.contains-pointer.
When handling crossing events, this property is updated
before DropControllerMotion.enter, but after
DropControllerMotion.leave is emitted.
Signals¶
enter¶
Signals that the pointer has entered the widget.
leave¶
Signals that the pointer has left the widget.
motion¶
Emitted when the pointer moves inside the widget.