]>
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" | |
24 | ||
3a5ffa81 VZ |
25 | // ---------------------------------------------------------------------------- |
26 | // array types | |
27 | // ---------------------------------------------------------------------------- | |
28 | ||
29 | // this one if used by wxPaintDC only | |
30 | struct WXDLLEXPORT wxPaintDCInfo; | |
31 | WX_DECLARE_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo); | |
32 | ||
33 | // ---------------------------------------------------------------------------- | |
34 | // DC classes | |
35 | // ---------------------------------------------------------------------------- | |
36 | ||
37 | class WXDLLEXPORT wxWindowDC : public wxDC | |
2bda0e17 | 38 | { |
3a5ffa81 | 39 | DECLARE_DYNAMIC_CLASS(wxWindowDC) |
2bda0e17 | 40 | |
3a5ffa81 VZ |
41 | public: |
42 | wxWindowDC(); | |
2bda0e17 | 43 | |
3a5ffa81 VZ |
44 | // Create a DC corresponding to the whole window |
45 | wxWindowDC(wxWindow *win); | |
2bda0e17 | 46 | |
3a5ffa81 | 47 | virtual ~wxWindowDC(); |
2bda0e17 KB |
48 | }; |
49 | ||
3a5ffa81 | 50 | class WXDLLEXPORT wxClientDC : public wxWindowDC |
2bda0e17 | 51 | { |
3a5ffa81 | 52 | DECLARE_DYNAMIC_CLASS(wxClientDC) |
2bda0e17 | 53 | |
3a5ffa81 VZ |
54 | public: |
55 | wxClientDC(); | |
2bda0e17 | 56 | |
3a5ffa81 VZ |
57 | // Create a DC corresponding to the client area of the window |
58 | wxClientDC(wxWindow *win); | |
2bda0e17 | 59 | |
3a5ffa81 | 60 | virtual ~wxClientDC(); |
2bda0e17 KB |
61 | }; |
62 | ||
3a5ffa81 | 63 | class WXDLLEXPORT wxPaintDC : public wxWindowDC |
2bda0e17 | 64 | { |
3a5ffa81 VZ |
65 | DECLARE_DYNAMIC_CLASS(wxPaintDC) |
66 | ||
67 | public: | |
68 | wxPaintDC(); | |
2bda0e17 | 69 | |
3a5ffa81 VZ |
70 | // Create a DC corresponding for painting the window in OnPaint() |
71 | wxPaintDC(wxWindow *win); | |
2bda0e17 | 72 | |
3a5ffa81 | 73 | virtual ~wxPaintDC(); |
2bda0e17 | 74 | |
3a5ffa81 VZ |
75 | protected: |
76 | static wxArrayDCInfo ms_cache; | |
2bda0e17 | 77 | |
3a5ffa81 VZ |
78 | // find the entry for this DC in the cache (keyed by the window) |
79 | wxPaintDCInfo *FindInCache(size_t *index = NULL) const; | |
2bda0e17 KB |
80 | }; |
81 | ||
82 | #endif | |
bbcdf8bc | 83 | // _WX_DCCLIENT_H_ |