]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/dnd.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: declaration of the wxDropTarget class
4 // Author: David Webster
8 // Copyright: (c) 1999 David Webster
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
16 #if !wxUSE_DRAG_AND_DROP
17 #error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!"
20 #define INCL_WINSTDDRAG
26 //-------------------------------------------------------------------------
28 //-------------------------------------------------------------------------
30 class WXDLLEXPORT wxDropSource
: public wxDropSourceBase
33 /* constructor. set data later with SetData() */
34 wxDropSource(wxWindow
* pWin
);
36 /* constructor for setting one data object */
37 wxDropSource( wxDataObject
& rData
,
40 virtual ~wxDropSource();
42 /* start drag action */
43 virtual wxDragResult
DoDragDrop(bool bAllowMove
= FALSE
);
49 DRAGIMAGE
* m_pDragImage
;
50 DRAGINFO
* m_pDragInfo
;
51 DRAGTRANSFER
* m_pDragTransfer
;
54 //-------------------------------------------------------------------------
56 //-------------------------------------------------------------------------
58 class WXDLLEXPORT wxDropTarget
: public wxDropTargetBase
61 wxDropTarget(wxDataObject
*dataObject
= (wxDataObject
*)NULL
);
62 virtual ~wxDropTarget();
64 void Register(WXHWND hwnd
);
65 void Revoke(WXHWND hwnd
);
67 virtual wxDragResult
OnDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
68 virtual bool OnDrop(wxCoord x
, wxCoord y
);
69 virtual wxDragResult
OnData(wxCoord x
, wxCoord y
, wxDragResult vResult
);
70 virtual bool GetData();
74 virtual bool IsAcceptable(DRAGINFO
* pInfo
);
76 DRAGINFO
* m_pDragInfo
;
77 DRAGTRANSFER
* m_pDragTransfer
;