]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/bitmap.h
changed the notebook control to use AddPage() interface (Julian's version
[wxWidgets.git] / include / wx / gtk / bitmap.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: bitmap.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// RCS-ID: $Id$
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8// Licence: wxWindows licence
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
28class wxDC;
29class wxPaintDC;
30class wxMemoryDC;
31class wxToolBarGTK;
32class wxBitmapButton;
33class wxStaticBitmap;
34
35class wxMask;
36class wxBitmap;
37
38//-----------------------------------------------------------------------------
39// wxMask
40//-----------------------------------------------------------------------------
41
42class wxMask: public wxObject
43{
44 DECLARE_DYNAMIC_CLASS(wxMask)
45
46 public:
47
48 wxMask(void);
49 wxMask( const wxBitmap& bitmap, const wxColour& colour );
50 wxMask( const wxBitmap& bitmap, const int paletteIndex );
51 wxMask( const wxBitmap& bitmap );
52 ~wxMask(void);
53
54 private:
55
56 friend wxBitmap;
57 friend wxDC;
58 friend wxPaintDC;
59 friend wxToolBarGTK;
60 friend wxBitmapButton;
61 friend wxStaticBitmap;
62
63 GdkBitmap *GetBitmap(void) const;
64
65 protected:
66
67 GdkBitmap *m_bitmap;
68
69};
70
71//-----------------------------------------------------------------------------
72// wxBitmap
73//-----------------------------------------------------------------------------
74
75// CMB 20/5/98: added xbm constructor and GetBitmap() method
76class wxBitmap: public wxObject
77{
78 DECLARE_DYNAMIC_CLASS(wxBitmap)
79
80 public:
81
82 wxBitmap(void);
83 wxBitmap( const int width, const int height, const int depth = -1 );
84 wxBitmap( const char bits[], const int width, const int height, const int depth = 1 );
85 wxBitmap( char **bits );
86 wxBitmap( const wxBitmap& bmp );
87 wxBitmap( const wxBitmap* bmp );
88 wxBitmap( const wxString &filename, const int type );
89 ~wxBitmap(void);
90 wxBitmap& operator = ( const wxBitmap& bmp );
91 bool operator == ( const wxBitmap& bmp );
92 bool operator != ( const wxBitmap& bmp );
93 bool Ok(void) const;
94
95 int GetHeight(void) const;
96 int GetWidth(void) const;
97 int GetDepth(void) const;
98 void SetHeight( const int height );
99 void SetWidth( const int width );
100 void SetDepth( const int depth );
101
102 wxMask *GetMask(void) const;
103 void SetMask( wxMask *mask );
104
105 bool SaveFile( const wxString &name, const int type, wxPalette *palette = NULL );
106 bool LoadFile( const wxString &name, const int type );
107
108 wxPalette *GetPalette(void) const;
109 wxPalette *GetColourMap(void) const
110 { return GetPalette(); };
111
112 private:
113
114 friend wxDC;
115 friend wxPaintDC;
116 friend wxMemoryDC;
117 friend wxToolBarGTK;
118 friend wxBitmapButton;
119 friend wxStaticBitmap;
120
121 GdkPixmap *GetPixmap(void) const;
122 GdkBitmap *GetBitmap(void) const;
123
124 // no data :-)
125};
126
127#endif // __GTKBITMAPH__