]>
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"
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
);
45 bool Create( const wxBitmap
& bitmap
, const wxColour
& colour
);
46 bool Create( const wxBitmap
& bitmap
, int paletteIndex
);
47 bool Create( const wxBitmap
& bitmap
);
52 GdkBitmap
*GetBitmap() const;
55 //-----------------------------------------------------------------------------
57 //-----------------------------------------------------------------------------
59 class wxBitmap
: public wxObject
61 DECLARE_DYNAMIC_CLASS(wxBitmap
)
65 wxBitmap( int width
, int height
, int depth
= -1 );
66 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
67 wxBitmap( const char **bits
);
68 wxBitmap( char **bits
);
69 wxBitmap( const wxBitmap
& bmp
);
70 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
72 wxBitmap
& operator = ( const wxBitmap
& bmp
);
73 bool operator == ( const wxBitmap
& bmp
);
74 bool operator != ( const wxBitmap
& bmp
);
77 int GetHeight() const;
81 wxMask
*GetMask() const;
82 void SetMask( wxMask
*mask
);
84 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
85 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
87 wxPalette
*GetPalette() const;
88 wxPalette
*GetColourMap() const
89 { return GetPalette(); };
93 void SetHeight( int height
);
94 void SetWidth( int width
);
95 void SetDepth( int depth
);
96 void SetPixmap( GdkPixmap
*pixmap
);
98 GdkPixmap
*GetPixmap() const;
99 GdkBitmap
*GetBitmap() const;
104 #endif // __GTKBITMAPH__