second part of #10320: move wxApp event handling functions to wxEventLoopBase (in particular move Yield() functions); add backward compatible redirections to wxApp; update docs; remove global lists wxPendingEvents and wxPendingEventsLocker
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "wx/msgout.h"
|
||||
#include "wx/thread.h"
|
||||
#include "wx/vidmode.h"
|
||||
#include "wx/evtloop.h"
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
#if wxUSE_STACKWALKER
|
||||
@@ -78,9 +79,6 @@ wxAppBase::wxAppBase()
|
||||
|
||||
m_isActive = true;
|
||||
|
||||
m_isInsideYield = false;
|
||||
m_eventsToProcessInsideYield = wxEVT_CATEGORY_ALL;
|
||||
|
||||
// We don't want to exit the app if the user code shows a dialog from its
|
||||
// OnInit() -- but this is what would happen if we set m_exitOnFrameDelete
|
||||
// to Yes initially as this dialog would be the last top level window.
|
||||
@@ -326,23 +324,22 @@ void wxAppBase::SetActive(bool active, wxWindow * WXUNUSED(lastFocus))
|
||||
(void)ProcessEvent(event);
|
||||
}
|
||||
|
||||
bool wxAppBase::IsEventAllowedInsideYield(wxEventCategory cat) const
|
||||
{
|
||||
return (m_eventsToProcessInsideYield & cat) != 0;
|
||||
}
|
||||
|
||||
bool wxAppBase::SafeYield(wxWindow *win, bool onlyIfNeeded)
|
||||
{
|
||||
wxWindowDisabler wd(win);
|
||||
|
||||
return Yield(onlyIfNeeded);
|
||||
wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
|
||||
|
||||
return loop && loop->Yield(onlyIfNeeded);
|
||||
}
|
||||
|
||||
bool wxAppBase::SafeYieldFor(wxWindow *win, long eventsToProcess)
|
||||
{
|
||||
wxWindowDisabler wd(win);
|
||||
|
||||
return YieldFor(eventsToProcess);
|
||||
wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
|
||||
|
||||
return loop && loop->YieldFor(eventsToProcess);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user