Gnome::Gtk4::DropControllerMotion
Table of Contents
Description§
Gnome::Gtk4::DropControllerMotion is an event controller tracking the pointer during Drag-and-Drop operations.
It is modeled after Gnome::Gtk4::EventControllerMotion so if you have used that, this should feel really familiar.
This controller is not able to accept drops, use Gnome::Gtk4::DropTarget for that purpose.
Uml Diagram§
UNKNOWN image§
=for image :class<inline> :src<asset_files/images/plantuml/DropControllerMotion.png> :width<70\%>Class initialization§
new§
:native-object§
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
new-dropcontrollermotion§
Creates a new event controller that will handle pointer motion events during drag and drop.
method new-dropcontrollermotion ( --> Gnome::Gtk4::DropControllerMotion )
Methods§
contains-pointer§
Returns if a Drag-and-Drop operation is within the widget $self or one of its children.
method contains-pointer (--> Bool )
Return value; True if a dragging pointer is within $self or one of its children..
get-drop§
Returns the Gnome::Gdk4::Drop of a current Drag-and-Drop operation over the widget of $self.
method get-drop (--> N-Object )
Return value; The Gnome::Gdk4::Drop currently happening within $self.
is-pointer§
Returns if a Drag-and-Drop operation is within the widget $self, not one of its children.
method is-pointer (--> Bool )
Return value; True if a dragging pointer is within $self but not one of its children.
Signals§
enter§
Signals that the pointer has entered the widget.
method handler ( gdouble $x, gdouble $y, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::DropControllerMotion :$_widget, *%user-options )
- $x; coordinates of pointer location.
- $y; coordinates of pointer location.
- $_handle_id; The registered event handler id.
- $_native-object; The native object provided by the Raku object which registered this event. This is a native Gnome::Gtk4::DropControllerMotion object.
- %user-options; A list of named arguments provided by .register-signal() in class Object.
leave§
Signals that the pointer has left the widget.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::DropControllerMotion :$_widget, *%user-options )
- $_handle_id; The registered event handler id.
- $_native-object; The native object provided by the Raku object which registered this event. This is a native Gnome::Gtk4::DropControllerMotion object.
- %user-options; A list of named arguments provided by .register-signal() in class Object.
motion§
Emitted when the pointer moves inside the widget.
method handler ( gdouble $x, gdouble $y, Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::DropControllerMotion :$_widget, *%user-options )
- $x; the x coordinate.
- $y; the y coordinate.
- $_handle_id; The registered event handler id.
- $_native-object; The native object provided by the Raku object which registered this event. This is a native Gnome::Gtk4::DropControllerMotion object.
- %user-options; A list of named arguments provided by .register-signal() in class Object.
About my projects, examples and tutorials