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
56 // Create a DC corresponding to the client area of the window
57 wxClientDC(wxWindow
*win
);
60 DECLARE_DYNAMIC_CLASS(wxClientDC
)
61 }; // end of CLASS wxClientDC
63 class WXDLLEXPORT wxPaintDC
: public wxWindowDC
68 // Create a DC corresponding for painting the window in OnPaint()
69 wxPaintDC(wxWindow
* pWin
);
73 // find the entry for this DC in the cache (keyed by the window)
74 static WXHDC
FindDCInCache(wxWindow
* pWin
);
77 static wxArrayDCInfo ms_cache
;
79 // find the entry for this DC in the cache (keyed by the window)
80 wxPaintDCInfo
* FindInCache(size_t* pIndex
= NULL
) const;
82 DECLARE_DYNAMIC_CLASS(wxPaintDC
)
83 }; // end of wxPaintDC