]>
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 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
43 //-----------------------------------------------------------------------------
45 class wxMask
: public wxObject
47 DECLARE_DYNAMIC_CLASS(wxMask
)
52 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
53 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
54 wxMask( const wxBitmap
& bitmap
);
63 friend wxBitmapButton
;
64 friend wxStaticBitmap
;
69 GdkBitmap
*GetBitmap() const;
77 //-----------------------------------------------------------------------------
79 //-----------------------------------------------------------------------------
81 // CMB 20/5/98: added xbm constructor and GetBitmap() method
82 class wxBitmap
: public wxObject
84 DECLARE_DYNAMIC_CLASS(wxBitmap
)
89 wxBitmap( int width
, int height
, int depth
= -1 );
90 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
91 wxBitmap( char **bits
);
92 wxBitmap( const wxBitmap
& bmp
);
93 wxBitmap( const wxBitmap
* bmp
);
94 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
96 wxBitmap
& operator = ( const wxBitmap
& bmp
);
97 bool operator == ( const wxBitmap
& bmp
);
98 bool operator != ( const wxBitmap
& bmp
);
101 int GetHeight() const;
102 int GetWidth() const;
103 int GetDepth() const;
104 void SetHeight( int height
);
105 void SetWidth( int width
);
106 void SetDepth( int depth
);
108 wxMask
*GetMask() const;
109 void SetMask( wxMask
*mask
);
111 void Resize( int height
, int width
);
113 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
114 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
116 wxPalette
*GetPalette() const;
117 wxPalette
*GetColourMap() const
118 { return GetPalette(); };
126 friend wxBitmapButton
;
127 friend wxStaticBitmap
;
132 GdkPixmap
*GetPixmap() const;
133 GdkBitmap
*GetBitmap() const;
136 void RecreateImage();
142 #endif // __GTKBITMAPH__