]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/ole/dropsrc.h
Committing in .
[wxWidgets.git] / include / wx / msw / ole / dropsrc.h
CommitLineData
1737035f
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: ole/dropsrc.h
3// Purpose: declaration of the wxDropSource class
4// Author: Vadim Zeitlin
e1ee679c 5// Modified by:
1737035f
VZ
6// Created: 06.03.98
7// RCS-ID: $Id$
8// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
bbcdf8bc 9// Licence: wxWindows licence
1737035f
VZ
10///////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_OLEDROPSRC_H
13#define _WX_OLEDROPSRC_H
1737035f
VZ
14
15#ifdef __GNUG__
8e193f38 16 #pragma interface
1737035f 17#endif
8e193f38 18
f97c9854 19#if !wxUSE_DRAG_AND_DROP
47d67540 20 #error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!"
1737035f
VZ
21#endif //WX_DRAG_DROP
22
23// ----------------------------------------------------------------------------
24// forward declarations
25// ----------------------------------------------------------------------------
8e193f38 26
1737035f 27class wxIDropSource;
8e193f38
VZ
28class WXDLLEXPORT wxDataObject;
29class WXDLLEXPORT wxWindow;
30
1737035f
VZ
31// ----------------------------------------------------------------------------
32// wxDropSource is used to start the drag-&-drop operation on associated
33// wxDataObject object. It's responsible for giving UI feedback while dragging.
34// ----------------------------------------------------------------------------
8e193f38 35
9e2896e5 36class WXDLLEXPORT wxDropSource : public wxDropSourceBase
1737035f
VZ
37{
38public:
e1ee679c
VZ
39 // ctors: if you use default ctor you must call SetData() later!
40 //
41 // NB: the "wxWindow *win" parameter is unused and is here only for wxGTK
42 // compatibility, as well as both icon parameters
43 wxDropSource(wxWindow *win = NULL,
2d93e133
VZ
44 const wxCursor &cursorCopy = wxNullCursor,
45 const wxCursor &cursorMove = wxNullCursor,
46 const wxCursor &cursorStop = wxNullCursor);
e1ee679c 47 wxDropSource(wxDataObject& data,
2d93e133
VZ
48 wxWindow *win = NULL,
49 const wxCursor &cursorCopy = wxNullCursor,
50 const wxCursor &cursorMove = wxNullCursor,
51 const wxCursor &cursorStop = wxNullCursor);
e1ee679c
VZ
52
53 virtual ~wxDropSource();
54
55 // do it (call this in response to a mouse button press, for example)
56 // params: if bAllowMove is false, data can be only copied
57 virtual wxDragResult DoDragDrop(bool bAllowMove = FALSE);
58
59 // overridable: you may give some custom UI feedback during d&d operation
60 // in this function (it's called on each mouse move, so it shouldn't be
61 // too slow). Just return false if you want default feedback.
2d93e133 62 virtual bool GiveFeedback(wxDragResult effect);
1737035f
VZ
63
64protected:
e1ee679c 65 void Init();
1737035f
VZ
66
67private:
e1ee679c 68 wxIDropSource *m_pIDropSource; // the pointer to COM interface
1737035f
VZ
69};
70
46ccb510 71#endif //_WX_OLEDROPSRC_H