Change wxGetTopLevelParent() to take wxWindowBase
This makes it more convenient to use when building wxUniv, when wxWindow$TOOLKIT objects are wxWindowBase but not actually wxWindow. No real changes.
This commit is contained in:
parent
482426f4fc
commit
a4906f1222
@ -2073,7 +2073,7 @@ extern WXDLLIMPEXP_CORE wxPoint wxGetMousePosition();
|
||||
extern WXDLLIMPEXP_CORE wxWindow *wxGetActiveWindow();
|
||||
|
||||
// get the (first) top level parent window
|
||||
WXDLLIMPEXP_CORE wxWindow* wxGetTopLevelParent(wxWindow *win);
|
||||
WXDLLIMPEXP_CORE wxWindow* wxGetTopLevelParent(wxWindowBase *win);
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -3655,8 +3655,9 @@ void wxWindowBase::DragAcceptFiles(bool accept)
|
||||
// global functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxWindow* wxGetTopLevelParent(wxWindow *win)
|
||||
wxWindow* wxGetTopLevelParent(wxWindowBase *win_)
|
||||
{
|
||||
wxWindow* win = static_cast<wxWindow *>(win_);
|
||||
while ( win && !win->IsTopLevel() )
|
||||
win = win->GetParent();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user