]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/ole/dataobj2.h
fix unused vars for watcom
[wxWidgets.git] / include / wx / msw / ole / dataobj2.h
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
6 // Modified by:
7 // Created: 21.10.99
8 // RCS-ID: $Id$
9 // Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
10 // Licence: wxWindows license
11 ///////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_MSW_OLE_DATAOBJ2_H
14 #define _WX_MSW_OLE_DATAOBJ2_H
15
16 // ----------------------------------------------------------------------------
17 // wxBitmapDataObject is a specialization of wxDataObject for bitmap data
18 //
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 // ----------------------------------------------------------------------------
23
24 class WXDLLEXPORT wxBitmapDataObject : public wxBitmapDataObjectBase
25 {
26 public:
27 // ctors
28 wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap)
29 : wxBitmapDataObjectBase(bitmap)
30 {
31 SetFormat(wxDF_DIB);
32
33 m_data = NULL;
34 }
35
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);
40
41 private:
42 // the DIB data
43 void /* BITMAPINFO */ *m_data;
44
45 DECLARE_NO_COPY_CLASS(wxBitmapDataObject)
46 };
47
48 // ----------------------------------------------------------------------------
49 // wxBitmapDataObject2 - a data object for CF_BITMAP
50 //
51 // FIXME did I already mention it was ugly?
52 // ----------------------------------------------------------------------------
53
54 class WXDLLEXPORT wxBitmapDataObject2 : public wxBitmapDataObjectBase
55 {
56 public:
57 // ctors
58 wxBitmapDataObject2(const wxBitmap& bitmap = wxNullBitmap)
59 : wxBitmapDataObjectBase(bitmap)
60 {
61 }
62
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);
67 };
68
69 // ----------------------------------------------------------------------------
70 // wxFileDataObject - data object for CF_HDROP
71 // ----------------------------------------------------------------------------
72
73 class WXDLLEXPORT wxFileDataObject : public wxFileDataObjectBase
74 {
75 public:
76 // implement base class pure virtuals
77 virtual bool SetData(size_t len, const void *buf);
78 virtual size_t GetDataSize() const;
79 virtual bool GetDataHere(void *pData) const;
80 virtual void AddFile(const wxString& file);
81 };
82
83 // ----------------------------------------------------------------------------
84 // wxURLDataObject: data object for URLs
85 // ----------------------------------------------------------------------------
86
87 class WXDLLEXPORT wxURLDataObject : public wxDataObjectComposite
88 {
89 public:
90 wxURLDataObject();
91
92 // return the URL as string
93 wxString GetURL() const;
94
95 // Set a string as the URL in the data object
96 void SetURL(const wxString& url);
97
98 // override to set m_textFormat
99 virtual bool SetData(const wxDataFormat& format,
100 size_t len,
101 const void *buf);
102
103 private:
104 // last data object we got data in
105 wxDataObjectSimple *m_dataObjectLast;
106
107 DECLARE_NO_COPY_CLASS(wxURLDataObject)
108 };
109
110 #endif // _WX_MSW_OLE_DATAOBJ2_H