]> git.saurik.com Git - wxWidgets.git/blame - include/wx/qt/bitmap.h
fixed mysterious mistakes
[wxWidgets.git] / include / wx / qt / bitmap.h
CommitLineData
7c78e7c7
RR
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 wxToolBar;
32class wxBitmapButton;
33class wxStaticBitmap;
34class wxFrame;
35
36class wxMask;
37class wxBitmap;
38
39//-----------------------------------------------------------------------------
40// wxMask
41//-----------------------------------------------------------------------------
42
43class wxMask: public wxObject
44{
45 DECLARE_DYNAMIC_CLASS(wxMask)
46
47 public:
48
49 wxMask();
50 wxMask( const wxBitmap& bitmap, const wxColour& colour );
51 wxMask( const wxBitmap& bitmap, int paletteIndex );
52 wxMask( const wxBitmap& bitmap );
53 ~wxMask();
54
55 private:
56
57 friend wxBitmap;
58 friend wxDC;
59 friend wxPaintDC;
60 friend wxToolBar;
61 friend wxBitmapButton;
62 friend wxStaticBitmap;
63 friend wxFrame;
64
65 protected:
66
67};
68
69//-----------------------------------------------------------------------------
70// wxBitmap
71//-----------------------------------------------------------------------------
72
73// CMB 20/5/98: added xbm constructor and GetBitmap() method
74class wxBitmap: public wxObject
75{
76 DECLARE_DYNAMIC_CLASS(wxBitmap)
77
78 public:
79
80 wxBitmap();
81 wxBitmap( int width, int height, int depth = -1 );
82 wxBitmap( const char bits[], int width, int height, int depth = 1 );
83 wxBitmap( char **bits );
84 wxBitmap( const wxBitmap& bmp );
85 wxBitmap( const wxBitmap* bmp );
86 wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM);
87 ~wxBitmap();
88 wxBitmap& operator = ( const wxBitmap& bmp );
89 bool operator == ( const wxBitmap& bmp );
90 bool operator != ( const wxBitmap& bmp );
91 bool Ok() const;
92
93 int GetHeight() const;
94 int GetWidth() const;
95 int GetDepth() const;
96 void SetHeight( int height );
97 void SetWidth( int width );
98 void SetDepth( int depth );
99
100 wxMask *GetMask() const;
101 void SetMask( wxMask *mask );
102
103 void Resize( int height, int width );
104
105 bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL );
106 bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM);
107
108 wxPalette *GetPalette() const;
109 wxPalette *GetColourMap() const
110 { return GetPalette(); };
111
112 private:
113
114 friend wxDC;
115 friend wxPaintDC;
116 friend wxMemoryDC;
117 friend wxToolBar;
118 friend wxBitmapButton;
119 friend wxStaticBitmap;
120 friend wxFrame;
121
122 // no data :-)
123};
124
125#endif // __GTKBITMAPH__