Class: Gtk::DropControllerMotion

Inherits:
EventController show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from EventController

#current_event, #current_event_device, #current_event_state, #current_event_time, #name, #name=, #propagation_limit, #propagation_limit=, #propagation_phase, #propagation_phase=, #reset, #static_name=, #widget, #widget=

Constructor Details

#initializeGtk::EventController

Creates a new event controller that will handle pointer motion events during drag and drop.

Instance Method Details

#contains_pointerBoolean

Returns if a Drag-and-Drop operation is within the widget self or one of its children.

Returns:

  • (Boolean)

    true if a dragging pointer is within self or one of its children.

#contains_pointer=(contains_pointer) ⇒ Boolean

Whether the pointer of a Drag-and-Drop operation is in the controller's widget or a descendant.

See also [propertyGtk.DropControllerMotion:is-pointer].

When handling crossing events, this property is updated before [signalGtk.DropControllerMotion::enter], but after [signalGtk.DropControllerMotion::leave] is emitted.

Parameters:

  • contains_pointer (Boolean)

Returns:

  • (Boolean)

    contains-pointer

  • (Boolean)

    contains-pointer

#contains_pointer?Boolean

Whether the pointer of a Drag-and-Drop operation is in the controller's widget or a descendant.

See also [propertyGtk.DropControllerMotion:is-pointer].

When handling crossing events, this property is updated before [signalGtk.DropControllerMotion::enter], but after [signalGtk.DropControllerMotion::leave] is emitted.

Returns:

  • (Boolean)

    contains-pointer

#dropGdk::Drop

The ongoing drop operation over the controller's widget or its descendant.

If no drop operation is going on, this property returns nil.

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 [signalGtk.DropControllerMotion::enter], but after [signalGtk.DropControllerMotion::leave] is emitted.

Returns:

  • (Gdk::Drop)

    drop

#drop=(drop) ⇒ Gdk::Drop

The ongoing drop operation over the controller's widget or its descendant.

If no drop operation is going on, this property returns nil.

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 [signalGtk.DropControllerMotion::enter], but after [signalGtk.DropControllerMotion::leave] is emitted.

Parameters:

  • drop (Gdk::Drop)

Returns:

  • (Gdk::Drop)

    drop

  • (Gdk::Drop)

    drop

#is_pointerBoolean

Returns if a Drag-and-Drop operation is within the widget self, not one of its children.

Returns:

  • (Boolean)

    true if a dragging pointer is within self but not one of its children

#is_pointer=(is_pointer) ⇒ Boolean

Whether the pointer is in the controllers widget itself, as opposed to in a descendent widget.

See also [propertyGtk.DropControllerMotion:contains-pointer].

When handling crossing events, this property is updated before [signalGtk.DropControllerMotion::enter], but after [signalGtk.DropControllerMotion::leave] is emitted.

Parameters:

  • is_pointer (Boolean)

Returns:

  • (Boolean)

    is-pointer

  • (Boolean)

    is-pointer

#is_pointer?Boolean

Whether the pointer is in the controllers widget itself, as opposed to in a descendent widget.

See also [propertyGtk.DropControllerMotion:contains-pointer].

When handling crossing events, this property is updated before [signalGtk.DropControllerMotion::enter], but after [signalGtk.DropControllerMotion::leave] is emitted.

Returns:

  • (Boolean)

    is-pointer