|
gtkmm 3.3.2
|
A Gdk::DragContext holds information about a drag in progress. More...

Public Member Functions | |
| virtual | ~DragContext () |
| GdkDragContext* | gobj () |
| Provides access to the underlying C GObject. | |
| const GdkDragContext* | gobj () const |
| Provides access to the underlying C GObject. | |
| GdkDragContext* | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
| void | drag_status (DragAction action, guint32 time) |
| Selects one of the actions offered by the drag source. | |
| void | drag_refuse (guint32 time) |
| Indicate that a drop will not be accepted. | |
| void | drop_reply (bool ok, guint32 time) |
| Accepts or rejects a drop. | |
| void | drop_finish (bool success, guint32 time) |
| Ends the drag operation after a drop. | |
| Glib::ustring | get_selection () const |
| Returns the selection atom for the current source window. | |
| void | drag_finish (bool success, bool del, guint32 time) |
| Informs the drag source that the drop is finished, and that the data of the drag will no longer be required. | |
| void | set_icon (const Cairo::RefPtr< Cairo::Surface >& surface) |
| void | set_icon (const Glib::RefPtr< Gdk::Pixbuf >& pixbuf, int hot_x, int hot_y) |
| void | set_icon (const Glib::ustring& stock_id, int hot_x, int hot_y) |
| void | set_icon_name (const Glib::ustring& name, int hot_x, int hot_y) |
| void | set_icon () |
| Glib::RefPtr< Window > | get_source_window () |
| Returns the Gdk::Window where the DND operation started. | |
| Glib::RefPtr< const Window > | get_source_window () const |
| Returns the Gdk::Window where the DND operation started. | |
| Glib::RefPtr< Window > | get_dest_window () |
| Returns the destination windw for the DND operation. | |
| Glib::RefPtr< const Window > | get_dest_window () const |
| Returns the destination windw for the DND operation. | |
| DragProtocol | get_protocol () const |
| Returns the drag protocol thats used by this context. | |
| void | set_device (const Glib::RefPtr< Device >& device) |
| Associates a Gdk::Device to context, so all Drag and Drop events for context are emitted as if they came from this device. | |
| Glib::RefPtr< Device > | get_device () |
| Returns the Gdk::Device associated to the drag context. | |
| Glib::RefPtr< const Device > | get_device () const |
| Returns the Gdk::Device associated to the drag context. | |
| std::vector< std::string > | list_targets () const |
| Get a list of targets offered by the source. | |
| DragAction | get_actions () const |
| Determines the bitmask of actions proposed by the source if gdk_drag_context_get_suggested_action() returns GDK_ACTION_ASK. | |
| DragAction | get_suggested_action () const |
| Determines the suggested drag action of the context. | |
| DragAction | get_selected_action () const |
| Determines the action chosen by the drag destination. | |
| void | find_window_for_screen (const Glib::RefPtr< Window >& drag_window, const Glib::RefPtr< Screen >& screen, int x_root, int y_root, Glib::RefPtr< Window >& dest_window, DragProtocol& protocol) const |
| Finds the destination window and DND protocol to use at the given pointer position. | |
Related Functions | |
(Note that these are not member functions.) | |
| Glib::RefPtr< Gdk::DragContext > | wrap (GdkDragContext* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
A Gdk::DragContext holds information about a drag in progress.
It is used on both source and destination sides.
| virtual Gdk::DragContext::~DragContext | ( | ) | [virtual] |
| void Gdk::DragContext::drag_finish | ( | bool | success, |
| bool | del, | ||
| guint32 | time | ||
| ) |
Informs the drag source that the drop is finished, and that the data of the drag will no longer be required.
| success | A flag indicating whether the drop was successful. |
| del | Aa flag indicating whether the source should delete the original data. (This should be true for a move.) time The timestamp from the "drag_data_drop" signal. |
| void Gdk::DragContext::drag_refuse | ( | guint32 | time | ) |
Indicate that a drop will not be accepted.
This function may be called by the drag destination in response to gdk_drag_motion() called by the drag source. Alternatively, call drag_status() to indicate which drag action will be accepted.
| time | The timestamp for this operation. |
| void Gdk::DragContext::drag_status | ( | DragAction | action, |
| guint32 | time | ||
| ) |
Selects one of the actions offered by the drag source.
This function is called by the drag destination in response to gdk_drag_motion() called by the drag source.
| action | The selected action which will be taken when a drop happens, or 0 to indicate that a drop will not be accepted. |
| time | The timestamp for this operation. |
| void Gdk::DragContext::drop_finish | ( | bool | success, |
| guint32 | time | ||
| ) |
Ends the drag operation after a drop.
This function is called by the drag destination.
| success | true if the data was successfully received. |
| time | The timestamp for this operation. |
| void Gdk::DragContext::drop_reply | ( | bool | ok, |
| guint32 | time | ||
| ) |
Accepts or rejects a drop.
This function is called by the drag destination in response to a drop initiated by the drag source.
| accepted | true if the drop is accepted. |
| time | The timestamp for this operation. |
| void Gdk::DragContext::find_window_for_screen | ( | const Glib::RefPtr< Window >& | drag_window, |
| const Glib::RefPtr< Screen >& | screen, | ||
| int | x_root, | ||
| int | y_root, | ||
| Glib::RefPtr< Window >& | dest_window, | ||
| DragProtocol& | protocol | ||
| ) | const |
Finds the destination window and DND protocol to use at the given pointer position.
This function is called by the drag source to obtain the dest_window and protocol parameters for gdk_drag_motion().
| drag_window | A window which may be at the pointer position, but should be ignored, since it is put up by the drag source as an icon. |
| screen | The screen where the destination window is sought. |
| x_root | The x position of the pointer in root coordinates. |
| y_root | The y position of the pointer in root coordinates. |
| dest_window | Location to store the destination window in. |
| protocol | Location to store the DND protocol in. |
| DragAction Gdk::DragContext::get_actions | ( | ) | const |
Determines the bitmask of actions proposed by the source if gdk_drag_context_get_suggested_action() returns GDK_ACTION_ASK.
| Glib::RefPtr<Window> Gdk::DragContext::get_dest_window | ( | ) |
| Glib::RefPtr<const Window> Gdk::DragContext::get_dest_window | ( | ) | const |
| Glib::RefPtr<Device> Gdk::DragContext::get_device | ( | ) |
Returns the Gdk::Device associated to the drag context.
| Glib::RefPtr<const Device> Gdk::DragContext::get_device | ( | ) | const |
Returns the Gdk::Device associated to the drag context.
| DragProtocol Gdk::DragContext::get_protocol | ( | ) | const |
| DragAction Gdk::DragContext::get_selected_action | ( | ) | const |
Determines the action chosen by the drag destination.
| Glib::ustring Gdk::DragContext::get_selection | ( | ) | const |
Returns the selection atom for the current source window.
| Glib::RefPtr<const Window> Gdk::DragContext::get_source_window | ( | ) | const |
| Glib::RefPtr<Window> Gdk::DragContext::get_source_window | ( | ) |
| DragAction Gdk::DragContext::get_suggested_action | ( | ) | const |
Determines the suggested drag action of the context.
| const GdkDragContext* Gdk::DragContext::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase.
| GdkDragContext* Gdk::DragContext::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase.
| GdkDragContext* Gdk::DragContext::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| std::vector<std::string> Gdk::DragContext::list_targets | ( | ) | const |
Get a list of targets offered by the source.
| void Gdk::DragContext::set_device | ( | const Glib::RefPtr< Device >& | device | ) |
Associates a Gdk::Device to context, so all Drag and Drop events for context are emitted as if they came from this device.
| device | A Gdk::Device. |
| void Gdk::DragContext::set_icon | ( | const Glib::ustring & | stock_id, |
| int | hot_x, | ||
| int | hot_y | ||
| ) |
| void Gdk::DragContext::set_icon | ( | const Cairo::RefPtr< Cairo::Surface > & | surface | ) |
| void Gdk::DragContext::set_icon | ( | const Glib::RefPtr< Gdk::Pixbuf >& | pixbuf, |
| int | hot_x, | ||
| int | hot_y | ||
| ) |
| void Gdk::DragContext::set_icon | ( | ) |
| void Gdk::DragContext::set_icon_name | ( | const Glib::ustring & | name, |
| int | hot_x, | ||
| int | hot_y | ||
| ) |
| Glib::RefPtr< Gdk::DragContext > wrap | ( | GdkDragContext * | object, |
| bool | take_copy = false |
||
| ) | [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. |
1.7.4