Add wxApp::GetMainTopWindow() wrapper
This trivial function just allows to avoid checking if wxTheApp is not null before calling GetTopWindow() on it. Replace the existing "wxTheApp && wxTheApp->GetTopWindow()" calls with wxApp::GetMainTopWindow(). No real changes.
This commit is contained in:
@@ -189,6 +189,14 @@ wxWindow* wxAppBase::GetTopWindow() const
|
||||
return window;
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxWindow* wxAppBase::GetMainTopWindow()
|
||||
{
|
||||
const wxAppBase* const app = static_cast<wxAppBase*>(GetInstance());
|
||||
|
||||
return app ? app->GetTopWindow() : NULL;
|
||||
}
|
||||
|
||||
wxVideoMode wxAppBase::GetDisplayMode() const
|
||||
{
|
||||
return wxVideoMode();
|
||||
|
||||
Reference in New Issue
Block a user