]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/evtblocker.tex
use 'neither ... nor ...' instead of 'neither ... or ...' in wxFinite documentation
[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
34\wxheading{See also}
35
36\overview{Event handling overview}{eventhandlingoverview},
37\helpref{wxEvtHandler}{wxevthandler}
38
39
40\latexignore{\rtfignore{\wxheading{Members}}}
41
42\membersection{wxEventBlocker::wxEventBlocker}\label{wxeventblockerctor}
43
44\func{}{wxEventBlocker}{\param{wxWindow* }{win}, \param{wxEventType}{type = wxEVT\_ANY}}
45
46Constructs the blocker for the given window and for the given event type.
47If \arg{type} is \texttt{wxEVT\_ANY}, then all events for that window are
48blocked. You can call \helpref{Block}{wxeventblockerblock} after creation to
49add other event types to the list of events to block.
50
51Note that the \arg{win} window \textbf{must} remain alive until the
52wxEventBlocker object destruction.
53
54
55\membersection{wxEventBlocker::\destruct{wxEventBlocker}}\label{wxeventblockerdtor}
56
57\func{}{\destruct{wxEventBlocker}}{\void}
58
59Destructor. The blocker will remove itself from the chain of event handlers for
60the window provided in the constructor, thus restoring normal processing of
61events.
62
63
64\membersection{wxEventBlocker::Block}\label{wxeventblockerblock}
65
66\func{void}{Block}{\param{wxEventType }{eventType}}
67
68Adds to the list of event types which should be blocked the given \arg{eventType}.
69