// wxBitmap
//-----------------------------------------------------------------------------
-class wxBitmapRefData: public wxObjectRefData
+class wxBitmapRefData : public wxGDIRefData
{
public:
wxBitmapRefData();
// 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;
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));
}
{
}
-bool wxBitmap::IsOk() const
-{
- return (m_refData != NULL);
-}
-
int wxBitmap::GetHeight() const
{
wxCHECK_MSG( Ok(), -1, wxT("invalid bitmap") );
// Bitmap handlers
// ============================================================================
-IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler, wxBitmapHandlerBase)
-
#define M_BMPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
#if wxUSE_XPM
Pixmap mask = 0;
int ErrorStatus = XpmReadFileToPixmap( xdisplay, xroot,
- (char*) name.c_str(),
+ (char*) ((const char*) name.c_str()),
&pixmap, &mask, &xpmAttr);
if (ErrorStatus == XpmSuccess)