]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bitmap.cpp
don't use gtk_notebook_insert_page() return value as some old GTK+ versions (the...
[wxWidgets.git] / src / gtk / bitmap.cpp
index 663c9ec721a9bc1f6304409c6ca1db8e4f693f61..b1fe2f76f113f66e025fd31b85c614808489f4e4 100644 (file)
@@ -181,12 +181,14 @@ GdkBitmap *wxMask::GetBitmap() const
 // wxBitmap
 //-----------------------------------------------------------------------------
 
-class wxBitmapRefData: public wxObjectRefData
+class wxBitmapRefData: public wxGDIRefData
 {
 public:
     wxBitmapRefData();
     virtual ~wxBitmapRefData();
 
+    virtual bool IsOk() const { return m_pixmap || m_pixbuf; }
+
     GdkPixmap      *m_pixmap;
     GdkPixbuf      *m_pixbuf;
     wxMask         *m_mask;
@@ -597,15 +599,6 @@ wxImage wxBitmap::ConvertToImage() const
 
 #endif // wxUSE_IMAGE
 
-bool wxBitmap::IsOk() const
-{
-    return (m_refData != NULL) &&
-           (
-              M_BMPDATA->m_pixbuf ||
-              M_BMPDATA->m_pixmap
-           );
-}
-
 int wxBitmap::GetHeight() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid bitmap") );
@@ -930,12 +923,12 @@ bool wxBitmap::HasAlpha() const
         gdk_pixbuf_get_has_alpha(M_BMPDATA->m_pixbuf);
 }
 
-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
 {
     const wxBitmapRefData* oldRef = wx_static_cast(const wxBitmapRefData*, data);
     wxBitmapRefData* newRef = new wxBitmapRefData;
@@ -975,12 +968,6 @@ wxObjectRefData* wxBitmap::CloneRefData(const wxObjectRefData* data) const
     return newRef;
 }
 
-//-----------------------------------------------------------------------------
-// wxBitmapHandler
-//-----------------------------------------------------------------------------
-
-IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler, wxBitmapHandlerBase)
-
 /* static */ void wxBitmap::InitStandardHandlers()
 {
     // TODO: Insert handler based on GdkPixbufs handler later