]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/dcclient.h
fixing 10.5 only compiles
[wxWidgets.git] / include / wx / msw / dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcclient.h
3 // Purpose: wxClientDC class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_DCCLIENT_H_
13 #define _WX_DCCLIENT_H_
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #include "wx/dc.h"
20 #include "wx/msw/dc.h"
21 #include "wx/dcclient.h"
22 #include "wx/dynarray.h"
23
24 // ----------------------------------------------------------------------------
25 // array types
26 // ----------------------------------------------------------------------------
27
28 // this one if used by wxPaintDC only
29 struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
30
31 WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
32
33 // ----------------------------------------------------------------------------
34 // DC classes
35 // ----------------------------------------------------------------------------
36
37 class WXDLLEXPORT wxWindowDCImpl : public wxMSWDCImpl
38 {
39 public:
40 // default ctor
41 wxWindowDCImpl( wxDC *owner );
42
43 // Create a DC corresponding to the whole window
44 wxWindowDCImpl( wxDC *owner, wxWindow *win );
45
46 protected:
47 // initialize the newly created DC
48 void InitDC();
49
50 // override some base class virtuals
51 virtual void DoGetSize(int *width, int *height) const;
52
53 private:
54 DECLARE_CLASS(wxWindowDCImpl)
55 DECLARE_NO_COPY_CLASS(wxWindowDCImpl)
56 };
57
58 class WXDLLEXPORT wxClientDCImpl : public wxWindowDCImpl
59 {
60 public:
61 // default ctor
62 wxClientDCImpl( wxDC *owner );
63
64 // Create a DC corresponding to the client area of the window
65 wxClientDCImpl( wxDC *owner, wxWindow *win );
66
67 virtual ~wxClientDCImpl();
68
69 protected:
70 void InitDC();
71
72 // override some base class virtuals
73 virtual void DoGetSize(int *width, int *height) const;
74
75 private:
76 DECLARE_CLASS(wxClientDCImpl)
77 DECLARE_NO_COPY_CLASS(wxClientDCImpl)
78 };
79
80 class WXDLLEXPORT wxPaintDCImpl : public wxClientDCImpl
81 {
82 public:
83 wxPaintDCImpl( wxDC *owner );
84
85 // Create a DC corresponding for painting the window in OnPaint()
86 wxPaintDCImpl( wxDC *owner, wxWindow *win );
87
88 virtual ~wxPaintDCImpl();
89
90 // find the entry for this DC in the cache (keyed by the window)
91 static WXHDC FindDCInCache(wxWindow* win);
92
93 protected:
94 static wxArrayDCInfo ms_cache;
95
96 // find the entry for this DC in the cache (keyed by the window)
97 wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
98
99 private:
100 DECLARE_CLASS(wxPaintDCImpl)
101 DECLARE_NO_COPY_CLASS(wxPaintDCImpl)
102 };
103
104 /*
105 * wxPaintDCEx
106 * This class is used when an application sends an HDC with the WM_PAINT
107 * message. It is used in HandlePaint and need not be used by an application.
108 */
109
110 class WXDLLEXPORT wxPaintDCEx : public wxPaintDC
111 {
112 public:
113 wxPaintDCEx(wxWindow *canvas, WXHDC dc);
114
115 private:
116 DECLARE_CLASS(wxPaintDCEx)
117 DECLARE_NO_COPY_CLASS(wxPaintDCEx)
118 };
119
120 #endif
121 // _WX_DCCLIENT_H_