]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/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"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 class wxMask
: public wxObject
36 DECLARE_DYNAMIC_CLASS(wxMask
)
40 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
41 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
42 wxMask( const wxBitmap
& bitmap
);
48 GdkBitmap
*GetBitmap() const;
51 //-----------------------------------------------------------------------------
53 //-----------------------------------------------------------------------------
55 class wxBitmap
: public wxObject
57 DECLARE_DYNAMIC_CLASS(wxBitmap
)
61 wxBitmap( int width
, int height
, int depth
= -1 );
62 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
63 wxBitmap( const char **bits
);
64 wxBitmap( char **bits
);
65 wxBitmap( const wxBitmap
& bmp
);
66 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
68 wxBitmap
& operator = ( const wxBitmap
& bmp
);
69 bool operator == ( const wxBitmap
& bmp
);
70 bool operator != ( const wxBitmap
& bmp
);
73 int GetHeight() const;
77 wxMask
*GetMask() const;
78 void SetMask( wxMask
*mask
);
80 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
81 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
83 wxPalette
*GetPalette() const;
84 wxPalette
*GetColourMap() const
85 { return GetPalette(); };
89 void SetHeight( int height
);
90 void SetWidth( int width
);
91 void SetDepth( int depth
);
92 void SetPixmap( GdkPixmap
*pixmap
);
94 GdkPixmap
*GetPixmap() const;
95 GdkBitmap
*GetBitmap() const;
100 #endif // __GTKBITMAPH__