]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/bitmap.h
Made icons configurable via a wxMApp virtual function. Tested on wxGTK only,
[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{
36 DECLARE_DYNAMIC_CLASS(wxMask)
37
fd0eed64
RR
38public:
39 wxMask();
40 wxMask( const wxBitmap& bitmap, const wxColour& colour );
41 wxMask( const wxBitmap& bitmap, int paletteIndex );
42 wxMask( const wxBitmap& bitmap );
43 ~wxMask();
91b8de8d
RR
44
45 bool Create( const wxBitmap& bitmap, const wxColour& colour );
46 bool Create( const wxBitmap& bitmap, int paletteIndex );
47 bool Create( const wxBitmap& bitmap );
fd0eed64
RR
48
49 // implementation
8bbe427f 50
fd0eed64
RR
51 GdkBitmap *m_bitmap;
52 GdkBitmap *GetBitmap() const;
c801d85f
KB
53};
54
55//-----------------------------------------------------------------------------
56// wxBitmap
57//-----------------------------------------------------------------------------
58
59class wxBitmap: public wxObject
60{
61 DECLARE_DYNAMIC_CLASS(wxBitmap)
62
fd0eed64
RR
63public:
64 wxBitmap();
65 wxBitmap( int width, int height, int depth = -1 );
66 wxBitmap( const char bits[], int width, int height, int depth = 1 );
e52f60e6 67 wxBitmap( const char **bits );
fd0eed64
RR
68 wxBitmap( char **bits );
69 wxBitmap( const wxBitmap& bmp );
fd0eed64
RR
70 wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
71 ~wxBitmap();
72 wxBitmap& operator = ( const wxBitmap& bmp );
73 bool operator == ( const wxBitmap& bmp );
74 bool operator != ( const wxBitmap& bmp );
75 bool Ok() const;
8bbe427f 76
fd0eed64
RR
77 int GetHeight() const;
78 int GetWidth() const;
79 int GetDepth() const;
c801d85f 80
fd0eed64
RR
81 wxMask *GetMask() const;
82 void SetMask( wxMask *mask );
44216b3b 83
fd0eed64
RR
84 bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
85 bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
debe6624 86
fd0eed64
RR
87 wxPalette *GetPalette() const;
88 wxPalette *GetColourMap() const
89 { return GetPalette(); };
8bbe427f
VZ
90
91// implementation
c801d85f 92
4bc67cc5
RR
93 void SetHeight( int height );
94 void SetWidth( int width );
95 void SetDepth( int depth );
96 void SetPixmap( GdkPixmap *pixmap );
8bbe427f 97
fd0eed64
RR
98 GdkPixmap *GetPixmap() const;
99 GdkBitmap *GetBitmap() const;
f05df5a8 100
c801d85f
KB
101 // no data :-)
102};
103
104#endif // __GTKBITMAPH__