]>
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 //-----------------------------------------------------------------------------
40 //-----------------------------------------------------------------------------
42 //-----------------------------------------------------------------------------
44 class wxMask
: public wxObject
46 DECLARE_DYNAMIC_CLASS(wxMask
)
51 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
52 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
53 wxMask( const wxBitmap
& bitmap
);
62 friend wxBitmapButton
;
63 friend wxStaticBitmap
;
67 GdkBitmap
*GetBitmap() const;
75 //-----------------------------------------------------------------------------
77 //-----------------------------------------------------------------------------
79 // CMB 20/5/98: added xbm constructor and GetBitmap() method
80 class wxBitmap
: public wxObject
82 DECLARE_DYNAMIC_CLASS(wxBitmap
)
87 wxBitmap( int width
, int height
, int depth
= -1 );
88 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
89 wxBitmap( char **bits
);
90 wxBitmap( const wxBitmap
& bmp
);
91 wxBitmap( const wxBitmap
* bmp
);
92 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
94 wxBitmap
& operator = ( const wxBitmap
& bmp
);
95 bool operator == ( const wxBitmap
& bmp
);
96 bool operator != ( const wxBitmap
& bmp
);
99 int GetHeight() const;
100 int GetWidth() const;
101 int GetDepth() const;
102 void SetHeight( int height
);
103 void SetWidth( int width
);
104 void SetDepth( int depth
);
106 wxMask
*GetMask() const;
107 void SetMask( wxMask
*mask
);
109 void Resize( int height
, int width
);
111 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= NULL
);
112 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
114 wxPalette
*GetPalette() const;
115 wxPalette
*GetColourMap() const
116 { return GetPalette(); };
124 friend wxBitmapButton
;
125 friend wxStaticBitmap
;
129 GdkPixmap
*GetPixmap() const;
130 GdkBitmap
*GetBitmap() const;
133 void RecreateImage();
139 #endif // __GTKBITMAPH__