]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/dcclient.h
17f39ca1a84d4cfea2285b464e0e49c7dea15064
[wxWidgets.git] / interface / wx / dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcclient.h
3 // Purpose: interface of wxClientDC and wxPaintDC
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxPaintDC
11 @wxheader{dcclient.h}
12
13 A wxPaintDC must be constructed if an application wishes to paint on the
14 client area of a window from within an EVT_PAINT() event handler. This
15 should normally be constructed as a temporary stack object; don't store a
16 wxPaintDC object. If you have an EVT_PAINT() handler, you @e must create a
17 wxPaintDC object within it even if you don't actually use it.
18
19 Using wxPaintDC within your EVT_PAINT() handler is important because it
20 automatically sets the clipping area to the damaged area of the window.
21 Attempts to draw outside this area do not appear.
22
23 To draw on a window from outside your EVT_PAINT() handler, construct a
24 wxClientDC object.
25
26 To draw on the whole window including decorations, construct a wxWindowDC
27 object (Windows only).
28
29 A wxPaintDC object is initialized to use the same font and colours as the
30 window it is associated with.
31
32 @library{wxcore}
33 @category{dc}
34
35 @see wxDC, wxClientDC, wxMemoryDC, wxWindowDC, wxScreenDC
36 */
37 class wxPaintDC : public wxWindowDC
38 {
39 public:
40 /**
41 Constructor. Pass a pointer to the window on which you wish to paint.
42 */
43 wxPaintDC(wxWindow* window);
44 };
45
46
47
48 /**
49 @class wxClientDC
50 @wxheader{dcclient.h}
51
52 A wxClientDC must be constructed if an application wishes to paint on the
53 client area of a window from outside an EVT_PAINT() handler. This should
54 normally be constructed as a temporary stack object; don't store a
55 wxClientDC object.
56
57 To draw on a window from within an EVT_PAINT() handler, construct a
58 wxPaintDC object instead.
59
60 To draw on the whole window including decorations, construct a wxWindowDC
61 object (Windows only).
62
63 A wxClientDC object is initialized to use the same font and colours as the
64 window it is associated with.
65
66 @library{wxcore}
67 @category{dc}
68
69 @see wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
70 */
71 class wxClientDC : public wxWindowDC
72 {
73 public:
74 /**
75 Constructor. Pass a pointer to the window on which you wish to paint.
76 */
77 wxClientDC(wxWindow* window);
78 };
79
80
81
82 /**
83 @class wxWindowDC
84 @wxheader{dcclient.h}
85
86 A wxWindowDC must be constructed if an application wishes to paint on the
87 whole area of a window (client and decorations). This should normally be
88 constructed as a temporary stack object; don't store a wxWindowDC object.
89
90 To draw on a window from inside an EVT_PAINT() handler, construct a
91 wxPaintDC object instead.
92
93 To draw on the client area of a window from outside an EVT_PAINT() handler,
94 construct a wxClientDC object.
95
96 A wxWindowDC object is initialized to use the same font and colours as the
97 window it is associated with.
98
99 @library{wxcore}
100 @category{dc}
101
102 @see wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC
103 */
104 class wxWindowDC : public wxDC
105 {
106 public:
107 /**
108 Constructor. Pass a pointer to the window on which you wish to paint.
109 */
110 wxWindowDC(wxWindow* window);
111 };
112