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
8 // Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MAC_DATAOBJ2_H_
13 #define _WX_MAC_DATAOBJ2_H_
15 // ----------------------------------------------------------------------------
16 // wxBitmapDataObject is a specialization of wxDataObject for bitmaps
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxBitmapDataObject
: public wxBitmapDataObjectBase
24 wxBitmapDataObject(const wxBitmap
& bitmap
);
27 virtual ~wxBitmapDataObject();
29 // override base class virtual to update PNG data too
30 virtual void SetBitmap(const wxBitmap
& bitmap
);
32 // implement base class pure virtuals
33 // ----------------------------------
35 virtual size_t GetDataSize() const ;
36 virtual bool GetDataHere(void *buf
) const ;
37 virtual bool SetData(size_t len
, const void *buf
);
38 // Must provide overloads to avoid hiding them (and warnings about it)
39 virtual size_t GetDataSize(const wxDataFormat
&) const
43 virtual bool GetDataHere(const wxDataFormat
&, void *buf
) const
45 return GetDataHere(buf
);
47 virtual bool SetData(const wxDataFormat
&, size_t len
, const void *buf
)
49 return SetData(len
, buf
);
60 // ----------------------------------------------------------------------------
61 // wxFileDataObject is a specialization of wxDataObject for file names
62 // ----------------------------------------------------------------------------
64 class WXDLLIMPEXP_CORE wxFileDataObject
: public wxFileDataObjectBase
67 // implement base class pure virtuals
68 // ----------------------------------
70 void AddFile( const wxString
&filename
);
72 virtual size_t GetDataSize() const;
73 virtual bool GetDataHere(void *buf
) const;
74 virtual bool SetData(size_t len
, const void *buf
);
75 // Must provide overloads to avoid hiding them (and warnings about it)
76 virtual size_t GetDataSize(const wxDataFormat
&) const
80 virtual bool GetDataHere(const wxDataFormat
&, void *buf
) const
82 return GetDataHere(buf
);
84 virtual bool SetData(const wxDataFormat
&, size_t len
, const void *buf
)
86 return SetData(len
, buf
);
89 // translates the filenames stored into a utf8 encoded char stream
90 void GetFileNames(wxCharBuffer
&buf
) const ;
93 #endif // _WX_MAC_DATAOBJ2_H_