]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/dcclient.h
Fix bug with using uninitialized flags in GetParentForModalDialog().
[wxWidgets.git] / include / wx / os2 / dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcclient.h
3 // Purpose: wxClientDC class
4 // Author: David Webster
5 // Modified by:
6 // Created: 09/12/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
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/os2/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 WXDLLIMPEXP_CORE wxWindowDCImpl : public wxPMDCImpl
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 *pWin );
45
46 virtual void DoGetSize(int *pWidth, int *pHeight) const;
47
48 protected:
49 // initialize the newly created DC
50 void InitDC(void);
51
52 private:
53 SIZEL m_PageSize;
54 DECLARE_CLASS(wxWindowDCImpl)
55 wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
56 }; // end of CLASS wxWindowDC
57
58 class WXDLLIMPEXP_CORE 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 *pWin );
66
67 virtual ~wxClientDCImpl();
68
69 virtual void DoGetSize(int *pWidth, int *pHeight) const;
70
71 protected:
72 void InitDC(void);
73
74 private:
75 DECLARE_CLASS(wxClientDCImpl)
76 wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
77 }; // end of CLASS wxClientDC
78
79 class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
80 {
81 public:
82 wxPaintDCImpl( wxDC *owner );
83
84 // Create a DC corresponding for painting the window in OnPaint()
85 wxPaintDCImpl( wxDC *owner, wxWindow *pWin );
86
87 virtual ~wxPaintDCImpl();
88
89 // find the entry for this DC in the cache (keyed by the window)
90 static WXHDC FindDCInCache(wxWindow* pWin);
91
92 protected:
93 static wxArrayDCInfo ms_cache;
94
95 // find the entry for this DC in the cache (keyed by the window)
96 wxPaintDCInfo* FindInCache(size_t* pIndex = NULL) const;
97 private:
98 DECLARE_CLASS(wxPaintDCImpl)
99 wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
100 }; // end of wxPaintDC
101
102 #endif
103 // _WX_DCCLIENT_H_