]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/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 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxMask
: public wxObject
42 DECLARE_DYNAMIC_CLASS(wxMask
)
47 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
48 wxMask( const wxBitmap
& bitmap
, const int paletteIndex
);
49 wxMask( const wxBitmap
& bitmap
);
59 GdkBitmap
*GetBitmap(void) const;
67 //-----------------------------------------------------------------------------
69 //-----------------------------------------------------------------------------
71 // CMB 20/5/98: added xbm constructor and GetBitmap() method
72 class wxBitmap
: public wxObject
74 DECLARE_DYNAMIC_CLASS(wxBitmap
)
79 wxBitmap( const int width
, const int height
, const int depth
= -1 );
80 wxBitmap( const char bits
[], const int width
, const int height
, const int depth
= 1 );
81 wxBitmap( char **bits
);
82 wxBitmap( const wxBitmap
& bmp
);
83 wxBitmap( const wxBitmap
* bmp
);
84 wxBitmap( const wxString
&filename
, const int type
);
86 wxBitmap
& operator = ( const wxBitmap
& bmp
);
87 bool operator == ( const wxBitmap
& bmp
);
88 bool operator != ( const wxBitmap
& bmp
);
91 int GetHeight(void) const;
92 int GetWidth(void) const;
93 int GetDepth(void) const;
94 void SetHeight( const int height
);
95 void SetWidth( const int width
);
96 void SetDepth( const int depth
);
98 wxMask
*GetMask(void) const;
99 void SetMask( wxMask
*mask
);
101 bool SaveFile( const wxString
&name
, const int type
, wxPalette
*palette
= NULL
);
102 bool LoadFile( const wxString
&name
, const int type
);
104 wxPalette
*GetPalette(void) const;
105 wxPalette
*GetColourMap(void) const
106 { return GetPalette(); };
115 GdkPixmap
*GetPixmap(void) const;
116 GdkBitmap
*GetBitmap(void) const;
121 #endif // __GTKBITMAPH__