MSW compilation fixes (untested)
[wxWidgets.git] / include / wx / msw / ole / dataobj.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: msw/ole/dataobj.h
3 // Purpose: declaration of the wxDataObject class
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 10.05.98
7 // RCS-ID: $Id$
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MSW_OLE_DATAOBJ_H
13 #define _WX_MSW_OLE_DATAOBJ_H
14
15 // ----------------------------------------------------------------------------
16 // forward declarations
17 // ----------------------------------------------------------------------------
18
19 struct IDataObject;
20
21 // ----------------------------------------------------------------------------
22 // wxDataObject is a "smart" and polymorphic piece of data.
23 // ----------------------------------------------------------------------------
24
25 class WXDLLEXPORT wxDataObject : public wxDataObjectBase
26 {
27 public:
28 // ctor & dtor
29 wxDataObject();
30 virtual ~wxDataObject();
31
32 // retrieve IDataObject interface (for other OLE related classes)
33 IDataObject *GetInterface() const { return m_pIDataObject; }
34
35 // tell the object that it should be now owned by IDataObject - i.e. when
36 // it is deleted, it should delete us as well
37 void SetAutoDelete();
38
39 // return TRUE if we support this format in "Get" direction
40 bool IsSupportedFormat(const wxDataFormat& format) const;
41
42 #ifdef __WXDEBUG__
43 // function to return symbolic name of clipboard format (for debug messages)
44 static const char *GetFormatName(wxDataFormat format);
45
46 #define wxGetFormatName(format) wxDataObject::GetFormatName(format)
47 #else // !Debug
48 #define wxGetFormatName(format) ""
49 #endif // Debug/!Debug
50
51 private:
52 IDataObject *m_pIDataObject; // pointer to the COM interface
53 };
54
55 #endif //_WX_MSW_OLE_DATAOBJ_H