Ardour  9.0-pre0-582-g084a23a80d
Gdk::DragContext Class Reference

#include <dragcontext.h>

Inheritance diagram for Gdk::DragContext:
[legend]

Public Member Functions

virtual ~DragContext ()
 
GdkDragContextgobj ()
 Provides access to the underlying C GObject. More...
 
const GdkDragContextgobj () const
 Provides access to the underlying C GObject. More...
 
GdkDragContextgobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
void drag_status (DragAction action, guint32 time)
 
void drag_refuse (guint32 time)
 
void drop_reply (bool ok, guint32 time)
 
void drop_finish (bool success, guint32 time)
 
Glib::ustring get_selection () const
 
void drag_finish (bool success, bool del, guint32 time)
 
void set_icon (const Glib::RefPtr< Gdk::Colormap > &colormap, const Glib::RefPtr< Gdk::Pixmap > &pixmap, const Glib::RefPtr< Gdk::Bitmap > &mask, int hot_x, int hot_y)
 
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< Windowget_source_window ()
 
Glib::RefPtr< const Windowget_source_window () const
 
Gdk::ListHandle_AtomString get_targets () const
 
DragProtocol get_protocol () const
 
bool get_is_source () const
 
DragAction get_actions () const
 
DragAction get_suggested_action () const
 
DragAction get_action () const
 
DragAction get_selected_action () const
 
guint32 get_start_time () const
 
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
 

Static Public Member Functions

static GType get_type () G_GNUC_CONST
 
static Glib::RefPtr< DragContextcreate ()
 

Protected Member Functions

 DragContext ()
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gdk::DragContextwrap (GdkDragContext *object, bool take_copy=false)
 

Detailed Description

A Gdk::DragContext holds information about a drag in progress. It is used on both source and destination sides.

Definition at line 165 of file dragcontext.h.

Constructor & Destructor Documentation

◆ ~DragContext()

virtual Gdk::DragContext::~DragContext ( )
virtual

◆ DragContext()

Gdk::DragContext::DragContext ( )
protected

Member Function Documentation

◆ create()

static Glib::RefPtr<DragContext> Gdk::DragContext::create ( )
static

◆ drag_finish()

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.

Parameters
successA flag indicating whether the drop was successful.
delAa flag indicating whether the source should delete the original data. (This should be true for a move.)
timeThe timestamp from the "drag_data_drop" signal.

◆ drag_refuse()

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.

Parameters
timeThe timestamp for this operation.

◆ drag_status()

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.

Parameters
actionThe selected action which will be taken when a drop happens, or 0 to indicate that a drop will not be accepted.
timeThe timestamp for this operation.

◆ drop_finish()

void Gdk::DragContext::drop_finish ( bool  success,
guint32  time 
)

Ends the drag operation after a drop.

This function is called by the drag destination.

Parameters
successtrue if the data was successfully received.
timeThe timestamp for this operation.

◆ drop_reply()

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.

Parameters
oktrue if the drop is accepted.
timeThe timestamp for this operation.

◆ find_window_for_screen()

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().

Parameters
drag_windowA window which may be at the pointer position, but should be ignored, since it is put up by the drag source as an icon.
screenThe screen where the destination window is sought.
x_rootThe x position of the pointer in root coordinates.
y_rootThe y position of the pointer in root coordinates.
dest_windowLocation to store the destination window in.
protocolLocation to store the DND protocol in.

◆ get_action()

DragAction Gdk::DragContext::get_action ( ) const

Determines the action chosen by the drag destination.

Returns
A Gdk::DragAction value.

◆ get_actions()

DragAction Gdk::DragContext::get_actions ( ) const

Determines the bitmask of actions proposed by the source if gdk_drag_context_suggested_action() returns GDK_ACTION_ASK.

Returns
The Gdk::DragAction flags.

◆ get_is_source()

bool Gdk::DragContext::get_is_source ( ) const

Discover whether the context is used on the source side.

Returns
true if the context is used on the source side.

◆ get_protocol()

DragProtocol Gdk::DragContext::get_protocol ( ) const

Get the DND protocol which governs this drag.

Returns
the DND protocol which governs this drag.

◆ get_selected_action()

DragAction Gdk::DragContext::get_selected_action ( ) const

Determines the action chosen by the drag destination.

Returns
A Gdk::DragAction value.

◆ get_selection()

Glib::ustring Gdk::DragContext::get_selection ( ) const

Returns the selection atom for the current source window.

Returns
The selection atom.

◆ get_source_window() [1/2]

Glib::RefPtr<Window> Gdk::DragContext::get_source_window ( )

Returns the Gdk::Window where the DND operation started.

Returns
A Gdk::Window.

◆ get_source_window() [2/2]

Glib::RefPtr<const Window> Gdk::DragContext::get_source_window ( ) const

Returns the Gdk::Window where the DND operation started.

Returns
A Gdk::Window.

◆ get_start_time()

guint32 Gdk::DragContext::get_start_time ( ) const

Get a timestamp recording the start time of this drag.

Returns
a timestamp recording the start time of this drag.

◆ get_suggested_action()

DragAction Gdk::DragContext::get_suggested_action ( ) const

Determines the suggested drag action of the context.

Returns
A Gdk::DragAction value.

◆ get_targets()

Gdk::ListHandle_AtomString Gdk::DragContext::get_targets ( ) const

Get a list of targets offered by the source.

Returns
a list of targets offered by the source.

◆ get_type()

static GType Gdk::DragContext::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GdkDragContext* Gdk::DragContext::gobj ( )
inline

Provides access to the underlying C GObject.

Definition at line 204 of file dragcontext.h.

◆ gobj() [2/2]

const GdkDragContext* Gdk::DragContext::gobj ( ) const
inline

Provides access to the underlying C GObject.

Definition at line 207 of file dragcontext.h.

◆ gobj_copy()

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.

◆ set_icon() [1/4]

void Gdk::DragContext::set_icon ( )

◆ set_icon() [2/4]

void Gdk::DragContext::set_icon ( const Glib::RefPtr< Gdk::Colormap > &  colormap,
const Glib::RefPtr< Gdk::Pixmap > &  pixmap,
const Glib::RefPtr< Gdk::Bitmap > &  mask,
int  hot_x,
int  hot_y 
)

◆ set_icon() [3/4]

void Gdk::DragContext::set_icon ( const Glib::RefPtr< Gdk::Pixbuf > &  pixbuf,
int  hot_x,
int  hot_y 
)

◆ set_icon() [4/4]

void Gdk::DragContext::set_icon ( const Glib::ustring &  stock_id,
int  hot_x,
int  hot_y 
)

◆ set_icon_name()

void Gdk::DragContext::set_icon_name ( const Glib::ustring &  name,
int  hot_x,
int  hot_y 
)

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gdk::DragContext > wrap ( GdkDragContext object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file: