1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxClientDC class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows 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 WXDLLIMPEXP_FWD_CORE wxPaintDCInfo
;
29 WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo
, wxArrayDCInfo
);
31 // ----------------------------------------------------------------------------
33 // ----------------------------------------------------------------------------
35 class WXDLLEXPORT wxWindowDC
: public wxDC
41 // Create a DC corresponding to the whole window
42 wxWindowDC(wxWindow
*win
);
45 // initialize the newly created DC
48 // override some base class virtuals
49 virtual void DoGetSize(int *width
, int *height
) const;
52 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowDC
)
55 class WXDLLEXPORT wxClientDC
: public wxWindowDC
61 // Create a DC corresponding to the client area of the window
62 wxClientDC(wxWindow
*win
);
64 virtual ~wxClientDC();
69 // override some base class virtuals
70 virtual void DoGetSize(int *width
, int *height
) const;
73 DECLARE_DYNAMIC_CLASS_NO_COPY(wxClientDC
)
76 class WXDLLEXPORT wxPaintDC
: public wxClientDC
81 // Create a DC corresponding for painting the window in OnPaint()
82 wxPaintDC(wxWindow
*win
);
86 // find the entry for this DC in the cache (keyed by the window)
87 static WXHDC
FindDCInCache(wxWindow
* win
);
90 static wxArrayDCInfo ms_cache
;
92 // find the entry for this DC in the cache (keyed by the window)
93 wxPaintDCInfo
*FindInCache(size_t *index
= NULL
) const;
96 DECLARE_DYNAMIC_CLASS_NO_COPY(wxPaintDC
)
101 * This class is used when an application sends an HDC with the WM_PAINT
102 * message. It is used in HandlePaint and need not be used by an application.
105 class WXDLLEXPORT wxPaintDCEx
: public wxPaintDC
108 wxPaintDCEx(wxWindow
*canvas
, WXHDC dc
);
109 virtual ~wxPaintDCEx();
113 DECLARE_CLASS(wxPaintDCEx
)
114 DECLARE_NO_COPY_CLASS(wxPaintDCEx
)