Version: 3.0.5
Loading...
Searching...
No Matches
dnd.h File Reference

Classes

class  wxDropTarget
 This class represents a target for a drag and drop operation. More...
 
class  wxDropSource
 This class represents a source for a drag and drop operation. More...
 
class  wxTextDropTarget
 A predefined drop target for dealing with text data. More...
 
class  wxFileDropTarget
 This is a drop target which accepts files (dragged from File Manager or Explorer). More...
 

Macros

#define wxDROP_ICON(name)
 This macro creates either a cursor (MSW) or an icon (elsewhere) with the given name (of type const char*).
 

Enumerations

enum  {
  wxDrag_CopyOnly = 0 ,
  wxDrag_AllowMove = 1 ,
  wxDrag_DefaultMove = 3
}
 Possible flags for drag and drop operations. More...
 
enum  wxDragResult {
  wxDragError ,
  wxDragNone ,
  wxDragCopy ,
  wxDragMove ,
  wxDragLink ,
  wxDragCancel
}
 Result returned from a wxDropSource::DoDragDrop() call. More...
 

Functions

bool wxIsDragResultOk (wxDragResult res)
 Returns true if res indicates that something was done during a DnD operation, i.e.
 

Macro Definition Documentation

◆ wxDROP_ICON

#define wxDROP_ICON (   name)

This macro creates either a cursor (MSW) or an icon (elsewhere) with the given name (of type const char*).

Under MSW, the cursor is loaded from the resource file and the icon is loaded from XPM file under other platforms.

This macro should be used with wxDropSource::wxDropSource().

Returns
wxCursor on MSW, otherwise returns a wxIcon

Include file:

#include <wx/dnd.h> 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Possible flags for drag and drop operations.

Enumerator
wxDrag_CopyOnly 

Allow only copying.

wxDrag_AllowMove 

Allow moving too (copying is always allowed).

wxDrag_DefaultMove 

Allow moving and make it default operation.

◆ wxDragResult

Result returned from a wxDropSource::DoDragDrop() call.

Enumerator
wxDragError 

Error prevented the D&D operation from completing.

wxDragNone 

Drag target didn't accept the data.

wxDragCopy 

The data was successfully copied.

wxDragMove 

The data was successfully moved (MSW only).

wxDragLink 

Operation is a drag-link.

wxDragCancel 

The operation was cancelled by user (not an error).

Function Documentation

◆ wxIsDragResultOk()

bool wxIsDragResultOk ( wxDragResult  res)

Returns true if res indicates that something was done during a DnD operation, i.e.

is neither error nor none nor cancel.