]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dfb/dcmemory.h
Make SaveFile and LoadFile virtual so they can be overridden
[wxWidgets.git] / include / wx / dfb / dcmemory.h
index afe7fcf12f80240089df0c8f0bcbd0a230f3ae2e..d5b1a72d9b7a1a865f74f55a69bef8fcea23e342 100644 (file)
 #include "wx/dc.h"
 #include "wx/bitmap.h"
 
-class WXDLLIMPEXP_CORE wxMemoryDC : public wxDC
+class WXDLLIMPEXP_CORE wxMemoryDC : public wxDC, public wxMemoryDCBase
 {
 public:
-    wxMemoryDC();
+    wxMemoryDC() { Init(); }
+    wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
     wxMemoryDC(wxDC *dc); // create compatible DC
 
-    virtual void SelectObject(const wxBitmap& bitmap);
+    // implementation from now on:
+
+    wxBitmap GetSelectedObject() const { return m_bmp; }
+
+protected:
+    virtual void DoSelect(const wxBitmap& bitmap);
+
+private:
+    void Init();
+
+    wxBitmap m_bmp;
 
     DECLARE_DYNAMIC_CLASS(wxMemoryDC)
 };