]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/dnd.h
added missing consts
[wxWidgets.git] / include / wx / os2 / dnd.h
... / ...
CommitLineData
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#ifndef __EMX__
23#include <pmstddlg.h>
24#endif
25
26//-------------------------------------------------------------------------
27// wxDropSource
28//-------------------------------------------------------------------------
29
30class WXDLLEXPORT wxDropSource: public wxDropSourceBase
31{
32public:
33 /* constructor. set data later with SetData() */
34 wxDropSource(wxWindow* pWin);
35
36 /* constructor for setting one data object */
37 wxDropSource( wxDataObject& rData,
38 wxWindow* pWin
39 );
40 virtual ~wxDropSource();
41
42 /* start drag action */
43 virtual wxDragResult DoDragDrop(bool bAllowMove = FALSE);
44
45protected:
46 void Init(void);
47 bool m_bLazyDrag;
48
49 DRAGIMAGE* m_pDragImage;
50 DRAGINFO* m_pDragInfo;
51 DRAGTRANSFER* m_pDragTransfer;
52};
53
54//-------------------------------------------------------------------------
55// wxDropTarget
56//-------------------------------------------------------------------------
57
58class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
59{
60public:
61 wxDropTarget(wxDataObject *dataObject = (wxDataObject*)NULL);
62 virtual ~wxDropTarget();
63
64 void Register(WXHWND hwnd);
65 void Revoke(WXHWND hwnd);
66
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();
71
72 // implementation
73protected:
74 virtual bool IsAcceptable(DRAGINFO* pInfo);
75
76 DRAGINFO* m_pDragInfo;
77 DRAGTRANSFER* m_pDragTransfer;
78};
79
80#endif //__OS2DNDH__
81