]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/dnd.h
added IsEncodingAvailable and GetAltForEncoding extended by facename argument and...
[wxWidgets.git] / include / wx / os2 / dnd.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: dnd.h
3 // Purpose: declaration of the wxDropTarget class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/21/99
7 // RCS-ID: $Id$
8 // Copyright: (c) 1999 David Webster
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
11
12
13 #ifndef __OS2DNDH__
14 #define __OS2DNDH__
15
16 #if !wxUSE_DRAG_AND_DROP
17 #error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!"
18 #endif //WX_DRAG_DROP
19
20 #define INCL_WINSTDDRAG
21 #include <os2.h>
22 #include <pmstddlg.h>
23
24 //-------------------------------------------------------------------------
25 // wxDropSource
26 //-------------------------------------------------------------------------
27
28 class WXDLLEXPORT wxDropSource: public wxDropSourceBase
29 {
30 public:
31 /* constructor. set data later with SetData() */
32 wxDropSource(wxWindow* pWin);
33
34 /* constructor for setting one data object */
35 wxDropSource( wxDataObject& rData,
36 wxWindow* pWin
37 );
38 virtual ~wxDropSource();
39
40 /* start drag action */
41 virtual wxDragResult DoDragDrop(bool bAllowMove = FALSE);
42
43 protected:
44 void Init(void);
45 bool m_bLazyDrag;
46
47 DRAGIMAGE* m_pDragImage;
48 DRAGINFO* m_pDragInfo;
49 DRAGTRANSFER* m_pDragTransfer;
50 };
51
52 //-------------------------------------------------------------------------
53 // wxDropTarget
54 //-------------------------------------------------------------------------
55
56 class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
57 {
58 public:
59 wxDropTarget(wxDataObject *dataObject = (wxDataObject*)NULL);
60 virtual ~wxDropTarget();
61
62 void Register(WXHWND hwnd);
63 void Revoke(WXHWND hwnd);
64
65 virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
66 virtual bool OnDrop(wxCoord x, wxCoord y);
67 virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult);
68 virtual bool GetData();
69
70 // implementation
71 protected:
72 virtual bool IsAcceptable(DRAGINFO* pInfo);
73
74 DRAGINFO* m_pDragInfo;
75 DRAGTRANSFER* m_pDragTransfer;
76 };
77
78 #endif //__OS2DNDH__
79