]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/qt/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 //-----------------------------------------------------------------------------
39 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
43 class wxMask
: public wxObject
45 DECLARE_DYNAMIC_CLASS(wxMask
)
50 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
51 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
52 wxMask( const wxBitmap
& bitmap
);
61 friend wxBitmapButton
;
62 friend wxStaticBitmap
;
69 //-----------------------------------------------------------------------------
71 //-----------------------------------------------------------------------------
73 // CMB 20/5/98: added xbm constructor and GetBitmap() method
74 class wxBitmap
: public wxObject
76 DECLARE_DYNAMIC_CLASS(wxBitmap
)
81 wxBitmap( int width
, int height
, int depth
= -1 );
82 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
83 wxBitmap( char **bits
);
84 wxBitmap( const wxBitmap
& bmp
);
85 wxBitmap( const wxBitmap
* bmp
);
86 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
88 wxBitmap
& operator = ( const wxBitmap
& bmp
);
89 bool operator == ( const wxBitmap
& bmp
);
90 bool operator != ( const wxBitmap
& bmp
);
93 int GetHeight() const;
96 void SetHeight( int height
);
97 void SetWidth( int width
);
98 void SetDepth( int depth
);
100 wxMask
*GetMask() const;
101 void SetMask( wxMask
*mask
);
103 void Resize( int height
, int width
);
105 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= NULL
);
106 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
108 wxPalette
*GetPalette() const;
109 wxPalette
*GetColourMap() const
110 { return GetPalette(); };
118 friend wxBitmapButton
;
119 friend wxStaticBitmap
;
125 #endif // __GTKBITMAPH__