]> git.saurik.com Git - wxWidgets.git/blame - interface/dcclient.h
use a different method to prevent an early size_allocate,
[wxWidgets.git] / interface / dcclient.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcclient.h
e54c96f1 3// Purpose: interface of 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
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
e54c96f1 32 @see wxDC, wxMemoryDC, wxPaintDC, 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
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
e54c96f1 62 @see wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
23324ae1
FM
63*/
64class wxClientDC : public wxWindowDC
65{
66public:
67 /**
68 Constructor. Pass a pointer to the window on which you wish to paint.
69 */
70 wxClientDC(wxWindow* window);
71};
72
73
e54c96f1 74
23324ae1
FM
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
e54c96f1 95 @see wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC
23324ae1
FM
96*/
97class wxWindowDC : public wxDC
98{
99public:
100 /**
101 Constructor. Pass a pointer to the window on which you wish to paint.
102 */
103 wxWindowDC(wxWindow* window);
104};
e54c96f1 105