]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/ole/dropsrc.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: declaration of the wxDropSource class
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
19 #if !USE_DRAG_AND_DROP
20 #error "You should #define USE_DRAG_AND_DROP to 1 to compile this file!"
23 // ----------------------------------------------------------------------------
24 // forward declarations
25 // ----------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------
30 // wxDropSource is used to start the drag-&-drop operation on associated
31 // wxDataObject object. It's responsible for giving UI feedback while dragging.
32 // ----------------------------------------------------------------------------
38 Error
, // error prevented the d&d operation from completing
39 None
, // drag target didn't accept the data
40 Copy
, // the data was successfully copied
41 Move
, // the data was successfully moved
42 Cancel
// the operation was cancelled by user (not an error)
45 // ctors: if you use default ctor you must call SetData() later!
47 wxDropSource(wxDataObject
& data
);
49 void SetData(wxDataObject
& data
);
51 virtual ~wxDropSource();
53 // do it (call this in response to a mouse button press, for example)
54 // params: if bAllowMove is false, data can be only copied
55 DragResult
DoDragDrop(bool bAllowMove
= FALSE
);
57 // overridable: you may give some custom UI feedback during d&d operation
58 // in this function (it's called on each mouse move, so it shouldn't be too
59 // slow). Just return false if you want default feedback.
60 virtual bool GiveFeedback(DragResult effect
, bool bScrolling
);
65 wxDataObject
*m_pData
; // pointer to associated data object
68 wxIDropSource
*m_pIDropSource
; // the pointer to COM interface
71 #endif //_OLEDROPSRC_H