]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
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 and Markus Holzem | |
3a5ffa81 | 9 | // Licence: wxWindows license |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_DCCLIENT_H_ |
13 | #define _WX_DCCLIENT_H_ | |
2bda0e17 | 14 | |
3a5ffa81 VZ |
15 | // ---------------------------------------------------------------------------- |
16 | // headers | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
2bda0e17 | 19 | #ifdef __GNUG__ |
3a5ffa81 | 20 | #pragma interface "dcclient.h" |
2bda0e17 KB |
21 | #endif |
22 | ||
23 | #include "wx/dc.h" | |
4286a5b5 | 24 | #include "wx/dynarray.h" |
2bda0e17 | 25 | |
3a5ffa81 VZ |
26 | // ---------------------------------------------------------------------------- |
27 | // array types | |
28 | // ---------------------------------------------------------------------------- | |
29 | ||
30 | // this one if used by wxPaintDC only | |
31 | struct WXDLLEXPORT wxPaintDCInfo; | |
e0272d05 | 32 | |
a497618a | 33 | WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo); |
3a5ffa81 VZ |
34 | |
35 | // ---------------------------------------------------------------------------- | |
36 | // DC classes | |
37 | // ---------------------------------------------------------------------------- | |
38 | ||
39 | class WXDLLEXPORT wxWindowDC : public wxDC | |
2bda0e17 | 40 | { |
3a5ffa81 | 41 | DECLARE_DYNAMIC_CLASS(wxWindowDC) |
2bda0e17 | 42 | |
3a5ffa81 VZ |
43 | public: |
44 | wxWindowDC(); | |
2bda0e17 | 45 | |
3a5ffa81 VZ |
46 | // Create a DC corresponding to the whole window |
47 | wxWindowDC(wxWindow *win); | |
2bda0e17 | 48 | |
3a5ffa81 | 49 | virtual ~wxWindowDC(); |
2bda0e17 KB |
50 | }; |
51 | ||
3a5ffa81 | 52 | class WXDLLEXPORT wxClientDC : public wxWindowDC |
2bda0e17 | 53 | { |
3a5ffa81 | 54 | DECLARE_DYNAMIC_CLASS(wxClientDC) |
2bda0e17 | 55 | |
3a5ffa81 VZ |
56 | public: |
57 | wxClientDC(); | |
2bda0e17 | 58 | |
3a5ffa81 VZ |
59 | // Create a DC corresponding to the client area of the window |
60 | wxClientDC(wxWindow *win); | |
2bda0e17 | 61 | |
3a5ffa81 | 62 | virtual ~wxClientDC(); |
2bda0e17 KB |
63 | }; |
64 | ||
3a5ffa81 | 65 | class WXDLLEXPORT wxPaintDC : public wxWindowDC |
2bda0e17 | 66 | { |
3a5ffa81 VZ |
67 | DECLARE_DYNAMIC_CLASS(wxPaintDC) |
68 | ||
69 | public: | |
70 | wxPaintDC(); | |
2bda0e17 | 71 | |
3a5ffa81 VZ |
72 | // Create a DC corresponding for painting the window in OnPaint() |
73 | wxPaintDC(wxWindow *win); | |
2bda0e17 | 74 | |
3a5ffa81 | 75 | virtual ~wxPaintDC(); |
2bda0e17 | 76 | |
63da7df7 JS |
77 | // find the entry for this DC in the cache (keyed by the window) |
78 | static WXHDC FindDCInCache(wxWindow* win); | |
79 | ||
3a5ffa81 VZ |
80 | protected: |
81 | static wxArrayDCInfo ms_cache; | |
2bda0e17 | 82 | |
3a5ffa81 VZ |
83 | // find the entry for this DC in the cache (keyed by the window) |
84 | wxPaintDCInfo *FindInCache(size_t *index = NULL) const; | |
2bda0e17 KB |
85 | }; |
86 | ||
87 | #endif | |
bbcdf8bc | 88 | // _WX_DCCLIENT_H_ |