wxTopLevelWindows is now a wxWindowList, better compatibility with the old

wxList in list.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-03-30 09:43:29 +00:00
parent 8ffd43c56b
commit e146b8c8bf
22 changed files with 206 additions and 185 deletions

View File

@@ -211,9 +211,8 @@ int wxEntry( int argc, char *argv[] )
// GUI-specific initialization, such as creating an app context.
wxTheApp->OnInitGui();
// Here frames insert themselves automatically
// into wxTopLevelWindows by getting created
// in OnInit().
// Here frames insert themselves automatically into wxTopLevelWindows by
// getting created in OnInit().
int retValue = 0;
if (wxTheApp->OnInit())
@@ -438,15 +437,16 @@ void wxApp::OnIdle(wxIdleEvent& event)
bool wxApp::SendIdleEvents()
{
bool needMore = FALSE;
wxNode* node = wxTopLevelWindows.First();
wxWindowList::Node* node = wxTopLevelWindows.GetFirst();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();
wxWindow* win = node->GetData();
if (SendIdleEvents(win))
needMore = TRUE;
node = node->Next();
node = node->GetNext();
}
return needMore;
}
@@ -519,8 +519,8 @@ wxWindow* wxApp::GetTopWindow() const
{
if (m_topWindow)
return m_topWindow;
else if (wxTopLevelWindows.Number() > 0)
return (wxWindow*) wxTopLevelWindows.First()->Data();
else if (wxTopLevelWindows.GetCount() > 0)
return wxTopLevelWindows.GetFirst()->GetData();
else
return NULL;
}