1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: os2/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_GTK_DATAOBJ2_H_
13 #define _WX_GTK_DATAOBJ2_H_
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "dataobj.h"
19 // ----------------------------------------------------------------------------
20 // wxBitmapDataObject is a specialization of wxDataObject for bitmaps
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxBitmapDataObject
: public wxBitmapDataObjectBase
28 wxBitmapDataObject(const wxBitmap
& bitmap
);
31 ~wxBitmapDataObject();
33 // override base class virtual to update PNG data too
34 virtual void SetBitmap(const wxBitmap
& bitmap
);
36 // implement base class pure virtuals
37 // ----------------------------------
39 virtual size_t GetDataSize() const ;
40 virtual bool GetDataHere(void *buf
) const ;
41 virtual bool SetData(size_t len
, const void *buf
);
50 // Virtual function hiding supression
51 size_t GetDataSize(const wxDataFormat
& rFormat
) const
52 { return(wxDataObjectSimple::GetDataSize(rFormat
)); }
53 bool GetDataHere(const wxDataFormat
& rFormat
, void* pBuf
) const
54 { return(wxDataObjectSimple::GetDataHere(rFormat
, pBuf
)); }
55 bool SetData(const wxDataFormat
& rFormat
, size_t nLen
, const void* pBuf
)
56 { return(wxDataObjectSimple::SetData(rFormat
, nLen
, pBuf
)); }
59 // ----------------------------------------------------------------------------
60 // wxFileDataObject is a specialization of wxDataObject for file names
61 // ----------------------------------------------------------------------------
63 class WXDLLEXPORT 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
);
76 // Virtual function hiding supression
77 size_t GetDataSize(const wxDataFormat
& rFormat
) const
78 { return(wxDataObjectSimple::GetDataSize(rFormat
)); }
79 bool GetDataHere(const wxDataFormat
& rFormat
, void* pBuf
) const
80 { return(wxDataObjectSimple::GetDataHere(rFormat
, pBuf
)); }
81 bool SetData(const wxDataFormat
& rFormat
, size_t nLen
, const void* pBuf
)
82 { return(wxDataObjectSimple::SetData(rFormat
, nLen
, pBuf
)); }
85 #endif // _WX_GTK_DATAOBJ2_H_