]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/evtblocker.tex
remove ODBC and DBgrid libraries
[wxWidgets.git] / docs / latex / wx / evtblocker.tex
1 \section{\class{wxEventBlocker}}\label{wxeventblocker}
2
3 This class is a special event handler which allows to discard
4 any event (or a set of event types) directed to a specific window.
5
6 Example:
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{Library}
35
36 \helpref{wxCore}{librarieslist}
37
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
50 Constructs the blocker for the given window and for the given event type.
51 If \arg{type} is \texttt{wxEVT\_ANY}, then all events for that window are
52 blocked. You can call \helpref{Block}{wxeventblockerblock} after creation to
53 add other event types to the list of events to block.
54
55 Note that the \arg{win} window \textbf{must} remain alive until the
56 wxEventBlocker object destruction.
57
58
59 \membersection{wxEventBlocker::\destruct{wxEventBlocker}}\label{wxeventblockerdtor}
60
61 \func{}{\destruct{wxEventBlocker}}{\void}
62
63 Destructor. The blocker will remove itself from the chain of event handlers for
64 the window provided in the constructor, thus restoring normal processing of
65 events.
66
67
68 \membersection{wxEventBlocker::Block}\label{wxeventblockerblock}
69
70 \func{void}{Block}{\param{wxEventType }{eventType}}
71
72 Adds to the list of event types which should be blocked the given \arg{eventType}.
73