X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bfa78c63b9045c2a594ca6f04dc26a70c21f5f42..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/app.h diff --git a/include/wx/app.h b/include/wx/app.h index fbd85a7839..7d180bd248 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -5,7 +5,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -103,6 +102,9 @@ public: // be done here. When OnRun() returns, the programs starts shutting down. virtual int OnRun(); + // Called before the first events are handled, called from within MainLoop() + virtual void OnLaunched(); + // This is called by wxEventLoopBase::SetActive(): you should put the code // which needs an active event loop here. // Note that this function is called whenever an event loop is activated; @@ -228,6 +230,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). @@ -236,6 +246,18 @@ public: wxEventLoopBase* GetMainLoop() const { return m_mainLoop; } + // This function sets the C locale to the default locale for the current + // environment. It is advised to call this to ensure that the underlying + // toolkit uses the locale in which the numbers and monetary amounts are + // shown in the format expected by user and so on. + // + // Notice that this does _not_ change the global C++ locale, you need to do + // it explicitly if you want. + // + // Finally, notice that while this function is virtual, it is not supposed + // to be overridden outside of the library itself. + virtual void SetCLocale(); + // event processing functions // --------------------------