X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16fc7c452414973e2cfd1e3975ae1cedd99e3397..d968078adbfb147e913b9a33fc54242a36f117ce:/src/x11/bitmap.cpp diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index 2af78decca..856f0288b8 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -227,7 +227,7 @@ bool wxMask::Create( const wxBitmap& bitmap ) // wxBitmap //----------------------------------------------------------------------------- -class wxBitmapRefData: public wxObjectRefData +class wxBitmapRefData : public wxGDIRefData { public: wxBitmapRefData(); @@ -237,6 +237,8 @@ public: // shouldn't be called more than once as it doesn't free the existing data bool Create(int width, int height, int depth); + virtual bool IsOk() const { return m_pixmap || m_bitmap; } + Pixmap m_pixmap; Pixmap m_bitmap; Display *m_display; @@ -430,12 +432,12 @@ wxBitmap::wxBitmap(const char* const* bits) Create(bits, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0); } -wxObjectRefData *wxBitmap::CreateRefData() const +wxGDIRefData *wxBitmap::CreateGDIRefData() const { return new wxBitmapRefData; } -wxObjectRefData *wxBitmap::CloneRefData(const wxObjectRefData *data) const +wxGDIRefData *wxBitmap::CloneGDIRefData(const wxGDIRefData *data) const { return new wxBitmapRefData(*wx_static_cast(const wxBitmapRefData *, data)); } @@ -934,11 +936,6 @@ wxBitmap::~wxBitmap() { } -bool wxBitmap::IsOk() const -{ - return (m_refData != NULL); -} - int wxBitmap::GetHeight() const { wxCHECK_MSG( Ok(), -1, wxT("invalid bitmap") ); @@ -1359,7 +1356,7 @@ bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, Pixmap mask = 0; int ErrorStatus = XpmReadFileToPixmap( xdisplay, xroot, - (char*) name.c_str(), + (char*) ((const char*) name.c_str()), &pixmap, &mask, &xpmAttr); if (ErrorStatus == XpmSuccess)