1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/ole/dataobj2.h
3 // Purpose: second part of platform specific wxDataObject header -
4 // declarations of predefined wxDataObjectSimple-derived classes
5 // Author: Vadim Zeitlin
9 // Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
10 // Licence: wxWindows licence
11 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_MSW_OLE_DATAOBJ2_H
14 #define _WX_MSW_OLE_DATAOBJ2_H
16 // ----------------------------------------------------------------------------
17 // wxBitmapDataObject is a specialization of wxDataObject for bitmap data
19 // NB: in fact, under MSW we support CF_DIB (and not CF_BITMAP) clipboard
20 // format and we also provide wxBitmapDataObject2 for CF_BITMAP (which is
21 // rarely used). This is ugly, but I haven't found a solution for it yet.
22 // ----------------------------------------------------------------------------
24 class WXDLLEXPORT wxBitmapDataObject
: public wxBitmapDataObjectBase
28 wxBitmapDataObject(const wxBitmap
& bitmap
= wxNullBitmap
)
29 : wxBitmapDataObjectBase(bitmap
)
36 // implement base class pure virtuals
37 virtual size_t GetDataSize() const;
38 virtual bool GetDataHere(void *buf
) const;
39 virtual bool SetData(size_t len
, const void *buf
);
43 void /* BITMAPINFO */ *m_data
;
45 DECLARE_NO_COPY_CLASS(wxBitmapDataObject
)
48 // ----------------------------------------------------------------------------
49 // wxBitmapDataObject2 - a data object for CF_BITMAP
51 // FIXME did I already mention it was ugly?
52 // ----------------------------------------------------------------------------
54 class WXDLLEXPORT wxBitmapDataObject2
: public wxBitmapDataObjectBase
58 wxBitmapDataObject2(const wxBitmap
& bitmap
= wxNullBitmap
)
59 : wxBitmapDataObjectBase(bitmap
)
63 // implement base class pure virtuals
64 virtual size_t GetDataSize() const;
65 virtual bool GetDataHere(void *buf
) const;
66 virtual bool SetData(size_t len
, const void *buf
);
69 DECLARE_NO_COPY_CLASS(wxBitmapDataObject2
)
72 // ----------------------------------------------------------------------------
73 // wxFileDataObject - data object for CF_HDROP
74 // ----------------------------------------------------------------------------
76 class WXDLLEXPORT wxFileDataObject
: public wxFileDataObjectBase
79 wxFileDataObject() { }
81 // implement base class pure virtuals
82 virtual bool SetData(size_t len
, const void *buf
);
83 virtual size_t GetDataSize() const;
84 virtual bool GetDataHere(void *pData
) const;
85 virtual void AddFile(const wxString
& file
);
88 DECLARE_NO_COPY_CLASS(wxFileDataObject
)
91 // ----------------------------------------------------------------------------
92 // wxURLDataObject: data object for URLs
93 // ----------------------------------------------------------------------------
95 class WXDLLEXPORT wxURLDataObject
: public wxDataObjectComposite
100 // return the URL as string
101 wxString
GetURL() const;
103 // Set a string as the URL in the data object
104 void SetURL(const wxString
& url
);
106 // override to set m_textFormat
107 virtual bool SetData(const wxDataFormat
& format
,
112 // last data object we got data in
113 wxDataObjectSimple
*m_dataObjectLast
;
115 DECLARE_NO_COPY_CLASS(wxURLDataObject
)
118 #endif // _WX_MSW_OLE_DATAOBJ2_H