]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/dataobj2.h
forwarding position changed events to peer
[wxWidgets.git] / include / wx / mac / carbon / dataobj2.h
CommitLineData
8cf73271
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
65571936 9// Licence: wxWindows licence
8cf73271
SC
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GTK_DATAOBJ2_H_
13#define _WX_GTK_DATAOBJ2_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "dataobj.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxBitmapDataObject : public wxBitmapDataObjectBase
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
39 virtual size_t GetDataSize() const ;
40 virtual bool GetDataHere(void *buf) const ;
41 virtual bool SetData(size_t len, const void *buf);
42
43protected :
44 void Init() ;
45 void Clear() ;
46
47 void* m_pictHandle ;
48 bool m_pictCreated ;
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
63class WXDLLEXPORT wxFileDataObject : public wxFileDataObjectBase
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