+bool wxAppConsoleBase::Yield(bool onlyIfNeeded)
+{
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+ if ( loop )
+ return loop->Yield(onlyIfNeeded);
+
+ wxScopedPtr<wxEventLoopBase> tmpLoop(CreateMainLoop());
+ return tmpLoop->Yield(onlyIfNeeded);
+}
+
+void wxAppConsoleBase::WakeUpIdle()
+{
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+
+ if ( loop )
+ loop->WakeUp();
+}
+
+bool wxAppConsoleBase::ProcessIdle()
+{
+ // synthesize an idle event and check if more of them are needed
+ wxIdleEvent event;
+ event.SetEventObject(this);
+ ProcessEvent(event);
+
+#if wxUSE_LOG
+ // flush the logged messages if any (do this after processing the events
+ // which could have logged new messages)
+ wxLog::FlushActive();
+#endif
+
+ // Garbage collect all objects previously scheduled for destruction.
+ DeletePendingObjects();
+
+ return event.MoreRequested();
+}
+
+bool wxAppConsoleBase::UsesEventLoop() const
+{
+ // in console applications we don't know whether we're going to have an
+ // event loop so assume we won't -- unless we already have one running
+ return wxEventLoopBase::GetActive() != NULL;
+}
+
+// ----------------------------------------------------------------------------
+// events
+// ----------------------------------------------------------------------------
+
+/* static */
+bool wxAppConsoleBase::IsMainLoopRunning()
+{
+ const wxAppConsole * const app = GetInstance();
+
+ return app && app->m_mainLoop != NULL;
+}
+
+int wxAppConsoleBase::FilterEvent(wxEvent& WXUNUSED(event))