X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f399a69cceccea1f955dab85af0c21b361c78a0..56b79cb98da2e2e3024fce6f6313546577c34821:/include/wx/msw/bitmap.h diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index 82b5d30251..cc0989f68b 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -78,7 +78,8 @@ public: wxBitmap(const char bits[], int width, int height, int depth = 1); // Initialize with XPM data - wxBitmap(char **data, wxControl *anItem = NULL); + wxBitmap(const char **data) { CreateFromXpm(data); } + wxBitmap(char **data) { CreateFromXpm((const char **)data); } // Load a file or resource wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE); @@ -116,8 +117,8 @@ public: virtual ~wxBitmap(); - // GRG, Dic/99 - wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect ) const; + // get the given part of bitmap + wxBitmap GetSubBitmap( const wxRect& rect ) const; // copies the contents and mask of the given (colour) icon to the bitmap bool CopyFromIcon(const wxIcon& icon); @@ -182,6 +183,9 @@ protected: virtual wxGDIImageRefData *CreateData() const { return new wxBitmapRefData; } + // creates the bitmap from XPM data, supposed to be called from ctor + bool CreateFromXpm(const char **bits); + private: #ifdef __WIN32__ // common part of CopyFromIcon/CopyFromCursor for Win32