]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/dfb/dcclient.h | |
3 | // Purpose: wxWindowDCImpl, wxClientDCImpl and wxPaintDCImpl | |
4 | // Author: Vaclav Slavik | |
5 | // Created: 2006-08-10 | |
6 | // Copyright: (c) 2006 REA Elektronik GmbH | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_DFB_DCCLIENT_H_ | |
11 | #define _WX_DFB_DCCLIENT_H_ | |
12 | ||
13 | #include "wx/dfb/dc.h" | |
14 | ||
15 | class WXDLLIMPEXP_FWD_CORE wxWindow; | |
16 | ||
17 | //----------------------------------------------------------------------------- | |
18 | // wxWindowDCImpl | |
19 | //----------------------------------------------------------------------------- | |
20 | ||
21 | class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxDFBDCImpl | |
22 | { | |
23 | public: | |
24 | wxWindowDCImpl(wxDC *owner) : wxDFBDCImpl(owner), m_shouldFlip(false) { } | |
25 | wxWindowDCImpl(wxDC *owner, wxWindow *win); | |
26 | virtual ~wxWindowDCImpl(); | |
27 | ||
28 | protected: | |
29 | // initializes the DC for painting on given window; if rect!=NULL, then | |
30 | // for painting only on the given region of the window | |
31 | void InitForWin(wxWindow *win, const wxRect *rect); | |
32 | ||
33 | private: | |
34 | wxRect m_winRect; // rectangle of the window being painted | |
35 | ||
36 | bool m_shouldFlip; // flip the surface when done? | |
37 | ||
38 | friend class wxOverlayImpl; // for m_shouldFlip; | |
39 | ||
40 | DECLARE_DYNAMIC_CLASS(wxWindowDCImpl) | |
41 | wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl); | |
42 | }; | |
43 | ||
44 | //----------------------------------------------------------------------------- | |
45 | // wxClientDCImpl | |
46 | //----------------------------------------------------------------------------- | |
47 | ||
48 | class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl | |
49 | { | |
50 | public: | |
51 | wxClientDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { } | |
52 | wxClientDCImpl(wxDC *owner, wxWindow *win); | |
53 | ||
54 | DECLARE_DYNAMIC_CLASS(wxClientDCImpl) | |
55 | wxDECLARE_NO_COPY_CLASS(wxClientDCImpl); | |
56 | }; | |
57 | ||
58 | ||
59 | //----------------------------------------------------------------------------- | |
60 | // wxPaintDCImpl | |
61 | //----------------------------------------------------------------------------- | |
62 | ||
63 | class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl | |
64 | { | |
65 | public: | |
66 | wxPaintDCImpl(wxDC *owner) : wxClientDCImpl(owner) { } | |
67 | wxPaintDCImpl(wxDC *owner, wxWindow *win) : wxClientDCImpl(owner, win) { } | |
68 | ||
69 | DECLARE_DYNAMIC_CLASS(wxPaintDCImpl) | |
70 | wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); | |
71 | }; | |
72 | ||
73 | #endif // _WX_DFB_DCCLIENT_H_ |