-wxFindWindowByName (const wxString& title, wxWindow * parent)
-{
- if (parent)
- {
- return wxFindWindowByName1 (title, parent);
- }
- else
- {
- for ( wxWindowList::Node * node = wxTopLevelWindows.GetFirst();
- node;
- node = node->GetNext() )
- {
- wxWindow *win = node->GetData();
- wxWindow *retwin = wxFindWindowByName1 (title, win);
- if (retwin)
- return retwin;
- }
-
- }
-
- // Failed? Try by label instead.
- return wxFindWindowByLabel(title, parent);
-}
-
-// Recursive
-static wxWindow *
-wxFindWindowByName1 (const wxString& title, wxWindow * parent)