]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Use wxWindowID in wxNewId() and related functions.
[wxWidgets.git] / src / common / appbase.cpp
index 5014ca25df9476022133b90cf18b1d36a42b9a97..b8cba4ff887f7ab68e7d6f91e32332d84ca4cbb6 100644 (file)
@@ -304,6 +304,15 @@ wxAppTraits *wxAppConsoleBase::GetTraitsIfExists()
     return app ? app->GetTraits() : NULL;
 }
 
+/* static */
+wxAppTraits& wxAppConsoleBase::GetValidTraits()
+{
+    static wxConsoleAppTraits s_traitsConsole;
+    wxAppTraits* const traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
+
+    return traits ? *traits : s_traitsConsole;
+}
+
 // ----------------------------------------------------------------------------
 // wxEventLoop redirection
 // ----------------------------------------------------------------------------