]>
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 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 //-----------------------------------------------------------------------------
42 class wxMask
: public wxObject
44 DECLARE_DYNAMIC_CLASS(wxMask
)
49 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
50 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
51 wxMask( const wxBitmap
& bitmap
);
60 friend wxBitmapButton
;
61 friend wxStaticBitmap
;
63 GdkBitmap
*GetBitmap(void) const;
71 //-----------------------------------------------------------------------------
73 //-----------------------------------------------------------------------------
75 // CMB 20/5/98: added xbm constructor and GetBitmap() method
76 class wxBitmap
: public wxObject
78 DECLARE_DYNAMIC_CLASS(wxBitmap
)
83 wxBitmap( int width
, int height
, int depth
= -1 );
84 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
85 wxBitmap( char **bits
);
86 wxBitmap( const wxBitmap
& bmp
);
87 wxBitmap( const wxBitmap
* bmp
);
88 wxBitmap( const wxString
&filename
, int type
);
90 wxBitmap
& operator = ( const wxBitmap
& bmp
);
91 bool operator == ( const wxBitmap
& bmp
);
92 bool operator != ( const wxBitmap
& bmp
);
95 int GetHeight(void) const;
96 int GetWidth(void) const;
97 int GetDepth(void) const;
98 void SetHeight( int height
);
99 void SetWidth( int width
);
100 void SetDepth( int depth
);
102 wxMask
*GetMask(void) const;
103 void SetMask( wxMask
*mask
);
105 void Resize( int height
, int width
);
107 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= NULL
);
108 bool LoadFile( const wxString
&name
, int type
);
110 wxPalette
*GetPalette(void) const;
111 wxPalette
*GetColourMap(void) const
112 { return GetPalette(); };
120 friend wxBitmapButton
;
121 friend wxStaticBitmap
;
123 GdkPixmap
*GetPixmap(void) const;
124 GdkBitmap
*GetBitmap(void) const;
126 void DestroyImage(void);
127 void RecreateImage(void);
133 #endif // __GTKBITMAPH__