]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/bitmap.h
GTK wxBitmapButton added
[wxWidgets.git] / include / wx / gtk / bitmap.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: bitmap.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // 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
28 class wxMask;
29 class wxBitmap;
30
31 //-----------------------------------------------------------------------------
32 // wxMask
33 //-----------------------------------------------------------------------------
34
35 class wxMask: public wxObject
36 {
37 DECLARE_DYNAMIC_CLASS(wxMask)
38
39 public:
40
41 wxMask(void);
42 wxMask( const wxBitmap& bitmap, const wxColour& colour );
43 wxMask( const wxBitmap& bitmap, const int paletteIndex );
44 wxMask( const wxBitmap& bitmap );
45 ~wxMask(void);
46
47 public:
48
49 GdkBitmap *GetBitmap(void) const;
50
51 protected:
52
53 GdkBitmap *m_bitmap;
54
55 };
56
57 //-----------------------------------------------------------------------------
58 // wxBitmap
59 //-----------------------------------------------------------------------------
60
61 class wxBitmap: public wxObject
62 {
63 DECLARE_DYNAMIC_CLASS(wxBitmap)
64
65 public:
66
67 wxBitmap(void);
68 wxBitmap( const int width, const int height, const int depth = -1 );
69 wxBitmap( char **bits );
70 wxBitmap( const wxBitmap& bmp );
71 wxBitmap( const wxBitmap* bmp );
72 wxBitmap( const wxString &filename, const int type );
73 ~wxBitmap(void);
74 wxBitmap& operator = ( const wxBitmap& bmp );
75 bool operator == ( const wxBitmap& bmp );
76 bool operator != ( const wxBitmap& bmp );
77 bool Ok(void) const;
78
79 int GetHeight(void) const;
80 int GetWidth(void) const;
81 int GetDepth(void) const;
82 void SetHeight( const int height );
83 void SetWidth( const int width );
84 void SetDepth( const int depth );
85
86 wxMask *GetMask(void) const;
87 void SetMask( wxMask *mask );
88
89 bool SaveFile( const wxString &name, const int type, wxPalette *palette = NULL );
90 bool LoadFile( const wxString &name, const int type );
91
92 wxPalette *GetPalette(void) const;
93 wxPalette *GetColourMap(void) const
94 { return GetPalette(); };
95
96 public:
97
98 GdkPixmap *GetPixmap(void) const;
99
100 // no data :-)
101 };
102
103 #endif // __GTKBITMAPH__