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 // ----------------------------------------------------------------------------
16 // wxBitmapDataObject is a specialization of wxDataObject for bitmaps
17 // ----------------------------------------------------------------------------
19 class WXDLLEXPORT 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
);
46 // Virtual function hiding supression
47 size_t GetDataSize(const wxDataFormat
& rFormat
) const
48 { return(wxDataObjectSimple::GetDataSize(rFormat
)); }
49 bool GetDataHere(const wxDataFormat
& rFormat
, void* pBuf
) const
50 { return(wxDataObjectSimple::GetDataHere(rFormat
, pBuf
)); }
51 bool SetData(const wxDataFormat
& rFormat
, size_t nLen
, const void* pBuf
)
52 { return(wxDataObjectSimple::SetData(rFormat
, nLen
, pBuf
)); }
55 // ----------------------------------------------------------------------------
56 // wxFileDataObject is a specialization of wxDataObject for file names
57 // ----------------------------------------------------------------------------
59 class WXDLLEXPORT wxFileDataObject
: public wxFileDataObjectBase
62 // implement base class pure virtuals
63 // ----------------------------------
65 void AddFile( const wxString
&filename
);
67 virtual size_t GetDataSize() const;
68 virtual bool GetDataHere(void *buf
) const;
69 virtual bool SetData(size_t len
, const void *buf
);
72 // Virtual function hiding supression
73 size_t GetDataSize(const wxDataFormat
& rFormat
) const
74 { return(wxDataObjectSimple::GetDataSize(rFormat
)); }
75 bool GetDataHere(const wxDataFormat
& rFormat
, void* pBuf
) const
76 { return(wxDataObjectSimple::GetDataHere(rFormat
, pBuf
)); }
77 bool SetData(const wxDataFormat
& rFormat
, size_t nLen
, const void* pBuf
)
78 { return(wxDataObjectSimple::SetData(rFormat
, nLen
, pBuf
)); }
81 #endif // _WX_GTK_DATAOBJ2_H_