X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/888dde65f43d5f57e8fb2028b27191cca1741403..ca77701441e39245dcbfce903049e76f166979e5:/include/wx/msw/dcclient.h diff --git a/include/wx/msw/dcclient.h b/include/wx/msw/dcclient.h index 5dfe3bdc6c..9fb1cca4e7 100644 --- a/include/wx/msw/dcclient.h +++ b/include/wx/msw/dcclient.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcclient.h +// Name: wx/msw/dcclient.h // Purpose: wxClientDC class // Author: Julian Smart // Modified by: @@ -19,22 +19,14 @@ #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 // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxWindowDCImpl : public wxMSWDCImpl +class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxMSWDCImpl { public: // default ctor @@ -43,19 +35,17 @@ public: // Create a DC corresponding to the whole window wxWindowDCImpl( wxDC *owner, wxWindow *win ); + virtual void DoGetSize(int *width, int *height) const; + protected: // initialize the newly created DC void InitDC(); - // override some base class virtuals - virtual void DoGetSize(int *width, int *height) const; - -private: DECLARE_CLASS(wxWindowDCImpl) - DECLARE_NO_COPY_CLASS(wxWindowDCImpl) + wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl); }; -class WXDLLEXPORT wxClientDCImpl : public wxWindowDCImpl +class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl { public: // default ctor @@ -66,18 +56,16 @@ public: virtual ~wxClientDCImpl(); + virtual void DoGetSize(int *width, int *height) const; + protected: void InitDC(); - // override some base class virtuals - virtual void DoGetSize(int *width, int *height) const; - -private: DECLARE_CLASS(wxClientDCImpl) - DECLARE_NO_COPY_CLASS(wxClientDCImpl) + wxDECLARE_NO_COPY_CLASS(wxClientDCImpl); }; -class WXDLLEXPORT wxPaintDCImpl : public wxClientDCImpl +class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl { public: wxPaintDCImpl( wxDC *owner ); @@ -90,15 +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); -private: DECLARE_CLASS(wxPaintDCImpl) - DECLARE_NO_COPY_CLASS(wxPaintDCImpl) + wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); }; /* @@ -107,14 +96,13 @@ private: * message. It is used in HandlePaint and need not be used by an application. */ -class WXDLLEXPORT wxPaintDCEx : public wxPaintDC +class WXDLLIMPEXP_CORE wxPaintDCEx : public wxPaintDC { public: wxPaintDCEx(wxWindow *canvas, WXHDC dc); - -private: + DECLARE_CLASS(wxPaintDCEx) - DECLARE_NO_COPY_CLASS(wxPaintDCEx) + wxDECLARE_NO_COPY_CLASS(wxPaintDCEx); }; #endif