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:
@@ -2073,7 +2073,7 @@ extern WXDLLIMPEXP_CORE wxPoint wxGetMousePosition();
|
|||||||
extern WXDLLIMPEXP_CORE wxWindow *wxGetActiveWindow();
|
extern WXDLLIMPEXP_CORE wxWindow *wxGetActiveWindow();
|
||||||
|
|
||||||
// get the (first) top level parent window
|
// get the (first) top level parent window
|
||||||
WXDLLIMPEXP_CORE wxWindow* wxGetTopLevelParent(wxWindow *win);
|
WXDLLIMPEXP_CORE wxWindow* wxGetTopLevelParent(wxWindowBase *win);
|
||||||
|
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if wxUSE_ACCESSIBILITY
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -3655,8 +3655,9 @@ void wxWindowBase::DragAcceptFiles(bool accept)
|
|||||||
// global functions
|
// global functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxWindow* wxGetTopLevelParent(wxWindow *win)
|
wxWindow* wxGetTopLevelParent(wxWindowBase *win_)
|
||||||
{
|
{
|
||||||
|
wxWindow* win = static_cast<wxWindow *>(win_);
|
||||||
while ( win && !win->IsTopLevel() )
|
while ( win && !win->IsTopLevel() )
|
||||||
win = win->GetParent();
|
win = win->GetParent();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user