]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/bitmap.h
*** empty log message ***
[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"
22
23//-----------------------------------------------------------------------------
24// classes
25//-----------------------------------------------------------------------------
26
c801d85f
KB
27class wxMask;
28class wxBitmap;
29
30//-----------------------------------------------------------------------------
31// wxMask
32//-----------------------------------------------------------------------------
33
34class wxMask: public wxObject
35{
fd0eed64 36public:
8636aed8
RR
37 wxMask();
38 wxMask( const wxBitmap& bitmap, const wxColour& colour );
39 wxMask( const wxBitmap& bitmap, int paletteIndex );
40 wxMask( const wxBitmap& bitmap );
41 ~wxMask();
91b8de8d 42
8636aed8
RR
43 bool Create( const wxBitmap& bitmap, const wxColour& colour );
44 bool Create( const wxBitmap& bitmap, int paletteIndex );
45 bool Create( const wxBitmap& bitmap );
46
47 // implementation
48 GdkBitmap *m_bitmap;
49
50 GdkBitmap *GetBitmap() const;
51
52private:
53 DECLARE_DYNAMIC_CLASS(wxMask)
c801d85f
KB
54};
55
56//-----------------------------------------------------------------------------
57// wxBitmap
58//-----------------------------------------------------------------------------
59
60class wxBitmap: public wxObject
61{
fd0eed64 62public:
8636aed8
RR
63 wxBitmap();
64 wxBitmap( int width, int height, int depth = -1 );
65 wxBitmap( const char bits[], int width, int height, int depth = 1 );
66 wxBitmap( const char **bits );
67 wxBitmap( char **bits );
68 wxBitmap( const wxBitmap& bmp );
69 wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
70 ~wxBitmap();
71 wxBitmap& operator = ( const wxBitmap& bmp );
72 bool operator == ( const wxBitmap& bmp );
73 bool operator != ( const wxBitmap& bmp );
74 bool Ok() const;
75
76 int GetHeight() const;
77 int GetWidth() const;
78 int GetDepth() const;
79
80 wxMask *GetMask() const;
81 void SetMask( wxMask *mask );
82
83 bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
84 bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
85
86 wxPalette *GetPalette() const;
87 wxPalette *GetColourMap() const
fd0eed64 88 { return GetPalette(); };
8bbe427f 89
8636aed8 90 // implementation
c801d85f 91
8636aed8
RR
92 void SetHeight( int height );
93 void SetWidth( int width );
94 void SetDepth( int depth );
95 void SetPixmap( GdkPixmap *pixmap );
8bbe427f 96
8636aed8
RR
97 GdkPixmap *GetPixmap() const;
98 GdkBitmap *GetBitmap() const;
f05df5a8 99
c801d85f 100 // no data :-)
8636aed8
RR
101
102private:
103 DECLARE_DYNAMIC_CLASS(wxBitmap)
c801d85f
KB
104};
105
106#endif // __GTKBITMAPH__