1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/dcclient.h
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/msw/dc.h"
21 #include "wx/dcclient.h"
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 class WXDLLIMPEXP_CORE wxWindowDCImpl
: public wxMSWDCImpl
33 wxWindowDCImpl( wxDC
*owner
);
35 // Create a DC corresponding to the whole window
36 wxWindowDCImpl( wxDC
*owner
, wxWindow
*win
);
38 virtual void DoGetSize(int *width
, int *height
) const;
41 // initialize the newly created DC
44 DECLARE_CLASS(wxWindowDCImpl
)
45 wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl
);
48 class WXDLLIMPEXP_CORE wxClientDCImpl
: public wxWindowDCImpl
52 wxClientDCImpl( wxDC
*owner
);
54 // Create a DC corresponding to the client area of the window
55 wxClientDCImpl( wxDC
*owner
, wxWindow
*win
);
57 virtual ~wxClientDCImpl();
59 virtual void DoGetSize(int *width
, int *height
) const;
64 DECLARE_CLASS(wxClientDCImpl
)
65 wxDECLARE_NO_COPY_CLASS(wxClientDCImpl
);
68 class WXDLLIMPEXP_CORE wxPaintDCImpl
: public wxClientDCImpl
71 wxPaintDCImpl( wxDC
*owner
);
73 // Create a DC corresponding for painting the window in OnPaint()
74 wxPaintDCImpl( wxDC
*owner
, wxWindow
*win
);
76 virtual ~wxPaintDCImpl();
78 // find the entry for this DC in the cache (keyed by the window)
79 static WXHDC
FindDCInCache(wxWindow
* win
);
81 // This must be called by the code handling WM_PAINT to remove the DC
82 // cached for this window for the duration of this message processing.
83 static void EndPaint(wxWindow
*win
);
86 // Find the DC for this window in the cache, return NULL if not found.
87 static wxPaintDCInfo
*FindInCache(wxWindow
* win
);
89 DECLARE_CLASS(wxPaintDCImpl
)
90 wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl
);
95 * This class is used when an application sends an HDC with the WM_PAINT
96 * message. It is used in HandlePaint and need not be used by an application.
99 class WXDLLIMPEXP_CORE wxPaintDCEx
: public wxPaintDC
102 wxPaintDCEx(wxWindow
*canvas
, WXHDC dc
);
104 DECLARE_CLASS(wxPaintDCEx
)
105 wxDECLARE_NO_COPY_CLASS(wxPaintDCEx
);