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