]>
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 //-----------------------------------------------------------------------------
31 // also implemented here from wxImage
32 //-----------------------------------------------------------------------------
35 class wxImage : wxGDIObject
37 wxImage( const wxBitmap &bitmap );
38 wxBitmap ConvertToBitmap() const;
42 //-----------------------------------------------------------------------------
44 //-----------------------------------------------------------------------------
46 class wxMask
: public wxObject
48 DECLARE_DYNAMIC_CLASS(wxMask
)
52 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
53 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
54 wxMask( const wxBitmap
& bitmap
);
60 GdkBitmap
*GetBitmap() const;
63 //-----------------------------------------------------------------------------
65 //-----------------------------------------------------------------------------
67 class wxBitmap
: public wxObject
69 DECLARE_DYNAMIC_CLASS(wxBitmap
)
73 wxBitmap( int width
, int height
, int depth
= -1 );
74 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
75 wxBitmap( const char **bits
);
76 wxBitmap( char **bits
);
77 wxBitmap( const wxBitmap
& bmp
);
78 wxBitmap( const wxBitmap
* bmp
);
79 wxBitmap( const wxString
&filename
, int type
= wxBITMAP_TYPE_XPM
);
81 wxBitmap
& operator = ( const wxBitmap
& bmp
);
82 bool operator == ( const wxBitmap
& bmp
);
83 bool operator != ( const wxBitmap
& bmp
);
86 int GetHeight() const;
90 wxMask
*GetMask() const;
91 void SetMask( wxMask
*mask
);
93 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
94 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
96 wxPalette
*GetPalette() const;
97 wxPalette
*GetColourMap() const
98 { return GetPalette(); };
102 void SetHeight( int height
);
103 void SetWidth( int width
);
104 void SetDepth( int depth
);
105 void SetPixmap( GdkPixmap
*pixmap
);
107 GdkPixmap
*GetPixmap() const;
108 GdkBitmap
*GetBitmap() const;
113 #endif // __GTKBITMAPH__