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