]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: dcclient.h | |
3 | // Purpose: documentation for wxPaintDC class | |
4 | // Author: wxWidgets team | |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxPaintDC | |
11 | @wxheader{dcclient.h} | |
7c913512 | 12 | |
23324ae1 FM |
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. | |
7c913512 | 19 | |
23324ae1 FM |
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. | |
7c913512 | 23 | |
23324ae1 | 24 | To draw on a window from outside @b OnPaint, construct a wxClientDC object. |
7c913512 | 25 | |
23324ae1 FM |
26 | To draw on the whole window including decorations, construct a wxWindowDC object |
27 | (Windows only). | |
7c913512 | 28 | |
23324ae1 FM |
29 | @library{wxcore} |
30 | @category{dc} | |
7c913512 | 31 | |
23324ae1 FM |
32 | @seealso |
33 | wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC | |
34 | */ | |
35 | class wxPaintDC : public wxWindowDC | |
36 | { | |
37 | public: | |
38 | /** | |
39 | Constructor. Pass a pointer to the window on which you wish to paint. | |
40 | */ | |
41 | wxPaintDC(wxWindow* window); | |
42 | }; | |
43 | ||
44 | ||
45 | /** | |
46 | @class wxClientDC | |
47 | @wxheader{dcclient.h} | |
7c913512 | 48 | |
23324ae1 FM |
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. | |
7c913512 | 53 | |
23324ae1 | 54 | To draw on a window from within @b OnPaint, construct a wxPaintDC object. |
7c913512 | 55 | |
23324ae1 FM |
56 | To draw on the whole window including decorations, construct a wxWindowDC object |
57 | (Windows only). | |
7c913512 | 58 | |
23324ae1 FM |
59 | @library{wxcore} |
60 | @category{dc} | |
7c913512 | 61 | |
23324ae1 FM |
62 | @seealso |
63 | wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC | |
64 | */ | |
65 | class wxClientDC : public wxWindowDC | |
66 | { | |
67 | public: | |
68 | /** | |
69 | Constructor. Pass a pointer to the window on which you wish to paint. | |
70 | */ | |
71 | wxClientDC(wxWindow* window); | |
72 | }; | |
73 | ||
74 | ||
75 | /** | |
76 | @class wxWindowDC | |
77 | @wxheader{dcclient.h} | |
7c913512 | 78 | |
23324ae1 FM |
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. | |
7c913512 | 83 | |
23324ae1 | 84 | To draw on a window from inside @b OnPaint, construct a wxPaintDC object. |
7c913512 | 85 | |
23324ae1 FM |
86 | To draw on the client area of a window from outside @b OnPaint, construct a |
87 | wxClientDC object. | |
7c913512 | 88 | |
23324ae1 FM |
89 | To draw on the whole window including decorations, construct a wxWindowDC object |
90 | (Windows only). | |
7c913512 | 91 | |
23324ae1 FM |
92 | @library{wxcore} |
93 | @category{dc} | |
7c913512 | 94 | |
23324ae1 FM |
95 | @seealso |
96 | wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC | |
97 | */ | |
98 | class wxWindowDC : public wxDC | |
99 | { | |
100 | public: | |
101 | /** | |
102 | Constructor. Pass a pointer to the window on which you wish to paint. | |
103 | */ | |
104 | wxWindowDC(wxWindow* window); | |
105 | }; |