]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/dcclient.h
Use wxGetTranslation() instead of _() in the public headers.
[wxWidgets.git] / include / wx / os2 / dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/dcclient.h
3 // Purpose: wxClientDC class
4 // Author: David Webster
5 // Modified by:
6 // Created: 09/12/99
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_DCCLIENT_H_
12 #define _WX_DCCLIENT_H_
13
14 // ----------------------------------------------------------------------------
15 // headers
16 // ----------------------------------------------------------------------------
17
18 #include "wx/dc.h"
19 #include "wx/os2/dc.h"
20 #include "wx/dcclient.h"
21 #include "wx/dynarray.h"
22
23 // ----------------------------------------------------------------------------
24 // array types
25 // ----------------------------------------------------------------------------
26
27 // this one if used by wxPaintDC only
28 struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
29
30 WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
31
32 // ----------------------------------------------------------------------------
33 // DC classes
34 // ----------------------------------------------------------------------------
35
36 class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxPMDCImpl
37 {
38 public:
39 // default ctor
40 wxWindowDCImpl( wxDC *owner );
41
42 // Create a DC corresponding to the whole window
43 wxWindowDCImpl( wxDC *owner, wxWindow *pWin );
44
45 virtual void DoGetSize(int *pWidth, int *pHeight) const;
46
47 protected:
48 // initialize the newly created DC
49 void InitDC(void);
50
51 private:
52 SIZEL m_PageSize;
53 DECLARE_CLASS(wxWindowDCImpl)
54 wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
55 }; // end of CLASS wxWindowDC
56
57 class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
58 {
59 public:
60 // default ctor
61 wxClientDCImpl( wxDC *owner );
62
63 // Create a DC corresponding to the client area of the window
64 wxClientDCImpl( wxDC *owner, wxWindow *pWin );
65
66 virtual ~wxClientDCImpl();
67
68 virtual void DoGetSize(int *pWidth, int *pHeight) const;
69
70 protected:
71 void InitDC(void);
72
73 private:
74 DECLARE_CLASS(wxClientDCImpl)
75 wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
76 }; // end of CLASS wxClientDC
77
78 class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
79 {
80 public:
81 wxPaintDCImpl( wxDC *owner );
82
83 // Create a DC corresponding for painting the window in OnPaint()
84 wxPaintDCImpl( wxDC *owner, wxWindow *pWin );
85
86 virtual ~wxPaintDCImpl();
87
88 // find the entry for this DC in the cache (keyed by the window)
89 static WXHDC FindDCInCache(wxWindow* pWin);
90
91 protected:
92 static wxArrayDCInfo ms_cache;
93
94 // find the entry for this DC in the cache (keyed by the window)
95 wxPaintDCInfo* FindInCache(size_t* pIndex = NULL) const;
96 private:
97 DECLARE_CLASS(wxPaintDCImpl)
98 wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
99 }; // end of wxPaintDC
100
101 #endif
102 // _WX_DCCLIENT_H_