]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/dataobj2.h
added wxAnimationCtrl (patch 1570325)
[wxWidgets.git] / include / wx / mac / carbon / dataobj2.h
CommitLineData
8cf73271 1///////////////////////////////////////////////////////////////////////////////
bcd96979 2// Name: mac/dataobj2.h
8cf73271
SC
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
65571936 9// Licence: wxWindows licence
8cf73271
SC
10///////////////////////////////////////////////////////////////////////////////
11
bcd96979
SC
12#ifndef _WX_MAC_DATAOBJ2_H_
13#define _WX_MAC_DATAOBJ2_H_
8cf73271 14
8cf73271
SC
15// ----------------------------------------------------------------------------
16// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
17// ----------------------------------------------------------------------------
18
19class WXDLLEXPORT wxBitmapDataObject : public wxBitmapDataObjectBase
20{
21public:
22 // ctors
23 wxBitmapDataObject();
24 wxBitmapDataObject(const wxBitmap& bitmap);
25
26 // destr
d3c7fc99 27 virtual ~wxBitmapDataObject();
8cf73271
SC
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);
6f02a879
VZ
38 // Must provide overloads to avoid hiding them (and warnings about it)
39 virtual size_t GetDataSize(const wxDataFormat&) const
40 {
41 return GetDataSize();
42 }
43 virtual bool GetDataHere(const wxDataFormat&, void *buf) const
44 {
45 return GetDataHere(buf);
46 }
47 virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
48 {
49 return SetData(len, buf);
50 }
8cf73271
SC
51
52protected :
53 void Init() ;
54 void Clear() ;
55
56 void* m_pictHandle ;
57 bool m_pictCreated ;
8cf73271
SC
58};
59
60// ----------------------------------------------------------------------------
61// wxFileDataObject is a specialization of wxDataObject for file names
62// ----------------------------------------------------------------------------
63
64class WXDLLEXPORT wxFileDataObject : public wxFileDataObjectBase
65{
66public:
67 // implement base class pure virtuals
68 // ----------------------------------
69
70 void AddFile( const wxString &filename );
bcd96979 71
8cf73271
SC
72 virtual size_t GetDataSize() const;
73 virtual bool GetDataHere(void *buf) const;
74 virtual bool SetData(size_t len, const void *buf);
6f02a879
VZ
75 // Must provide overloads to avoid hiding them (and warnings about it)
76 virtual size_t GetDataSize(const wxDataFormat&) const
77 {
78 return GetDataSize();
79 }
80 virtual bool GetDataHere(const wxDataFormat&, void *buf) const
81 {
82 return GetDataHere(buf);
83 }
84 virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
85 {
86 return SetData(len, buf);
87 }
bcd96979
SC
88protected:
89 // translates the filenames stored into a utf8 encoded char stream
90 void GetFileNames(wxCharBuffer &buf) const ;
8cf73271
SC
91};
92
bcd96979 93#endif // _WX_MAC_DATAOBJ2_H_
8cf73271 94