]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/evtblocker.tex
don't declare inline function with dllexport declaration, this provokes mingw32 warni...
[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{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
46 Constructs the blocker for the given window and for the given event type.
47 If \arg{type} is \texttt{wxEVT\_ANY}, then all events for that window are
48 blocked. You can call \helpref{Block}{wxeventblockerblock} after creation to
49 add other event types to the list of events to block.
50
51 Note that the \arg{win} window \textbf{must} remain alive until the
52 wxEventBlocker object destruction.
53
54
55 \membersection{wxEventBlocker::\destruct{wxEventBlocker}}\label{wxeventblockerdtor}
56
57 \func{}{\destruct{wxEventBlocker}}{\void}
58
59 Destructor. The blocker will remove itself from the chain of event handlers for
60 the window provided in the constructor, thus restoring normal processing of
61 events.
62
63
64 \membersection{wxEventBlocker::Block}\label{wxeventblockerblock}
65
66 \func{void}{Block}{\param{wxEventType }{eventType}}
67
68 Adds to the list of event types which should be blocked the given \arg{eventType}.
69