+ // return true if we're running event loop, i.e. if the events can
+ // (already) be dispatched
+ static bool IsMainLoopRunning();
+
+#if wxUSE_EXCEPTIONS
+ // execute the functor to handle the given event
+ //
+ // this is a generalization of HandleEvent() below and the base class
+ // implementation of CallEventHandler() still calls HandleEvent() for
+ // compatibility for functors which are just wxEventFunctions (i.e. methods
+ // of wxEvtHandler)
+ virtual void CallEventHandler(wxEvtHandler *handler,
+ wxEventFunctor& functor,
+ wxEvent& event) const;
+
+ // call the specified handler on the given object with the given event
+ //
+ // this method only exists to allow catching the exceptions thrown by any
+ // event handler, it would lead to an extra (useless) virtual function call
+ // if the exceptions were not used, so it doesn't even exist in that case
+ virtual void HandleEvent(wxEvtHandler *handler,
+ wxEventFunction func,
+ wxEvent& event) const;
+
+ // Called when an unhandled C++ exception occurs inside OnRun(): note that
+ // the main event loop has already terminated by now and the program will
+ // exit, if you need to really handle the exceptions you need to override
+ // OnExceptionInMainLoop()
+ virtual void OnUnhandledException();
+
+ // Function called if an uncaught exception is caught inside the main
+ // event loop: it may return true to continue running the event loop or
+ // false to stop it (in the latter case it may rethrow the exception as
+ // well)
+ virtual bool OnExceptionInMainLoop();
+
+#endif // wxUSE_EXCEPTIONS
+
+
+ // pending events
+ // --------------
+
+ // IMPORTANT: all these methods conceptually belong to wxEventLoopBase
+ // but for many reasons we need to allow queuing of events
+ // even when there's no event loop (e.g. in wxApp::OnInit);
+ // this feature is used e.g. to queue events on secondary threads
+ // or in wxPython to use wx.CallAfter before the GUI is initialized
+
+ // process all events in the m_handlersWithPendingEvents list -- it is necessary
+ // to call this function to process posted events. This happens during each