1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/dcclient.h
3 // Purpose: wxClientDC class
4 // Author: David Webster
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_DCCLIENT_H_
12 #define _WX_DCCLIENT_H_
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
19 #include "wx/os2/dc.h"
20 #include "wx/dcclient.h"
21 #include "wx/dynarray.h"
23 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
27 // this one if used by wxPaintDC only
28 struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo
;
30 WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo
, wxArrayDCInfo
);
32 // ----------------------------------------------------------------------------
34 // ----------------------------------------------------------------------------
36 class WXDLLIMPEXP_CORE wxWindowDCImpl
: public wxPMDCImpl
40 wxWindowDCImpl( wxDC
*owner
);
42 // Create a DC corresponding to the whole window
43 wxWindowDCImpl( wxDC
*owner
, wxWindow
*pWin
);
45 virtual void DoGetSize(int *pWidth
, int *pHeight
) const;
48 // initialize the newly created DC
53 DECLARE_CLASS(wxWindowDCImpl
)
54 wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl
);
55 }; // end of CLASS wxWindowDC
57 class WXDLLIMPEXP_CORE wxClientDCImpl
: public wxWindowDCImpl
61 wxClientDCImpl( wxDC
*owner
);
63 // Create a DC corresponding to the client area of the window
64 wxClientDCImpl( wxDC
*owner
, wxWindow
*pWin
);
66 virtual ~wxClientDCImpl();
68 virtual void DoGetSize(int *pWidth
, int *pHeight
) const;
74 DECLARE_CLASS(wxClientDCImpl
)
75 wxDECLARE_NO_COPY_CLASS(wxClientDCImpl
);
76 }; // end of CLASS wxClientDC
78 class WXDLLIMPEXP_CORE wxPaintDCImpl
: public wxClientDCImpl
81 wxPaintDCImpl( wxDC
*owner
);
83 // Create a DC corresponding for painting the window in OnPaint()
84 wxPaintDCImpl( wxDC
*owner
, wxWindow
*pWin
);
86 virtual ~wxPaintDCImpl();
88 // find the entry for this DC in the cache (keyed by the window)
89 static WXHDC
FindDCInCache(wxWindow
* pWin
);
92 static wxArrayDCInfo ms_cache
;
94 // find the entry for this DC in the cache (keyed by the window)
95 wxPaintDCInfo
* FindInCache(size_t* pIndex
= NULL
) const;
97 DECLARE_CLASS(wxPaintDCImpl
)
98 wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl
);
99 }; // end of wxPaintDC