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 // ----------------------------------------------------------------------------
19 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
20 #pragma interface "dcclient.h"
24 #include "wx/dynarray.h"
26 // ----------------------------------------------------------------------------
28 // ----------------------------------------------------------------------------
30 // this one if used by wxPaintDC only
31 struct WXDLLEXPORT wxPaintDCInfo
;
33 WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo
, wxArrayDCInfo
);
35 // ----------------------------------------------------------------------------
37 // ----------------------------------------------------------------------------
39 class WXDLLEXPORT wxWindowDC
: public wxDC
45 // Create a DC corresponding to the whole window
46 wxWindowDC(wxWindow
*win
);
49 // intiialize the newly created DC
52 // override some base class virtuals
53 virtual void DoGetSize(int *width
, int *height
) const;
56 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowDC
)
59 class WXDLLEXPORT wxClientDC
: public wxWindowDC
65 // Create a DC corresponding to the client area of the window
66 wxClientDC(wxWindow
*win
);
68 virtual ~wxClientDC();
73 // override some base class virtuals
74 virtual void DoGetSize(int *width
, int *height
) const;
77 DECLARE_DYNAMIC_CLASS_NO_COPY(wxClientDC
)
80 class WXDLLEXPORT wxPaintDC
: public wxClientDC
85 // Create a DC corresponding for painting the window in OnPaint()
86 wxPaintDC(wxWindow
*win
);
90 // find the entry for this DC in the cache (keyed by the window)
91 static WXHDC
FindDCInCache(wxWindow
* win
);
94 static wxArrayDCInfo ms_cache
;
96 // find the entry for this DC in the cache (keyed by the window)
97 wxPaintDCInfo
*FindInCache(size_t *index
= NULL
) const;
100 DECLARE_DYNAMIC_CLASS_NO_COPY(wxPaintDC
)
105 * This class is used when an application sends an HDC with the WM_PAINT
106 * message. It is used in HandlePaint and need not be used by an application.
109 class WXDLLEXPORT wxPaintDCEx
: public wxPaintDC
112 wxPaintDCEx(wxWindow
*canvas
, WXHDC dc
);
113 virtual ~wxPaintDCEx();
117 DECLARE_CLASS(wxPaintDCEx
)
118 DECLARE_NO_COPY_CLASS(wxPaintDCEx
)