]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/dataobj2.h
workaround a Watcom build
[wxWidgets.git] / include / wx / mac / dataobj2.h
CommitLineData
ef6bd27b
SC
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
371a5b4e 9// Licence: wxWindows licence
ef6bd27b
SC
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GTK_DATAOBJ2_H_
13#define _WX_GTK_DATAOBJ2_H_
14
af49c4b8 15#if defined(__GNUG__) && !defined(__APPLE__)
ef6bd27b
SC
16 #pragma interface "dataobj.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
21// ----------------------------------------------------------------------------
22
2b5f62a0 23class WXDLLEXPORT wxBitmapDataObject : public wxBitmapDataObjectBase
ef6bd27b
SC
24{
25public:
26 // ctors
27 wxBitmapDataObject();
28 wxBitmapDataObject(const wxBitmap& bitmap);
29
30 // destr
31 ~wxBitmapDataObject();
32
33 // override base class virtual to update PNG data too
34 virtual void SetBitmap(const wxBitmap& bitmap);
35
36 // implement base class pure virtuals
37 // ----------------------------------
38
1c522100
SC
39 virtual size_t GetDataSize() const ;
40 virtual bool GetDataHere(void *buf) const ;
ef6bd27b
SC
41 virtual bool SetData(size_t len, const void *buf);
42
1c522100 43protected :
d921af51
JS
44 void Init() ;
45 void Clear() ;
46
47 void* m_pictHandle ;
48 bool m_pictCreated ;
ef6bd27b
SC
49private:
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)); }
57};
58
59// ----------------------------------------------------------------------------
60// wxFileDataObject is a specialization of wxDataObject for file names
61// ----------------------------------------------------------------------------
62
2b5f62a0 63class WXDLLEXPORT wxFileDataObject : public wxFileDataObjectBase
ef6bd27b
SC
64{
65public:
66 // implement base class pure virtuals
67 // ----------------------------------
68
69 void AddFile( const wxString &filename );
70
71 virtual size_t GetDataSize() const;
72 virtual bool GetDataHere(void *buf) const;
73 virtual bool SetData(size_t len, const void *buf);
74
75private:
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)); }
83};
84
85#endif // _WX_GTK_DATAOBJ2_H_
86