]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/eraseevt.tex
Fixed to work with the new wxMacControl system.
[wxWidgets.git] / docs / latex / wx / eraseevt.tex
... / ...
CommitLineData
1\section{\class{wxEraseEvent}}\label{wxeraseevent}
2
3An erase event is sent when a window's background needs to be repainted.
4
5On some platforms, such as GTK+, this event is simulated (simply generated just before the
6paint event) and may cause flicker. It is therefore recommended that
7you set the text background colour explicitly in order to prevent flicker.
8The default background colour under GTK+ is grey.
9
10To intercept this event, use the EVT\_ERASE\_BACKGROUND macro in an event table definition.
11
12You must call wxEraseEvent::GetDC and use the returned device context if it is non-NULL.
13If it is NULL, create your own temporary wxClientDC object.
14
15\wxheading{Derived from}
16
17\helpref{wxEvent}{wxevent}\\
18\helpref{wxObject}{wxobject}
19
20\wxheading{Include files}
21
22<wx/event.h>
23
24\wxheading{Event table macros}
25
26To process an erase event, use this event handler macro to direct input to a member
27function that takes a wxEraseEvent argument.
28
29\twocolwidtha{7cm}
30\begin{twocollist}\itemsep=0pt
31\twocolitem{{\bf EVT\_ERASE\_BACKGROUND(func)}}{Process a wxEVT\_ERASE\_BACKGROUND event.}
32\end{twocollist}%
33
34\wxheading{Remarks}
35
36Use the {\bf m\_DC} device context to draw into, don't create wxPaintDC in
37the event handler.
38
39\wxheading{See also}
40
41%\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground},
42\helpref{Event handling overview}{eventhandlingoverview}
43
44\latexignore{\rtfignore{\wxheading{Members}}}
45
46\membersection{wxEraseEvent::wxEraseEvent}
47
48\func{}{wxEraseEvent}{\param{int }{id = 0}, \param{wxDC* }{dc = NULL}}
49
50Constructor.
51
52\membersection{wxEraseEvent::m\_dc}
53
54\member{wxDC*}{m\_dc}
55
56The device context associated with the erase event.
57
58\membersection{wxEraseEvent::GetDC}\label{wxeraseeventgetdc}
59
60\constfunc{wxDC*}{GetDC}{\void}
61
62Returns the device context to draw into.
63