]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/bitmap.h
37c42b14c539eebf50c011f79edbe06ae89d6d64
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
38 wxMask( const wxBitmap
& bitmap
, const wxColour
& colour
);
39 wxMask( const wxBitmap
& bitmap
, int paletteIndex
);
40 wxMask( const wxBitmap
& bitmap
);
43 bool Create( const wxBitmap
& bitmap
, const wxColour
& colour
);
44 bool Create( const wxBitmap
& bitmap
, int paletteIndex
);
45 bool Create( const wxBitmap
& bitmap
);
50 GdkBitmap
*GetBitmap() const;
53 DECLARE_DYNAMIC_CLASS(wxMask
)
56 //-----------------------------------------------------------------------------
58 //-----------------------------------------------------------------------------
60 class wxBitmap
: public wxObject
64 wxBitmap( int width
, int height
, int depth
= -1 );
65 wxBitmap( const char bits
[], int width
, int height
, int depth
= 1 );
66 wxBitmap( const char **bits
);
67 wxBitmap( char **bits
);
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 int GetHeight() const;
80 wxMask
*GetMask() const;
81 void SetMask( wxMask
*mask
);
83 bool SaveFile( const wxString
&name
, int type
, wxPalette
*palette
= (wxPalette
*) NULL
);
84 bool LoadFile( const wxString
&name
, int type
= wxBITMAP_TYPE_XPM
);
86 wxPalette
*GetPalette() const;
87 wxPalette
*GetColourMap() const
88 { return GetPalette(); };
92 void SetHeight( int height
);
93 void SetWidth( int width
);
94 void SetDepth( int depth
);
95 void SetPixmap( GdkPixmap
*pixmap
);
97 GdkPixmap
*GetPixmap() const;
98 GdkBitmap
*GetBitmap() const;
103 DECLARE_DYNAMIC_CLASS(wxBitmap
)
106 #endif // __GTKBITMAPH__