]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/dataobj2.h
not needed for CG
[wxWidgets.git] / include / wx / mac / carbon / dataobj2.h
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
5 // Modified by:
6 // Created: 10/21/99
7 // RCS-ID: $Id$
8 // Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GTK_DATAOBJ2_H_
13 #define _WX_GTK_DATAOBJ2_H_
14
15 // ----------------------------------------------------------------------------
16 // wxBitmapDataObject is a specialization of wxDataObject for bitmaps
17 // ----------------------------------------------------------------------------
18
19 class WXDLLEXPORT wxBitmapDataObject : public wxBitmapDataObjectBase
20 {
21 public:
22 // ctors
23 wxBitmapDataObject();
24 wxBitmapDataObject(const wxBitmap& bitmap);
25
26 // destr
27 ~wxBitmapDataObject();
28
29 // override base class virtual to update PNG data too
30 virtual void SetBitmap(const wxBitmap& bitmap);
31
32 // implement base class pure virtuals
33 // ----------------------------------
34
35 virtual size_t GetDataSize() const ;
36 virtual bool GetDataHere(void *buf) const ;
37 virtual bool SetData(size_t len, const void *buf);
38
39 protected :
40 void Init() ;
41 void Clear() ;
42
43 void* m_pictHandle ;
44 bool m_pictCreated ;
45 private:
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)); }
53 };
54
55 // ----------------------------------------------------------------------------
56 // wxFileDataObject is a specialization of wxDataObject for file names
57 // ----------------------------------------------------------------------------
58
59 class WXDLLEXPORT wxFileDataObject : public wxFileDataObjectBase
60 {
61 public:
62 // implement base class pure virtuals
63 // ----------------------------------
64
65 void AddFile( const wxString &filename );
66
67 virtual size_t GetDataSize() const;
68 virtual bool GetDataHere(void *buf) const;
69 virtual bool SetData(size_t len, const void *buf);
70
71 private:
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)); }
79 };
80
81 #endif // _WX_GTK_DATAOBJ2_H_
82