1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/dcclient.h
3 // Purpose: wxClientDC class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_DCCLIENT_H_
12 #define _WX_DCCLIENT_H_
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
19 #include "wx/msw/dc.h"
20 #include "wx/dcclient.h"
24 // ----------------------------------------------------------------------------
26 // ----------------------------------------------------------------------------
28 class WXDLLIMPEXP_CORE wxWindowDCImpl
: public wxMSWDCImpl
32 wxWindowDCImpl( wxDC
*owner
);
34 // Create a DC corresponding to the whole window
35 wxWindowDCImpl( wxDC
*owner
, wxWindow
*win
);
37 virtual void DoGetSize(int *width
, int *height
) const;
40 // initialize the newly created DC
43 DECLARE_CLASS(wxWindowDCImpl
)
44 wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl
);
47 class WXDLLIMPEXP_CORE wxClientDCImpl
: public wxWindowDCImpl
51 wxClientDCImpl( wxDC
*owner
);
53 // Create a DC corresponding to the client area of the window
54 wxClientDCImpl( wxDC
*owner
, wxWindow
*win
);
56 virtual ~wxClientDCImpl();
58 virtual void DoGetSize(int *width
, int *height
) const;
63 DECLARE_CLASS(wxClientDCImpl
)
64 wxDECLARE_NO_COPY_CLASS(wxClientDCImpl
);
67 class WXDLLIMPEXP_CORE wxPaintDCImpl
: public wxClientDCImpl
70 wxPaintDCImpl( wxDC
*owner
);
72 // Create a DC corresponding for painting the window in OnPaint()
73 wxPaintDCImpl( wxDC
*owner
, wxWindow
*win
);
75 virtual ~wxPaintDCImpl();
77 // find the entry for this DC in the cache (keyed by the window)
78 static WXHDC
FindDCInCache(wxWindow
* win
);
80 // This must be called by the code handling WM_PAINT to remove the DC
81 // cached for this window for the duration of this message processing.
82 static void EndPaint(wxWindow
*win
);
85 // Find the DC for this window in the cache, return NULL if not found.
86 static wxPaintDCInfo
*FindInCache(wxWindow
* win
);
88 DECLARE_CLASS(wxPaintDCImpl
)
89 wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl
);
94 * This class is used when an application sends an HDC with the WM_PAINT
95 * message. It is used in HandlePaint and need not be used by an application.
98 class WXDLLIMPEXP_CORE wxPaintDCEx
: public wxPaintDC
101 wxPaintDCEx(wxWindow
*canvas
, WXHDC dc
);
103 DECLARE_CLASS(wxPaintDCEx
)
104 wxDECLARE_NO_COPY_CLASS(wxPaintDCEx
);