1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/dataobj2.h
3 // Purpose: declaration of standard wxDataObjectSimple-derived classes
4 // Author: David Webster (adapted from Robert Roebling's gtk port
7 // Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MAC_DATAOBJ2_H_
12 #define _WX_MAC_DATAOBJ2_H_
14 // ----------------------------------------------------------------------------
15 // wxBitmapDataObject is a specialization of wxDataObject for bitmaps
16 // ----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxBitmapDataObject
: public wxBitmapDataObjectBase
23 wxBitmapDataObject(const wxBitmap
& bitmap
);
26 virtual ~wxBitmapDataObject();
28 // override base class virtual to update PNG data too
29 virtual void SetBitmap(const wxBitmap
& bitmap
);
31 // implement base class pure virtuals
32 // ----------------------------------
34 virtual size_t GetDataSize() const ;
35 virtual bool GetDataHere(void *buf
) const ;
36 virtual bool SetData(size_t len
, const void *buf
);
37 // Must provide overloads to avoid hiding them (and warnings about it)
38 virtual size_t GetDataSize(const wxDataFormat
&) const
42 virtual bool GetDataHere(const wxDataFormat
&, void *buf
) const
44 return GetDataHere(buf
);
46 virtual bool SetData(const wxDataFormat
&, size_t len
, const void *buf
)
48 return SetData(len
, buf
);
59 // ----------------------------------------------------------------------------
60 // wxFileDataObject is a specialization of wxDataObject for file names
61 // ----------------------------------------------------------------------------
63 class WXDLLIMPEXP_CORE wxFileDataObject
: public wxFileDataObjectBase
66 // implement base class pure virtuals
67 // ----------------------------------
69 void AddFile( const wxString
&filename
);
71 virtual size_t GetDataSize() const;
72 virtual bool GetDataHere(void *buf
) const;
73 virtual bool SetData(size_t len
, const void *buf
);
74 // Must provide overloads to avoid hiding them (and warnings about it)
75 virtual size_t GetDataSize(const wxDataFormat
&) const
79 virtual bool GetDataHere(const wxDataFormat
&, void *buf
) const
81 return GetDataHere(buf
);
83 virtual bool SetData(const wxDataFormat
&, size_t len
, const void *buf
)
85 return SetData(len
, buf
);
88 // translates the filenames stored into a utf8 encoded char stream
89 void GetFileNames(wxCharBuffer
&buf
) const ;
92 #endif // _WX_MAC_DATAOBJ2_H_