]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/dataobj2.h
Some work on tabbing and menu accels,
[wxWidgets.git] / include / wx / gtk1 / dataobj2.h
CommitLineData
3f364be8
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: gtk/dataobj2.h
3// Purpose: declaration of standard wxDataObjectSimple-derived classes
4// Author: Robert Roebling
5// Created: 19.10.99 (extracted from gtk/dataobj.h)
6// RCS-ID: $Id$
7// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
8// Licence: wxWindows license
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_GTK_DATAOBJ2_H_
12#define _WX_GTK_DATAOBJ2_H_
13
14#ifdef __GNUG__
15 #pragma interface "dataobj.h"
16#endif
17
18// ----------------------------------------------------------------------------
19// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
20// ----------------------------------------------------------------------------
21
22class wxBitmapDataObject : public wxBitmapDataObjectBase
23{
24public:
25 // ctors
26 wxBitmapDataObject();
27 wxBitmapDataObject(const wxBitmap& bitmap);
28
29 // destr
30 ~wxBitmapDataObject();
31
32 // override base class virtual to update PNG data too
33 virtual void SetBitmap(const wxBitmap& bitmap);
34
3f364be8
VZ
35 // implement base class pure virtuals
36 // ----------------------------------
37
38 virtual size_t GetDataSize() const { return m_pngSize; }
39 virtual bool GetDataHere(void *buf) const;
40 virtual bool SetData(size_t len, const void *buf);
41
42protected:
43 void Init() { m_pngData = (void *)NULL; m_pngSize = 0; }
44 void Clear() { free(m_pngData); }
45 void ClearAll() { Clear(); Init(); }
46
3f364be8
VZ
47 size_t m_pngSize;
48 void *m_pngData;
49
50 void DoConvertToPng();
51};
52
53// ----------------------------------------------------------------------------
54// wxFileDataObject is a specialization of wxDataObject for file names
55// ----------------------------------------------------------------------------
56
57class wxFileDataObject : public wxFileDataObjectBase
58{
59public:
60 // implement base class pure virtuals
61 // ----------------------------------
62
b068c4e8
RR
63 void AddFile( const wxString &filename );
64
3f364be8
VZ
65 virtual size_t GetDataSize() const;
66 virtual bool GetDataHere(void *buf) const;
67 virtual bool SetData(size_t len, const void *buf);
68};
69
70#endif // _WX_GTK_DATAOBJ2_H_
71