]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/eraseevt.tex
Added EVT_MOVE_START, EVT_MOVE_END (wxMSW only for now)
[wxWidgets.git] / docs / latex / wx / eraseevt.tex
CommitLineData
a660d684
KB
1\section{\class{wxEraseEvent}}\label{wxeraseevent}
2
3An erase event is sent when a window's background needs to be repainted.
4
f4fcc291
JS
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
a660d684
KB
15\wxheading{Derived from}
16
17\helpref{wxEvent}{wxevent}\\
18\helpref{wxObject}{wxobject}
19
954b8ae6
JS
20\wxheading{Include files}
21
22<wx/event.h>
23
a7af285d
VZ
24\wxheading{Library}
25
26\helpref{wxCore}{librarieslist}
27
a660d684
KB
28\wxheading{Event table macros}
29
30To process an erase event, use this event handler macro to direct input to a member
31function that takes a wxEraseEvent argument.
32
33\twocolwidtha{7cm}
34\begin{twocollist}\itemsep=0pt
884360bc 35\twocolitem{{\bf EVT\_ERASE\_BACKGROUND(func)}}{Process a wxEVT\_ERASE\_BACKGROUND event.}
a660d684
KB
36\end{twocollist}%
37
38\wxheading{Remarks}
39
05994861
KH
40Use the device context returned by \helpref{GetDC}{wxeraseeventgetdc} to draw on,
41don't create a wxPaintDC in the event handler.
a660d684
KB
42
43\wxheading{See also}
44
f4fcc291
JS
45%\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground},
46\helpref{Event handling overview}{eventhandlingoverview}
a660d684
KB
47
48\latexignore{\rtfignore{\wxheading{Members}}}
49
b236c10f 50\membersection{wxEraseEvent::wxEraseEvent}\label{wxeraseeventctor}
a660d684
KB
51
52\func{}{wxEraseEvent}{\param{int }{id = 0}, \param{wxDC* }{dc = NULL}}
53
54Constructor.
55
a660d684
KB
56\membersection{wxEraseEvent::GetDC}\label{wxeraseeventgetdc}
57
58\constfunc{wxDC*}{GetDC}{\void}
59
05994861 60Returns the device context associated with the erase event to draw on.
a660d684 61