]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/dcclient.h
Allow using wxDEFAULT as font size in wxOSX.
[wxWidgets.git] / include / wx / msw / dcclient.h
index 5957aa5c22855d0ead61a10533451dc22c17f7e4..9fb1cca4e7e4a15a703eb193bbaca33fd401fa0e 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        dcclient.h
+// Name:        wx/msw/dcclient.h
 // Purpose:     wxClientDC class
 // Author:      Julian Smart
 // Modified by:
 #include "wx/dc.h"
 #include "wx/msw/dc.h"
 #include "wx/dcclient.h"
-#include "wx/dynarray.h"
 
-// ----------------------------------------------------------------------------
-// array types
-// ----------------------------------------------------------------------------
-
-// this one if used by wxPaintDC only
-struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
-
-WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
+class wxPaintDCInfo;
 
 // ----------------------------------------------------------------------------
 // DC classes
@@ -43,10 +35,6 @@ public:
     // Create a DC corresponding to the whole window
     wxWindowDCImpl( wxDC *owner, wxWindow *win );
 
-#if wxUSE_GRAPHICS_CONTEXT
-    virtual wxGraphicsContext* CreateGraphicsContext();
-#endif
-
     virtual void DoGetSize(int *width, int *height) const;
 
 protected:
@@ -54,7 +42,7 @@ protected:
     void InitDC();
 
     DECLARE_CLASS(wxWindowDCImpl)
-    DECLARE_NO_COPY_CLASS(wxWindowDCImpl)
+    wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
 };
 
 class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
@@ -74,7 +62,7 @@ protected:
     void InitDC();
 
     DECLARE_CLASS(wxClientDCImpl)
-    DECLARE_NO_COPY_CLASS(wxClientDCImpl)
+    wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
 };
 
 class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
@@ -90,14 +78,16 @@ public:
     // find the entry for this DC in the cache (keyed by the window)
     static WXHDC FindDCInCache(wxWindow* win);
 
-protected:
-    static wxArrayDCInfo ms_cache;
+    // This must be called by the code handling WM_PAINT to remove the DC
+    // cached for this window for the duration of this message processing.
+    static void EndPaint(wxWindow *win);
 
-    // find the entry for this DC in the cache (keyed by the window)
-    wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
+protected:
+    // Find the DC for this window in the cache, return NULL if not found.
+    static wxPaintDCInfo *FindInCache(wxWindow* win);
 
     DECLARE_CLASS(wxPaintDCImpl)
-    DECLARE_NO_COPY_CLASS(wxPaintDCImpl)
+    wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
 };
 
 /*
@@ -110,9 +100,9 @@ class WXDLLIMPEXP_CORE wxPaintDCEx : public wxPaintDC
 {
 public:
     wxPaintDCEx(wxWindow *canvas, WXHDC dc);
-    
+
     DECLARE_CLASS(wxPaintDCEx)
-    DECLARE_NO_COPY_CLASS(wxPaintDCEx)
+    wxDECLARE_NO_COPY_CLASS(wxPaintDCEx);
 };
 
 #endif