X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86381d4297f0225448823369a0df73ba67664078..1ec4e9c2b72a01a7ba7da569e0f8d04a81aaba10:/interface/wx/app.h?ds=sidebyside diff --git a/interface/wx/app.h b/interface/wx/app.h index 76b0d53845..72f31f4319 100644 --- a/interface/wx/app.h +++ b/interface/wx/app.h @@ -37,7 +37,8 @@ @see @ref overview_app, wxApp, wxAppTraits, wxEventLoopBase */ -class wxAppConsole : public wxEvtHandler +class wxAppConsole : public wxEvtHandler, + public wxEventFilter { protected: /** @@ -81,13 +82,14 @@ public: virtual void ExitMainLoop(); /** + Overridden wxEventFilter method. + This function is called before processing any event and allows the application - to preempt the processing of some events. + to preempt the processing of some events, see wxEventFilter + documentation for more information. - If this method returns -1 the event is processed normally, otherwise either - @true or @false should be returned and the event processing stops immediately - considering that the event had been already processed (for the former return - value) or that it is not going to be processed at all (for the latter one). + wxApp implementation of this method always return -1 indicating that + the event should be processed normally. */ virtual int FilterEvent(wxEvent& event); @@ -221,6 +223,8 @@ public: //@} + bool Yield(bool onlyIfNeeded = false); + /** Allows external code to modify global ::wxTheApp, but you should really know what you're doing if you call it. @@ -250,7 +254,6 @@ public: */ static bool IsMainLoopRunning(); - /** @name Callbacks for application-wide "events" */ @@ -558,6 +561,33 @@ public: //@} + /** + 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. + + Calling this function is roughly equivalent to calling + @code + setlocale(LC_ALL, ""); + @endcode + but performs additional toolkit-specific tasks under some platforms and + so should be used instead of @c setlocale() itself. Alternatively, you + can use wxLocale to change the locale with more control. + + Notice that this does @em not change the global C++ locale, you need to + do it explicitly if you want, e.g. + @code + std::locale::global(std::locale("")); + @endcode + but be warned that locale support in C++ standard library can be poor + or worse under some platforms, e.g. the above line results in an + immediate crash under OS X up to the version 10.8.2. + + @since 2.9.5 + */ + void SetCLocale(); /** Number of command line arguments (after environment-specific processing). @@ -632,7 +662,7 @@ public: /** Get display mode that is used use. This is only used in framebuffer - wxWidgets ports (such as wxMGL or wxDFB). + wxWidgets ports such as wxDFB. */ virtual wxVideoMode GetDisplayMode() const; @@ -724,7 +754,7 @@ public: /** Set display mode to use. This is only used in framebuffer wxWidgets - ports (such as wxMGL or wxDFB). + ports such as wxDFB. */ virtual bool SetDisplayMode(const wxVideoMode& info); @@ -851,17 +881,6 @@ public: */ virtual void MacReopenApp(); - - static long GetMacAboutMenuItemId(); - static long GetMacPreferencesMenuItemId(); - static long GetMacExitMenuItemId(); - static wxString GetMacHelpMenuTitleName(); - - static void SetMacAboutMenuItemId(long val); - static void SetMacPreferencesMenuItemId(long val); - static void SetMacExitMenuItemId(long val); - static void SetMacHelpMenuTitleName(const wxString& val); - //@} };