]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/bitmap.h
wxWave class for wxGTK (linux)
[wxWidgets.git] / include / wx / gtk / bitmap.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: bitmap.h
3// Purpose:
4// Author: Robert Roebling
6f65e337 5// RCS-ID: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
f05df5a8 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKBITMAPH__
12#define __GTKBITMAPH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19#include "wx/object.h"
20#include "wx/string.h"
21#include "wx/palette.h"
01111366 22#include "wx/image.h"
c801d85f
KB
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
63class wxBitmap: public wxObject
64{
65 DECLARE_DYNAMIC_CLASS(wxBitmap)
66
67 public:
68
44216b3b 69 wxBitmap();
debe6624
JS
70 wxBitmap( int width, int height, int depth = -1 );
71 wxBitmap( const char bits[], int width, int height, int depth = 1 );
01111366 72 wxBitmap( const wxImage &image );
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 81 bool Ok() const;
01111366
RR
82
83 wxImage ConvertToImage() const;
44216b3b
VZ
84
85 int GetHeight() const;
86 int GetWidth() const;
87 int GetDepth() const;
debe6624
JS
88 void SetHeight( int height );
89 void SetWidth( int width );
90 void SetDepth( int depth );
c801d85f 91
44216b3b 92 wxMask *GetMask() const;
c801d85f 93 void SetMask( wxMask *mask );
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
c801d85f
KB
107 // no data :-)
108};
109
110#endif // __GTKBITMAPH__