Files
wxWidgets/include/wx/qt/dnd.h
Jay Nabonne 0dc1654ab6 Get simple (text) drag and drop case working with drop source.
We ended up not needing the underlying QMimeData-based implementation, as the classes sitting on top of it
bypassed it anyway. It now treats the hierarchy as a pure data storage mechanism, generating the
QMimeData when drag-drop is initiated.
2019-01-28 15:30:25 +00:00

50 lines
1.3 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/qt/dnd.h
// Author: Peter Most
// Copyright: (c) Peter Most
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_QT_DND_H_
#define _WX_QT_DND_H_
#define wxDROP_ICON(name) wxICON(name)
class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase
{
public:
wxDropTarget(wxDataObject *dataObject = NULL );
virtual bool OnDrop(wxCoord x, wxCoord y);
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
virtual bool GetData();
wxDataFormat GetMatchingPair();
protected:
private:
};
class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase
{
public:
wxDropSource( wxWindow *win = NULL,
const wxIcon &copy = wxNullIcon,
const wxIcon &move = wxNullIcon,
const wxIcon &none = wxNullIcon);
wxDropSource( wxDataObject& data,
wxWindow *win,
const wxIcon &copy = wxNullIcon,
const wxIcon &move = wxNullIcon,
const wxIcon &none = wxNullIcon);
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
private:
wxWindow* m_parentWindow;
};
#endif // _WX_QT_DND_H_