]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/bitmap.h
Changed wxRectangle to wxRect. Sorry for the bandwidth...
[wxWidgets.git] / include / wx / gtk1 / 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
fd0eed64
RR
39public:
40 wxMask();
41 wxMask( const wxBitmap& bitmap, const wxColour& colour );
42 wxMask( const wxBitmap& bitmap, int paletteIndex );
43 wxMask( const wxBitmap& bitmap );
44 ~wxMask();
45
46 // implementation
f3cb6592 47
fd0eed64
RR
48 GdkBitmap *m_bitmap;
49 GdkBitmap *GetBitmap() const;
c801d85f
KB
50};
51
52//-----------------------------------------------------------------------------
53// wxBitmap
54//-----------------------------------------------------------------------------
55
56class wxBitmap: public wxObject
57{
58 DECLARE_DYNAMIC_CLASS(wxBitmap)
59
fd0eed64
RR
60public:
61 wxBitmap();
62 wxBitmap( int width, int height, int depth = -1 );
63 wxBitmap( const char bits[], int width, int height, int depth = 1 );
64 wxBitmap( const wxImage &image );
e52f60e6 65 wxBitmap( const char **bits );
fd0eed64
RR
66 wxBitmap( char **bits );
67 wxBitmap( const wxBitmap& bmp );
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;
01111366 75
fd0eed64 76 wxImage ConvertToImage() const;
44216b3b 77
fd0eed64
RR
78 int GetHeight() const;
79 int GetWidth() const;
80 int GetDepth() const;
81 void SetHeight( int height );
82 void SetWidth( int width );
83 void SetDepth( int depth );
c801d85f 84
fd0eed64
RR
85 wxMask *GetMask() const;
86 void SetMask( wxMask *mask );
44216b3b 87
fd0eed64
RR
88 bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
89 bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
debe6624 90
fd0eed64
RR
91 wxPalette *GetPalette() const;
92 wxPalette *GetColourMap() const
93 { return GetPalette(); };
f3cb6592 94
fd0eed64 95// implementation
c801d85f 96
fd0eed64
RR
97 GdkPixmap *GetPixmap() const;
98 GdkBitmap *GetBitmap() const;
f05df5a8 99
c801d85f
KB
100 // no data :-)
101};
102
103#endif // __GTKBITMAPH__