X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58c837a4e67c0996134cc0947691dc09c5f26687..40bd6154f1476dbe598c60b4760bbf2fe0d9ab0f:/include/wx/gtk1/bitmap.h?ds=sidebyside diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 8449a01cdb..5096d3b8b5 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -64,8 +64,8 @@ public: wxBitmap(); wxBitmap( int width, int height, int depth = -1 ); wxBitmap( const char bits[], int width, int height, int depth = 1 ); - wxBitmap( const char **bits ); - wxBitmap( char **bits ); + wxBitmap( const char **bits ) { (void)CreateFromXpm(bits); } + wxBitmap( char **bits ) { (void)CreateFromXpm((const char **)bits); } wxBitmap( const wxBitmap& bmp ); wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM ); ~wxBitmap(); @@ -74,12 +74,16 @@ public: bool operator != ( const wxBitmap& bmp ); bool Ok() const; + bool Create(int width, int height, int depth = -1); + int GetHeight() const; int GetWidth() const; int GetDepth() const; wxMask *GetMask() const; void SetMask( wxMask *mask ); + + wxBitmap GetSubBitmap( const wxRect& rect ) const; bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL ); bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM ); @@ -95,10 +99,14 @@ public: void SetWidth( int width ); void SetDepth( int depth ); void SetPixmap( GdkPixmap *pixmap ); + void SetBitmap( GdkBitmap *bitmap ); GdkPixmap *GetPixmap() const; GdkBitmap *GetBitmap() const; +protected: + bool CreateFromXpm(const char **bits); + private: DECLARE_DYNAMIC_CLASS(wxBitmap) };