X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b51014176a539bf0c0e5058910c5a7fcc7a7d0a5..14619f10b0bdb630206607abd0ce0319d45e095a:/include/wx/app.h diff --git a/include/wx/app.h b/include/wx/app.h index a0fe4afee1..b2d11cce40 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -228,6 +228,14 @@ public: // for it static wxAppTraits *GetTraitsIfExists(); + // Return some valid traits object. + // + // This method checks if we have wxTheApp and returns its traits if it does + // exist and the traits are non-NULL, similarly to GetTraitsIfExists(), but + // falls back to wxConsoleAppTraits to ensure that it always returns + // something valid. + static wxAppTraits& GetValidTraits(); + // returns the main event loop instance, i.e. the event loop which is started // by OnRun() and which dispatches all events sent from the native toolkit // to the application (except when new event loops are temporarily set-up).