+wxEventLoopBase::wxEventLoopBase()
+{
+ m_isInsideYield = false;
+ m_eventsToProcessInsideYield = wxEVT_CATEGORY_ALL;
+}
+
+bool wxEventLoopBase::IsMain() const
+{
+ if (wxTheApp)
+ return wxTheApp->GetMainLoop() == this;
+ return false;
+}
+
+/* static */
+void wxEventLoopBase::SetActive(wxEventLoopBase* loop)
+{
+ ms_activeLoop = loop;
+
+ if (wxTheApp)
+ wxTheApp->OnEventLoopEnter(loop);
+}
+
+void wxEventLoopBase::OnExit()
+{
+ if (wxTheApp)
+ wxTheApp->OnEventLoopExit(this);
+}
+
+void wxEventLoopBase::WakeUpIdle()
+{
+ WakeUp();
+}
+
+bool wxEventLoopBase::ProcessIdle()
+{
+ return wxTheApp && wxTheApp->ProcessIdle();
+}
+
+bool wxEventLoopBase::Yield(bool onlyIfNeeded)
+{
+ if ( m_isInsideYield )
+ {
+ if ( !onlyIfNeeded )
+ {
+ wxFAIL_MSG( wxT("wxYield called recursively" ) );
+ }
+
+ return false;
+ }
+
+ return YieldFor(wxEVT_CATEGORY_ALL);
+}
+