gtkmm
3.97.1
|
A Gdk::Drag holds information about a drag in progress. More...
#include <gdkmm/drag.h>
Public Member Functions | |
Drag (Drag&& src) noexcept | |
Drag& | operator= (Drag&& src) noexcept |
~Drag () noexcept override | |
GdkDrag* | gobj () |
Provides access to the underlying C GObject. More... | |
const GdkDrag* | gobj () const |
Provides access to the underlying C GObject. More... | |
GdkDrag* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
Glib::RefPtr< Display > | get_display () |
Gets the Gdk::Display that the drag object was created for. More... | |
Glib::RefPtr< const Display > | get_display () const |
Gets the Gdk::Display that the drag object was created for. More... | |
Glib::RefPtr< Device > | get_device () |
Returns the Gdk::Device associated to the GdkDrag object. More... | |
Glib::RefPtr< const Device > | get_device () const |
Returns the Gdk::Device associated to the GdkDrag object. More... | |
Glib::RefPtr< ContentFormats > | get_formats () |
Retrieves the formats supported by this GdkDrag object. More... | |
Glib::RefPtr< const ContentFormats > | get_formats () const |
Retrieves the formats supported by this GdkDrag object. More... | |
DragAction | get_actions () const |
Determines the bitmask of possible actions proposed by the source. More... | |
DragAction | get_selected_action () const |
Determines the action chosen by the drag destination. More... | |
void | drag_drop_done (bool success) |
Inform GDK if the drop ended successfully. More... | |
Glib::RefPtr< const Surface > | get_drag_surface () const |
Returns the surface on which the drag icon should be rendered during the drag operation. More... | |
void | set_hotspot (int hot_x, int hot_y) |
Sets the position of the drag surface that will be kept under the cursor hotspot. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ContentProvider > > | property_content () const |
The Gdk::ContentProvider. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Device > > | property_device () const |
The Gdk::Device that is performing the drag. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Display > > | property_display () const |
The Gdk::Display that the drag belongs to. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ContentFormats > > | property_formats () const |
The possible formats that the drag can provide its data in. More... | |
Glib::PropertyProxy< DragAction > | property_selected_action () |
The currently selected action. More... | |
Glib::PropertyProxy_ReadOnly< DragAction > | property_selected_action () const |
The currently selected action. More... | |
Glib::PropertyProxy< DragAction > | property_actions () |
The possible actions. More... | |
Glib::PropertyProxy_ReadOnly< DragAction > | property_actions () const |
The possible actions. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Surface > > | property_surface () const |
The surface where the drag originates. More... | |
Glib::SignalProxy< void(DragCancelReason)> | signal_cancel () |
Glib::SignalProxy< void()> | signal_drop_performed () |
Glib::SignalProxy< void()> | signal_dnd_finished () |
![]() | |
Object (const Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&src) noexcept | |
Object & | operator= (Object &&src) noexcept |
void * | get_data (const QueryQuark &key) |
void | set_data (const Quark &key, void *data) |
void | set_data (const Quark &key, void *data, DestroyNotify notify) |
void | remove_data (const QueryQuark &quark) |
void * | steal_data (const QueryQuark &quark) |
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
![]() | |
ObjectBase (const ObjectBase &)=delete | |
ObjectBase & | operator= (const ObjectBase &)=delete |
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
PropertyType | get_property (const Glib::ustring &property_name) const |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
void | freeze_notify () |
void | thaw_notify () |
virtual void | reference () const |
virtual void | unreference () const |
GObject * | gobj () |
const GObject * | gobj () const |
GObject * | gobj_copy () const |
![]() | |
trackable () noexcept | |
trackable (const trackable &src) noexcept | |
trackable (trackable &&src) noexcept | |
~trackable () | |
void | add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const |
void | notify_callbacks () |
trackable & | operator= (const trackable &src) |
trackable & | operator= (trackable &&src) noexcept |
void | remove_destroy_notify_callback (notifiable *data) const |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
static bool | action_is_unique (DragAction action) |
Checks if action represents a single action or if it includes multiple flags that can be selected from. More... | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gdk::Drag > | wrap (GdkDrag* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
![]() | |
typedef void(*)(gpointer data | DestroyNotify) |
![]() | |
typedef internal::func_destroy_notify | func_destroy_notify |
![]() | |
typedef internal::func_destroy_notify | func_destroy_notify |
![]() | |
Object () | |
Object (const Glib::ConstructParams &construct_params) | |
Object (GObject *castitem) | |
~Object () noexcept override | |
![]() | |
ObjectBase () | |
ObjectBase (const char *custom_type_name) | |
ObjectBase (const std::type_info &custom_type_info) | |
ObjectBase (ObjectBase &&src) noexcept | |
ObjectBase & | operator= (ObjectBase &&src) noexcept |
virtual | ~ObjectBase () noexcept=0 |
void | initialize (GObject *castitem) |
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
A Gdk::Drag holds information about a drag in progress.
It is used on both source and destination sides.
|
noexcept |
|
overridenoexcept |
|
static |
Checks if action represents a single action or if it includes multiple flags that can be selected from.
When action is 0 - ie no action was given, true
is returned.
action | A Gdk::DragAction. |
true
if exactly one action was given. void Gdk::Drag::drag_drop_done | ( | bool | success | ) |
Inform GDK if the drop ended successfully.
Passing false
for success may trigger a drag cancellation animation.
This function is called by the drag source, and should be the last call before dropping the reference to the drag.
The Gdk::Drag will only take the first drop_done() call as effective, if this function is called multiple times, all subsequent calls will be ignored.
success | Whether the drag was ultimatively successful. |
DragAction Gdk::Drag::get_actions | ( | ) | const |
Determines the bitmask of possible actions proposed by the source.
Glib::RefPtr<Device> Gdk::Drag::get_device | ( | ) |
Returns the Gdk::Device associated to the GdkDrag object.
Glib::RefPtr<const Device> Gdk::Drag::get_device | ( | ) | const |
Returns the Gdk::Device associated to the GdkDrag object.
Glib::RefPtr<Display> Gdk::Drag::get_display | ( | ) |
Gets the Gdk::Display that the drag object was created for.
Glib::RefPtr<const Display> Gdk::Drag::get_display | ( | ) | const |
Gets the Gdk::Display that the drag object was created for.
Glib::RefPtr<const Surface> Gdk::Drag::get_drag_surface | ( | ) | const |
Returns the surface on which the drag icon should be rendered during the drag operation.
Note that the surface may not be available until the drag operation has begun. GDK will move the surface in accordance with the ongoing drag operation. The surface is owned by drag and will be destroyed when the drag operation is over.
nullptr
. Glib::RefPtr<ContentFormats> Gdk::Drag::get_formats | ( | ) |
Retrieves the formats supported by this GdkDrag object.
Glib::RefPtr<const ContentFormats> Gdk::Drag::get_formats | ( | ) | const |
Retrieves the formats supported by this GdkDrag object.
DragAction Gdk::Drag::get_selected_action | ( | ) | const |
Determines the action chosen by the drag destination.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
GdkDrag* Gdk::Drag::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::PropertyProxy< DragAction > Gdk::Drag::property_actions | ( | ) |
The possible actions.
Default value: 0
Glib::PropertyProxy_ReadOnly< DragAction > Gdk::Drag::property_actions | ( | ) | const |
The possible actions.
Default value: 0
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ContentProvider> > Gdk::Drag::property_content | ( | ) | const |
The Gdk::ContentProvider.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Device> > Gdk::Drag::property_device | ( | ) | const |
The Gdk::Device that is performing the drag.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > Gdk::Drag::property_display | ( | ) | const |
The Gdk::Display that the drag belongs to.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ContentFormats> > Gdk::Drag::property_formats | ( | ) | const |
The possible formats that the drag can provide its data in.
Glib::PropertyProxy< DragAction > Gdk::Drag::property_selected_action | ( | ) |
The currently selected action.
Default value: 0
Glib::PropertyProxy_ReadOnly< DragAction > Gdk::Drag::property_selected_action | ( | ) | const |
The currently selected action.
Default value: 0
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Surface> > Gdk::Drag::property_surface | ( | ) | const |
The surface where the drag originates.
void Gdk::Drag::set_hotspot | ( | int | hot_x, |
int | hot_y | ||
) |
Sets the position of the drag surface that will be kept under the cursor hotspot.
Initially, the hotspot is at the top left corner of the drag surface.
hot_x | X coordinate of the drag surface hotspot. |
hot_y | Y coordinate of the drag surface hotspot. |
Glib::SignalProxy<void(DragCancelReason)> Gdk::Drag::signal_cancel | ( | ) |
void on_my_cancel(DragCancelReason reason)
Flags: Run Last
The drag operation was cancelled.
reason | The reason the drag was cancelled. |
Glib::SignalProxy<void()> Gdk::Drag::signal_dnd_finished | ( | ) |
void on_my_dnd_finished()
Flags: Run Last
The drag operation was finished, the destination finished reading all data. The drag object can now free all miscellaneous data.
Glib::SignalProxy<void()> Gdk::Drag::signal_drop_performed | ( | ) |
void on_my_drop_performed()
Flags: Run Last
The drag operation was performed on an accepting client.
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |