+void wxAppConsoleBase::ExitMainLoop()
+{
+ // we should exit from the main event loop, not just any currently active
+ // (e.g. modal dialog) event loop
+ if ( m_mainLoop && m_mainLoop->IsRunning() )
+ {
+ m_mainLoop->Exit(0);
+ }
+}
+
+bool wxAppConsoleBase::Pending()
+{
+ // use the currently active message loop here, not m_mainLoop, because if
+ // we're showing a modal dialog (with its own event loop) currently the
+ // main event loop is not running anyhow
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+
+ return loop && loop->Pending();
+}
+
+bool wxAppConsoleBase::Dispatch()
+{
+ // see comment in Pending()
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+
+ return loop && loop->Dispatch();
+}
+
+bool wxAppConsoleBase::HasPendingEvents() const
+{
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+
+ return loop && loop->HasPendingEvents();
+}
+
+void wxAppConsoleBase::SuspendProcessingOfPendingEvents()
+{
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+
+ if (loop) loop->SuspendProcessingOfPendingEvents();
+}
+
+void wxAppConsoleBase::ResumeProcessingOfPendingEvents()
+{
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();