]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/bitmap.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKBITMAPH__
12 #define __GTKBITMAPH__
19 #include "wx/object.h"
20 #include "wx/string.h"
21 #include "wx/palette.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 class wxMask
: public wxObject
37 DECLARE_DYNAMIC_CLASS(wxMask
)
41 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
42 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
43 wxMask( const wxBitmap
& bitmap
);
49 GdkBitmap
*GetBitmap() const;
52 //-----------------------------------------------------------------------------
54 //-----------------------------------------------------------------------------
56 class wxBitmap
: public wxObject
58 DECLARE_DYNAMIC_CLASS(wxBitmap
)
62 wxBitmap( int width
, int height
, int depth
= -1 );
63 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
64 wxBitmap( const wxImage
&image
);
65 wxBitmap( const char **bits
);
66 wxBitmap( char **bits
);
67 wxBitmap( const wxBitmap
& bmp
);
68 wxBitmap( const wxBitmap
* bmp
);
69 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
71 wxBitmap
& operator = ( const wxBitmap
& bmp
);
72 bool operator == ( const wxBitmap
& bmp
);
73 bool operator != ( const wxBitmap
& bmp
);
76 wxImage
ConvertToImage() const;
78 int GetHeight() const;
81 void SetHeight( int height
);
82 void SetWidth( int width
);
83 void SetDepth( int depth
);
85 wxMask
*GetMask() const;
86 void SetMask( wxMask
*mask
);
88 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
89 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
91 wxPalette
*GetPalette() const;
92 wxPalette
*GetColourMap() const
93 { return GetPalette(); };
97 GdkPixmap
*GetPixmap() const;
98 GdkBitmap
*GetBitmap() const;
103 #endif // __GTKBITMAPH__