added wxGetTopLevelParent()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-04-20 13:51:28 +00:00
parent 6703082ef0
commit 33b494d643
3 changed files with 27 additions and 2 deletions

View File

@@ -1795,4 +1795,15 @@ void wxWindowBase::ReleaseMouse()
GetCapture());
}
// vi:sts=4:sw=4:et
// ----------------------------------------------------------------------------
// global functions
// ----------------------------------------------------------------------------
wxWindow* wxGetTopLevelParent(wxWindow *win)
{
while ( win && !win->IsTopLevel() )
win = win->GetParent();
return win;
}