+// ----------------------------------------------------------------------------
+// wxEventBlocker: helper class to temporarily disable event handling for a window
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxEventBlocker : public wxEvtHandler
+{
+public:
+ wxEventBlocker(wxWindow *win, wxEventType type = wxEVT_ANY);
+ virtual ~wxEventBlocker();
+
+ void Block(wxEventType type)
+ {
+ m_eventsToBlock.push_back(type);
+ }
+
+ virtual bool ProcessEvent(wxEvent& event);
+
+protected:
+ wxArrayInt m_eventsToBlock;
+ wxWindow *m_window;
+
+ DECLARE_NO_COPY_CLASS(wxEventBlocker)
+};
+