]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/dnd.h
added a (commented out) example of how to force the default action to be move
[wxWidgets.git] / include / wx / os2 / dnd.h
CommitLineData
0e320a79
DW
1///////////////////////////////////////////////////////////////////////////////
2// Name: dnd.h
6dddc146
DW
3// Purpose: declaration of the wxDropTarget class
4// Author: David Webster
5// Modified by:
6// Created: 10/21/99
0e320a79 7// RCS-ID: $Id$
6dddc146
DW
8// Copyright: (c) 1999 David Webster
9// Licence: wxWindows license
0e320a79
DW
10///////////////////////////////////////////////////////////////////////////////
11
6dddc146
DW
12
13#ifndef __OS2DNDH__
14#define __OS2DNDH__
0e320a79 15
6dddc146
DW
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
0e320a79 19
20947e08
DW
20#define INCL_WINSTDDRAG
21#include <os2.h>
5b10a619 22#ifndef __EMX__
20947e08 23#include <pmstddlg.h>
5b10a619 24#endif
20947e08 25
0e320a79 26//-------------------------------------------------------------------------
6dddc146 27// wxDropSource
54da4255
DW
28//-------------------------------------------------------------------------
29
6dddc146 30class WXDLLEXPORT wxDropSource: public wxDropSourceBase
54da4255 31{
54da4255 32public:
6dddc146 33 /* constructor. set data later with SetData() */
5dcec1d9 34 wxDropSource(wxWindow* pWin);
6dddc146
DW
35
36 /* constructor for setting one data object */
37 wxDropSource( wxDataObject& rData,
e6ebb514 38 wxWindow* pWin
6dddc146
DW
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;
54da4255
DW
52};
53
0e320a79 54//-------------------------------------------------------------------------
6dddc146 55// wxDropTarget
0e320a79
DW
56//-------------------------------------------------------------------------
57
6dddc146 58class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
0e320a79
DW
59{
60public:
6dddc146
DW
61 wxDropTarget(wxDataObject *dataObject = (wxDataObject*)NULL);
62 virtual ~wxDropTarget();
0e320a79 63
6dddc146
DW
64 void Register(WXHWND hwnd);
65 void Revoke(WXHWND hwnd);
0e320a79 66
6dddc146
DW
67 virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
68 virtual bool OnDrop(wxCoord x, wxCoord y);
004fd0c8 69 virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult);
6dddc146 70 virtual bool GetData();
0e320a79 71
6dddc146
DW
72 // implementation
73protected:
74 virtual bool IsAcceptable(DRAGINFO* pInfo);
0e320a79 75
6dddc146
DW
76 DRAGINFO* m_pDragInfo;
77 DRAGTRANSFER* m_pDragTransfer;
0e320a79
DW
78};
79
6dddc146 80#endif //__OS2DNDH__
0e320a79 81