X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8208e181cb576ec6cda37624923f95a59af43072..d42508c2a026d505d39c386b233de4a1b51f1445:/include/wx/msw/bitmap.h?ds=inline diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index d71506f944..7b9820cbb0 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,7 +117,7 @@ public: virtual ~wxBitmap(); - // GRG, Dic/99 + // 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 @@ -141,8 +142,8 @@ public: wxMask *GetMask() const { return (GetBitmapData() ? GetBitmapData()->m_bitmapMask : (wxMask*) NULL); } void SetMask(wxMask *mask) ; - bool operator==(const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; } - bool operator!=(const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; } + bool operator==(const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; } + bool operator!=(const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; } #if WXWIN_COMPATIBILITY_2 void SetOk(bool isOk); @@ -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