-// Send idle event to all top-level windows
-bool wxApp::SendIdleEvents()
-{
- bool bNeedMore = FALSE;
- wxWindowList::Node* pNode = wxTopLevelWindows.GetFirst();
-
- while (pNode)
- {
- wxWindow* pWin = pNode->GetData();
-
- if (SendIdleEvents(pWin))
- bNeedMore = TRUE;
- pNode = pNode->GetNext();
- }
- return bNeedMore;
-} // end of wxApp::SendIdleEvents
-
-//
-// Send idle event to window and all subwindows
-//
-bool wxApp::SendIdleEvents(
- wxWindow* pWin
-)
-{
- bool bNeedMore = FALSE;
- wxIdleEvent vEvent;
-
- vEvent.SetEventObject(pWin);
- pWin->GetEventHandler()->ProcessEvent(vEvent);
-
- if (vEvent.MoreRequested())
- bNeedMore = TRUE;
-
- wxNode* pNode = pWin->GetChildren().First();
-
- while (pNode)
- {
- wxWindow* pWin = (wxWindow*) pNode->Data();
-
- if (SendIdleEvents(pWin))
- bNeedMore = TRUE;
- pNode = pNode->Next();
- }
- return bNeedMore;
-} // end of wxApp::SendIdleEvents
-