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