From fc79419b659a5e09249c32c47db90ebb8d18858a Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Thu, 19 Mar 2009 15:08:49 +0000 Subject: [PATCH] document wxLocale::GetInfo git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/intl.h | 49 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/interface/wx/intl.h b/interface/wx/intl.h index 6940db7779..5d7e9a5a1c 100644 --- a/interface/wx/intl.h +++ b/interface/wx/intl.h @@ -275,12 +275,14 @@ enum wxLayoutDirection }; /** - Encapsulates ::wxLanguage in a OS native lang.desc. - translation information + Encapsulates a ::wxLanguage indentifier together with OS-specific information + related to that language. */ struct WXDLLIMPEXP_BASE wxLanguageInfo { - /// ::wxLanguage id. It should be greater than @c wxLANGUAGE_USER_DEFINED. + /// ::wxLanguage id. + /// It should be greater than @c wxLANGUAGE_USER_DEFINED when defining your own + /// language info structure. int Language; /// Canonical name of the language, e.g. @c fr_FR. @@ -311,6 +313,36 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo }; +/** + The category of locale settings. See wxLocale::GetInfo(). +*/ +enum wxLocaleCategory +{ + /// (any) numbers + wxLOCALE_CAT_NUMBER, + + /// date/time + wxLOCALE_CAT_DATE, + + /// monetary value + wxLOCALE_CAT_MONEY, + + wxLOCALE_CAT_MAX +}; + +/** + The values understood by wxLocale::GetInfo(). +*/ +enum wxLocaleInfo +{ + /// The thounsands separator + wxLOCALE_THOUSANDS_SEP, + + /// The character used as decimal point + wxLOCALE_DECIMAL_POINT +}; + + /** @class wxLocale @@ -617,11 +649,20 @@ public: /** Tries to detect the user's default language setting. - Returns the ::wxLanguage value or @b wxLANGUAGE_UNKNOWN if the language-guessing + + Returns the ::wxLanguage value or @c wxLANGUAGE_UNKNOWN if the language-guessing algorithm failed. */ static int GetSystemLanguage(); + /** + Get the values of the given locale-dependent datum. + + The current locale is used, the US default value is returned if everything + else fails. + */ + static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat); + /** Initializes the wxLocale instance. -- 2.45.2