1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxClientDC class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DCCLIENT_H_
13 #define _WX_DCCLIENT_H_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
20 #include "wx/dynarray.h"
22 // ----------------------------------------------------------------------------
24 // ----------------------------------------------------------------------------
26 // this one if used by wxPaintDC only
27 struct WXDLLEXPORT wxPaintDCInfo
;
29 WX_DECLARE_OBJARRAY(wxPaintDCInfo
, wxArrayDCInfo
);
31 // ----------------------------------------------------------------------------
33 // ----------------------------------------------------------------------------
35 class WXDLLEXPORT wxWindowDC
: public wxDC
40 // Create a DC corresponding to the whole window
41 wxWindowDC(wxWindow
* pWin
);
48 DECLARE_DYNAMIC_CLASS(wxWindowDC
)
49 }; // end of CLASS wxWindowDC
51 class WXDLLEXPORT wxClientDC
: public wxWindowDC
55 virtual ~wxClientDC();
57 wxClientDC(wxWindow
*win
);
63 DECLARE_DYNAMIC_CLASS(wxClientDC
)
64 }; // end of CLASS wxClientDC
66 class WXDLLEXPORT wxPaintDC
: public wxClientDC
71 // Create a DC corresponding for painting the window in OnPaint()
72 wxPaintDC(wxWindow
* pWin
);
76 // find the entry for this DC in the cache (keyed by the window)
77 static WXHDC
FindDCInCache(wxWindow
* pWin
);
80 static wxArrayDCInfo ms_cache
;
82 // find the entry for this DC in the cache (keyed by the window)
83 wxPaintDCInfo
* FindInCache(size_t* pIndex
= NULL
) const;
85 DECLARE_DYNAMIC_CLASS(wxPaintDC
)
86 }; // end of wxPaintDC