Added wxSafeYield(wxWindow *win=NULL).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -748,6 +748,27 @@ whereami(name)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Yield to other apps/messages and disable user input
|
||||
bool wxSafeYield(wxWindow *win)
|
||||
{
|
||||
wxNode *node;
|
||||
for ( node = wxTopLevelWindows.GetFirst();
|
||||
node;
|
||||
node = node->GetNext() )
|
||||
((wxWindow*)node->GetData())->Enable(FALSE);
|
||||
|
||||
// always enable ourselves
|
||||
if(win) win->Enable(true);
|
||||
bool rc = wxYield();
|
||||
|
||||
for ( node = wxTopLevelWindows.GetFirst();
|
||||
node;
|
||||
node = node->GetNext() )
|
||||
((wxWindow*)node->GetData())->Enable(TRUE);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* N.B. these convenience functions must be separate from msgdlgg.cpp, textdlgg.cpp
|
||||
* since otherwise the generic code may be pulled in unnecessarily.
|
||||
|
Reference in New Issue
Block a user