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