+#endif // wxUSE_IMAGE
+
+ virtual wxObjectRefData* CreateRefData() const;
+ virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
+
+private:
+#if wxUSE_IMAGE
+ // to be called from CreateFromImage only!
+ bool CreateFromImageAsPixmap(const wxImage& image, int depth);
+ bool CreateFromImageAsPixbuf(const wxImage& image);
+#endif // wxUSE_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;