]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/bitmap.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKBITMAPH__
13 #define __GTKBITMAPH__
20 #include "wx/object.h"
21 #include "wx/string.h"
22 #include "wx/palette.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 class wxMask
: public wxObject
37 DECLARE_DYNAMIC_CLASS(wxMask
)
42 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
43 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
44 wxMask( const wxBitmap
& bitmap
);
49 GdkBitmap
*GetBitmap() const;
59 //-----------------------------------------------------------------------------
61 //-----------------------------------------------------------------------------
63 // CMB 20/5/98: added xbm constructor and GetBitmap() method
64 class wxBitmap
: public wxObject
66 DECLARE_DYNAMIC_CLASS(wxBitmap
)
71 wxBitmap( int width
, int height
, int depth
= -1 );
72 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
73 wxBitmap( char **bits
);
74 wxBitmap( const wxBitmap
& bmp
);
75 wxBitmap( const wxBitmap
* bmp
);
76 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
78 wxBitmap
& operator = ( const wxBitmap
& bmp
);
79 bool operator == ( const wxBitmap
& bmp
);
80 bool operator != ( const wxBitmap
& bmp
);
83 int GetHeight() const;
86 void SetHeight( int height
);
87 void SetWidth( int width
);
88 void SetDepth( int depth
);
90 wxMask
*GetMask() const;
91 void SetMask( wxMask
*mask
);
93 void Resize( int height
, int width
);
95 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
96 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
98 wxPalette
*GetPalette() const;
99 wxPalette
*GetColourMap() const
100 { return GetPalette(); };
104 GdkPixmap
*GetPixmap() const;
105 GdkBitmap
*GetBitmap() const;
108 void RecreateImage();
114 #endif // __GTKBITMAPH__