]>
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 //-----------------------------------------------------------------------------
42 //-----------------------------------------------------------------------------
44 //-----------------------------------------------------------------------------
46 class wxMask
: public wxObject
48 DECLARE_DYNAMIC_CLASS(wxMask
)
53 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
54 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
55 wxMask( const wxBitmap
& bitmap
);
64 friend wxBitmapButton
;
65 friend wxStaticBitmap
;
71 GdkBitmap
*GetBitmap() const;
79 //-----------------------------------------------------------------------------
81 //-----------------------------------------------------------------------------
83 // CMB 20/5/98: added xbm constructor and GetBitmap() method
84 class wxBitmap
: public wxObject
86 DECLARE_DYNAMIC_CLASS(wxBitmap
)
91 wxBitmap( int width
, int height
, int depth
= -1 );
92 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
93 wxBitmap( char **bits
);
94 wxBitmap( const wxBitmap
& bmp
);
95 wxBitmap( const wxBitmap
* bmp
);
96 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
98 wxBitmap
& operator = ( const wxBitmap
& bmp
);
99 bool operator == ( const wxBitmap
& bmp
);
100 bool operator != ( const wxBitmap
& bmp
);
103 int GetHeight() const;
104 int GetWidth() const;
105 int GetDepth() const;
106 void SetHeight( int height
);
107 void SetWidth( int width
);
108 void SetDepth( int depth
);
110 wxMask
*GetMask() const;
111 void SetMask( wxMask
*mask
);
113 void Resize( int height
, int width
);
115 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
116 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
118 wxPalette
*GetPalette() const;
119 wxPalette
*GetColourMap() const
120 { return GetPalette(); };
128 friend wxBitmapButton
;
129 friend wxStaticBitmap
;
135 GdkPixmap
*GetPixmap() const;
136 GdkBitmap
*GetBitmap() const;
139 void RecreateImage();
145 #endif // __GTKBITMAPH__