]> git.saurik.com Git - wxWidgets.git/blame - interface/dcclient.h
Mention wxGCDC
[wxWidgets.git] / interface / dcclient.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcclient.h
3a7fb603 3// Purpose: interface of wxClientDC and wxPaintDC
23324ae1
FM
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 13 A wxPaintDC must be constructed if an application wishes to paint on the
3a7fb603
BP
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.
7c913512 18
3a7fb603
BP
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.
7c913512 22
3a7fb603
BP
23 To draw on a window from outside your EVT_PAINT() handler, construct a
24 wxClientDC object.
7c913512 25
3a7fb603
BP
26 To draw on the whole window including decorations, construct a wxWindowDC
27 object (Windows only).
7c913512 28
23324ae1
FM
29 @library{wxcore}
30 @category{dc}
7c913512 31
3a7fb603 32 @see wxDC, wxClientDC, wxMemoryDC, wxWindowDC, wxScreenDC
23324ae1
FM
33*/
34class wxPaintDC : public wxWindowDC
35{
36public:
37 /**
38 Constructor. Pass a pointer to the window on which you wish to paint.
39 */
40 wxPaintDC(wxWindow* window);
41};
42
43
e54c96f1 44
23324ae1
FM
45/**
46 @class wxClientDC
47 @wxheader{dcclient.h}
7c913512 48
23324ae1 49 A wxClientDC must be constructed if an application wishes to paint on the
3a7fb603
BP
50 client area of a window from outside an EVT_PAINT() handler. This should
51 normally be constructed as a temporary stack object; don't store a
52 wxClientDC object.
7c913512 53
3a7fb603
BP
54 To draw on a window from within an EVT_PAINT() handler, construct a
55 wxPaintDC object instead.
7c913512 56
3a7fb603
BP
57 To draw on the whole window including decorations, construct a wxWindowDC
58 object (Windows only).
7c913512 59
23324ae1
FM
60 @library{wxcore}
61 @category{dc}
7c913512 62
e54c96f1 63 @see wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
23324ae1
FM
64*/
65class wxClientDC : public wxWindowDC
66{
67public:
68 /**
69 Constructor. Pass a pointer to the window on which you wish to paint.
70 */
71 wxClientDC(wxWindow* window);
72};
73
74
e54c96f1 75
23324ae1
FM
76/**
77 @class wxWindowDC
78 @wxheader{dcclient.h}
7c913512 79
23324ae1 80 A wxWindowDC must be constructed if an application wishes to paint on the
3a7fb603
BP
81 whole area of a window (client and decorations). This should normally be
82 constructed as a temporary stack object; don't store a wxWindowDC object.
7c913512 83
3a7fb603
BP
84 To draw on a window from inside an EVT_PAINT() handler, construct a
85 wxPaintDC object instead.
7c913512 86
3a7fb603
BP
87 To draw on the client area of a window from outside an EVT_PAINT() handler,
88 construct a wxClientDC object.
7c913512 89
23324ae1
FM
90 @library{wxcore}
91 @category{dc}
7c913512 92
e54c96f1 93 @see wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC
23324ae1
FM
94*/
95class wxWindowDC : public wxDC
96{
97public:
98 /**
99 Constructor. Pass a pointer to the window on which you wish to paint.
100 */
101 wxWindowDC(wxWindow* window);
102};
e54c96f1 103