]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/bitmap.h
Added WXHTREEITEM
[wxWidgets.git] / include / wx / gtk / bitmap.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: bitmap.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6f65e337 6// RCS-ID: $Id$
c801d85f 7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
f05df5a8 8// Licence: wxWindows licence
c801d85f
KB
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifndef __GTKBITMAPH__
13#define __GTKBITMAPH__
14
15#ifdef __GNUG__
16#pragma interface
17#endif
18
19#include "wx/defs.h"
20#include "wx/object.h"
21#include "wx/string.h"
22#include "wx/palette.h"
23
24//-----------------------------------------------------------------------------
25// classes
26//-----------------------------------------------------------------------------
27
c801d85f
KB
28class wxMask;
29class wxBitmap;
30
31//-----------------------------------------------------------------------------
32// wxMask
33//-----------------------------------------------------------------------------
34
35class wxMask: public wxObject
36{
37 DECLARE_DYNAMIC_CLASS(wxMask)
38
39 public:
44216b3b
VZ
40
41 wxMask();
c801d85f 42 wxMask( const wxBitmap& bitmap, const wxColour& colour );
debe6624 43 wxMask( const wxBitmap& bitmap, int paletteIndex );
c801d85f 44 wxMask( const wxBitmap& bitmap );
44216b3b 45 ~wxMask();
c801d85f 46
f3cb6592
RR
47 // implementation
48
44216b3b
VZ
49 GdkBitmap *GetBitmap() const;
50
c801d85f 51 protected:
11bc0805
RR
52
53 friend wxBitmap;
44216b3b
VZ
54
55 GdkBitmap *m_bitmap;
56
c801d85f
KB
57};
58
59//-----------------------------------------------------------------------------
60// wxBitmap
61//-----------------------------------------------------------------------------
62
6f65e337 63// CMB 20/5/98: added xbm constructor and GetBitmap() method
c801d85f
KB
64class wxBitmap: public wxObject
65{
66 DECLARE_DYNAMIC_CLASS(wxBitmap)
67
68 public:
69
44216b3b 70 wxBitmap();
debe6624
JS
71 wxBitmap( int width, int height, int depth = -1 );
72 wxBitmap( const char bits[], int width, int height, int depth = 1 );
c801d85f
KB
73 wxBitmap( char **bits );
74 wxBitmap( const wxBitmap& bmp );
75 wxBitmap( const wxBitmap* bmp );
44216b3b
VZ
76 wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM);
77 ~wxBitmap();
c801d85f
KB
78 wxBitmap& operator = ( const wxBitmap& bmp );
79 bool operator == ( const wxBitmap& bmp );
80 bool operator != ( const wxBitmap& bmp );
44216b3b
VZ
81 bool Ok() const;
82
83 int GetHeight() const;
84 int GetWidth() const;
85 int GetDepth() const;
debe6624
JS
86 void SetHeight( int height );
87 void SetWidth( int width );
88 void SetDepth( int depth );
c801d85f 89
44216b3b 90 wxMask *GetMask() const;
c801d85f 91 void SetMask( wxMask *mask );
44216b3b 92
219f895a 93 void Resize( int height, int width );
44216b3b 94
c67daf87 95 bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
44216b3b 96 bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM);
debe6624 97
44216b3b
VZ
98 wxPalette *GetPalette() const;
99 wxPalette *GetColourMap() const
c801d85f 100 { return GetPalette(); };
f3cb6592
RR
101
102 // implementation
c801d85f 103
44216b3b
VZ
104 GdkPixmap *GetPixmap() const;
105 GdkBitmap *GetBitmap() const;
f05df5a8 106
44216b3b
VZ
107 void DestroyImage();
108 void RecreateImage();
109 void Render();
110
c801d85f
KB
111 // no data :-)
112};
113
114#endif // __GTKBITMAPH__