]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/ole/dataobj.h
f686ef4bb755eaf5c3939c69a41b90ad20de1d43
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: msw/ole/dataobj.h
3 // Purpose: declaration of the wxDataObject class
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSW_OLE_DATAOBJ_H
13 #define _WX_MSW_OLE_DATAOBJ_H
15 // ----------------------------------------------------------------------------
16 // forward declarations
17 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
22 // wxDataObject is a "smart" and polymorphic piece of data.
23 // ----------------------------------------------------------------------------
25 class WXDLLEXPORT wxDataObject
: public wxDataObjectBase
30 virtual ~wxDataObject();
32 // retrieve IDataObject interface (for other OLE related classes)
33 IDataObject
*GetInterface() const { return m_pIDataObject
; }
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
39 // return TRUE if we support this format in "Get" direction
40 bool IsSupportedFormat(const wxDataFormat
& format
) const
41 { return wxDataObjectBase::IsSupported(format
, Get
); }
43 // function to return symbolic name of clipboard format (for debug messages)
45 static const wxChar
*GetFormatName(wxDataFormat format
);
47 #define wxGetFormatName(format) wxDataObject::GetFormatName(format)
49 #define wxGetFormatName(format) _T("")
50 #endif // Debug/!Debug
51 // they need to be accessed from wxIDataObject, so made them public,
52 // or wxIDataObject friend
54 virtual const void* GetSizeFromBuffer( const void* buffer
, size_t* size
,
55 const wxDataFormat
& format
);
56 virtual void* SetSizeInBuffer( void* buffer
, size_t size
,
57 const wxDataFormat
& format
);
58 virtual size_t GetBufferOffset( const wxDataFormat
& format
);
60 IDataObject
*m_pIDataObject
; // pointer to the COM interface
62 DECLARE_NO_COPY_CLASS(wxDataObject
)
65 #endif //_WX_MSW_OLE_DATAOBJ_H