]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxClientDC and wxPaintDC
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
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.
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.
22 To draw on a window from outside your EVT_PAINT() handler, construct a
25 To draw on the whole window including decorations, construct a wxWindowDC
26 object (Windows only).
28 A wxPaintDC object is initialized to use the same font and colours as the
29 window it is associated with.
34 @see wxDC, wxClientDC, wxMemoryDC, wxWindowDC, wxScreenDC
36 class wxPaintDC
: public wxWindowDC
40 Constructor. Pass a pointer to the window on which you wish to paint.
42 wxPaintDC(wxWindow
* window
);
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
55 To draw on a window from within an EVT_PAINT() handler, construct a
56 wxPaintDC object instead.
58 To draw on the whole window including decorations, construct a wxWindowDC
59 object (Windows only).
61 A wxClientDC object is initialized to use the same font and colours as the
62 window it is associated with.
67 @see wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
69 class wxClientDC
: public wxWindowDC
73 Constructor. Pass a pointer to the window on which you wish to paint.
75 wxClientDC(wxWindow
* window
);
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.
87 To draw on a window from inside an EVT_PAINT() handler, construct a
88 wxPaintDC object instead.
90 To draw on the client area of a window from outside an EVT_PAINT() handler,
91 construct a wxClientDC object.
93 A wxWindowDC object is initialized to use the same font and colours as the
94 window it is associated with.
99 @see wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC
101 class wxWindowDC
: public wxDC
105 Constructor. Pass a pointer to the window on which you wish to paint.
107 wxWindowDC(wxWindow
* window
);