]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/evtblocker.tex
compilation fix for wxUSE_STL==1 in DoGetSibling()
[wxWidgets.git] / docs / latex / wx / evtblocker.tex
CommitLineData
c4fa5aa7
VZ
1\section{\class{wxEventBlocker}}\label{wxeventblocker}
2
3This class is a special event handler which allows to discard
4any event (or a set of event types) directed to a specific window.
5
6Example:
7
8\begin{verbatim}
9
10 {
11 // block all events directed to this window while
12 // we do the 1000 FuncWhichSendsEvents() calls
13 wxEventBlocker blocker(this);
14
15 for ( int i = 0; i < 1000; i++ )
16 FuncWhichSendsEvents(i);
17
18 } // ~wxEventBlocker called, old event handler is restored
19
20 // the event generated by this call will be processed
21 FuncWhichSendsEvents(0)
22\end{verbatim}
23
24
25\wxheading{Derived from}
26
27\helpref{wxEvtHandler}{wxevthandler}\\
28\helpref{wxObject}{wxobject}
29
30\wxheading{Include files}
31
32<wx/event.h>
33
a7af285d
VZ
34\wxheading{Library}
35
36\helpref{wxCore}{librarieslist}
37
c4fa5aa7
VZ
38\wxheading{See also}
39
40\overview{Event handling overview}{eventhandlingoverview},
41\helpref{wxEvtHandler}{wxevthandler}
42
43
44\latexignore{\rtfignore{\wxheading{Members}}}
45
46\membersection{wxEventBlocker::wxEventBlocker}\label{wxeventblockerctor}
47
48\func{}{wxEventBlocker}{\param{wxWindow* }{win}, \param{wxEventType}{type = wxEVT\_ANY}}
49
50Constructs the blocker for the given window and for the given event type.
51If \arg{type} is \texttt{wxEVT\_ANY}, then all events for that window are
52blocked. You can call \helpref{Block}{wxeventblockerblock} after creation to
53add other event types to the list of events to block.
54
55Note that the \arg{win} window \textbf{must} remain alive until the
56wxEventBlocker object destruction.
57
58
59\membersection{wxEventBlocker::\destruct{wxEventBlocker}}\label{wxeventblockerdtor}
60
61\func{}{\destruct{wxEventBlocker}}{\void}
62
63Destructor. The blocker will remove itself from the chain of event handlers for
64the window provided in the constructor, thus restoring normal processing of
65events.
66
67
68\membersection{wxEventBlocker::Block}\label{wxeventblockerblock}
69
70\func{void}{Block}{\param{wxEventType }{eventType}}
71
72Adds to the list of event types which should be blocked the given \arg{eventType}.
73