]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dfb/dcclient.h
fix warnings in EventsSuppressor ctor from gcc with -O option
[wxWidgets.git] / include / wx / dfb / dcclient.h
index 5f1d7672e21148572fe7c8eb6d9d1ee18fa4c97d..6eae9c4aa92000c8afa4a11fdaba11ef03f6eb13 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "wx/dc.h"
 
 
 #include "wx/dc.h"
 
-class WXDLLIMPEXP_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
 
 //-----------------------------------------------------------------------------
 // wxWindowDC
 
 //-----------------------------------------------------------------------------
 // wxWindowDC
@@ -22,37 +22,38 @@ class WXDLLIMPEXP_CORE wxWindow;
 class WXDLLIMPEXP_CORE wxWindowDC : public wxDC
 {
 public:
 class WXDLLIMPEXP_CORE wxWindowDC : public wxDC
 {
 public:
-    wxWindowDC() {}
+    wxWindowDC() : m_shouldFlip(false) {}
     wxWindowDC(wxWindow *win);
     wxWindowDC(wxWindow *win);
+    virtual ~wxWindowDC();
+
+    virtual wxWindow *GetWindow() const { return m_win; }
 
 protected:
 
 protected:
-    void InitForWin(wxWindow *win);
+    // initializes the DC for painting on given window; if rect!=NULL, then
+    // for painting only on the given region of the window
+    void InitForWin(wxWindow *win, const wxRect *rect);
 
 
-    DECLARE_DYNAMIC_CLASS(wxWindowDC)
-    DECLARE_NO_COPY_CLASS(wxWindowDC)
-};
+private:
+    wxWindow *m_win;
+    wxRect    m_winRect; // rectangle of the window being painted
 
 
-//-----------------------------------------------------------------------------
-// base class for wxClientDC and wxPaintDC
-//-----------------------------------------------------------------------------
+    bool m_shouldFlip; // flip the surface when done?
 
 
-class WXDLLIMPEXP_CORE wxClientDCBase : public wxWindowDC
-{
-public:
-    wxClientDCBase() {}
-    wxClientDCBase(wxWindow *win);
+    friend class wxOverlayImpl; // for m_shouldFlip;
+
+    DECLARE_DYNAMIC_CLASS(wxWindowDC)
+    DECLARE_NO_COPY_CLASS(wxWindowDC)
 };
 
 //-----------------------------------------------------------------------------
 // wxClientDC
 //-----------------------------------------------------------------------------
 
 };
 
 //-----------------------------------------------------------------------------
 // wxClientDC
 //-----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxClientDC : public wxClientDCBase
+class WXDLLIMPEXP_CORE wxClientDC : public wxWindowDC
 {
 public:
     wxClientDC() {}
 {
 public:
     wxClientDC() {}
-    wxClientDC(wxWindow *win) : wxClientDCBase(win) {}
-    ~wxClientDC();
+    wxClientDC(wxWindow *win);
 
     DECLARE_DYNAMIC_CLASS(wxClientDC)
     DECLARE_NO_COPY_CLASS(wxClientDC)
 
     DECLARE_DYNAMIC_CLASS(wxClientDC)
     DECLARE_NO_COPY_CLASS(wxClientDC)
@@ -63,12 +64,11 @@ public:
 // wxPaintDC
 //-----------------------------------------------------------------------------
 
 // wxPaintDC
 //-----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDCBase
+class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDC
 {
 public:
     wxPaintDC() {}
 {
 public:
     wxPaintDC() {}
-    wxPaintDC(wxWindow *win) : wxClientDCBase(win) {}
-    ~wxPaintDC();
+    wxPaintDC(wxWindow *win) : wxClientDC(win) {}
 
     DECLARE_DYNAMIC_CLASS(wxPaintDC)
     DECLARE_NO_COPY_CLASS(wxPaintDC)
 
     DECLARE_DYNAMIC_CLASS(wxPaintDC)
     DECLARE_NO_COPY_CLASS(wxPaintDC)