1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxClientDC class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWidgets licence
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
41 // Create a DC corresponding to the whole window
43 wxWindowDC(wxWindow
* pWin
);
49 // Override some base class virtuals
51 virtual void DoGetSize( int* pWidth
57 DECLARE_DYNAMIC_CLASS(wxWindowDC
)
58 }; // end of CLASS wxWindowDC
60 class WXDLLEXPORT wxClientDC
: public wxWindowDC
64 virtual ~wxClientDC();
66 wxClientDC(wxWindow
*win
);
72 // Override some base class virtuals
74 virtual void DoGetSize( int* pWidth
79 DECLARE_DYNAMIC_CLASS(wxClientDC
)
80 }; // end of CLASS wxClientDC
82 class WXDLLEXPORT wxPaintDC
: public wxClientDC
87 // Create a DC corresponding for painting the window in OnPaint()
88 wxPaintDC(wxWindow
* pWin
);
92 // find the entry for this DC in the cache (keyed by the window)
93 static WXHDC
FindDCInCache(wxWindow
* pWin
);
96 static wxArrayDCInfo ms_cache
;
98 // find the entry for this DC in the cache (keyed by the window)
99 wxPaintDCInfo
* FindInCache(size_t* pIndex
= NULL
) const;
101 DECLARE_DYNAMIC_CLASS(wxPaintDC
)
102 }; // end of wxPaintDC