+protected:
+ bool CreateFromImage(const wxImage& image, int depth);
+
+ virtual wxObjectRefData* CreateRefData() const;
+ virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
+
+private:
+ // to be called from CreateFromImage only!
+ bool CreateFromImageAsPixmap(const wxImage& image, int depth);
+ bool CreateFromImageAsPixbuf(const wxImage& image);
+
+ enum Representation
+ {
+ Pixmap,
+ Pixbuf
+ };
+ // removes other representations from memory, keeping only 'keep'
+ // (wxBitmap may keep same bitmap e.g. as both pixmap and pixbuf):
+ void PurgeOtherRepresentations(Representation keep);
+
+ friend class wxMemoryDC;
+ friend class wxBitmapHandler;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxBitmap)
+};
+
+//-----------------------------------------------------------------------------
+// wxBitmapHandler
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxBitmapHandler: public wxBitmapHandlerBase
+{
+ DECLARE_ABSTRACT_CLASS(wxBitmapHandler)