]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dc.h
undoing my duplicate efforts to solve the same problem ...
[wxWidgets.git] / include / wx / dc.h
index e82459096650dfd9c7c3a6196d332ec7b0761ce2..98e922fff744c37493fc0b8ec03ad96d218ae134 100644 (file)
@@ -93,8 +93,6 @@ protected:
 // global variables
 // ---------------------------------------------------------------------------
 
-extern WXDLLEXPORT_DATA(int) wxPageNumber;
-
 // ---------------------------------------------------------------------------
 // wxDC is the device context - object on which any drawing is done
 // ---------------------------------------------------------------------------
@@ -134,7 +132,7 @@ public:
         ResetClipping();
     }
 
-    ~wxDCBase() { }
+    virtual ~wxDCBase() { }
 
 #if WXWIN_COMPATIBILITY_2_6
     wxDEPRECATED( virtual void BeginDrawing() );
@@ -829,6 +827,8 @@ private:
     #include "wx/x11/dc.h"
 #elif defined(__WXMGL__)
     #include "wx/mgl/dc.h"
+#elif defined(__WXDFB__)
+    #include "wx/dfb/dc.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/dc.h"
 #elif defined(__WXCOCOA__)
@@ -876,7 +876,10 @@ private:
 class WXDLLEXPORT wxDCPenChanger
 {
 public:
-    wxDCPenChanger(wxDC& dc) : m_dc(dc), m_penOld() { }
+    wxDCPenChanger(wxDC& dc, const wxPen& pen) : m_dc(dc), m_penOld(dc.GetPen())
+    {
+        m_dc.SetPen(pen);
+    }
 
     ~wxDCPenChanger()
     {
@@ -884,13 +887,6 @@ public:
             m_dc.SetPen(m_penOld);
     }
 
-    void Set(const wxPen& pen)
-    {
-        if ( !m_penOld.Ok() )
-            m_penOld = m_dc.GetPen();
-        m_dc.SetPen(pen);
-    }
-
 private:
     wxDC& m_dc;
 
@@ -907,7 +903,10 @@ private:
 class WXDLLEXPORT wxDCBrushChanger
 {
 public:
-    wxDCBrushChanger(wxDC& dc) : m_dc(dc), m_brushOld() { }
+    wxDCBrushChanger(wxDC& dc, const wxBrush& brush) : m_dc(dc), m_brushOld(dc.GetBrush())
+    {
+        m_dc.SetBrush(brush);
+    }
 
     ~wxDCBrushChanger()
     {
@@ -915,13 +914,6 @@ public:
             m_dc.SetBrush(m_brushOld);
     }
 
-    void Set(const wxBrush& brush)
-    {
-        if ( !m_brushOld.Ok() )
-            m_brushOld = m_dc.GetBrush();
-        m_dc.SetBrush(brush);
-    }
-
 private:
     wxDC& m_dc;