]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/bitmap.h
7baf8849f35ebdfb8bed0d7f7f3ce3af20a7f007
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;
57 //-----------------------------------------------------------------------------
59 //-----------------------------------------------------------------------------
61 // CMB 20/5/98: added xbm constructor and GetBitmap() method
62 class wxBitmap
: public wxObject
64 DECLARE_DYNAMIC_CLASS(wxBitmap
)
69 wxBitmap( int width
, int height
, int depth
= -1 );
70 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
71 wxBitmap( char **bits
);
72 wxBitmap( const wxBitmap
& bmp
);
73 wxBitmap( const wxBitmap
* bmp
);
74 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
76 wxBitmap
& operator = ( const wxBitmap
& bmp
);
77 bool operator == ( const wxBitmap
& bmp
);
78 bool operator != ( const wxBitmap
& bmp
);
81 int GetHeight() const;
84 void SetHeight( int height
);
85 void SetWidth( int width
);
86 void SetDepth( int depth
);
88 wxMask
*GetMask() const;
89 void SetMask( wxMask
*mask
);
91 void Resize( int height
, int width
);
93 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
94 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
96 wxPalette
*GetPalette() const;
97 wxPalette
*GetColourMap() const
98 { return GetPalette(); };
102 GdkPixmap
*GetPixmap() const;
103 GdkBitmap
*GetBitmap() const;
106 void RecreateImage();
112 #endif // __GTKBITMAPH__