1 \section{\class{wxEventBlocker
}}\label{wxeventblocker
}
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.
11 // block all events directed to this window while
12 // we do the
1000 FuncWhichSendsEvents() calls
13 wxEventBlocker blocker(this);
15 for ( int i =
0; i <
1000; i++ )
16 FuncWhichSendsEvents(i);
18 } // ~wxEventBlocker called, old event handler is restored
20 // the event generated by this call will be processed
21 FuncWhichSendsEvents(
0)
25 \wxheading{Derived from
}
27 \helpref{wxEvtHandler
}{wxevthandler
}\\
28 \helpref{wxObject
}{wxobject
}
30 \wxheading{Include files
}
36 \overview{Event handling overview
}{eventhandlingoverview
},
37 \helpref{wxEvtHandler
}{wxevthandler
}
40 \latexignore{\rtfignore{\wxheading{Members
}}}
42 \membersection{wxEventBlocker::wxEventBlocker
}\label{wxeventblockerctor
}
44 \func{}{wxEventBlocker
}{\param{wxWindow*
}{win
},
\param{wxEventType
}{type = wxEVT
\_ANY}}
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.
51 Note that the
\arg{win
} window
\textbf{must
} remain alive until the
52 wxEventBlocker object destruction.
55 \membersection{wxEventBlocker::
\destruct{wxEventBlocker
}}\label{wxeventblockerdtor
}
57 \func{}{\destruct{wxEventBlocker
}}{\void}
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
64 \membersection{wxEventBlocker::Block
}\label{wxeventblockerblock
}
66 \func{void
}{Block
}{\param{wxEventType
}{eventType
}}
68 Adds to the list of event types which should be blocked the given
\arg{eventType
}.