Extract wxLOCALE_XXX constants into their own header
No real changes, just make it possible to use these constants without including the entire wx/intl.h. Note that the existing headers including wx/intl.h need to keep including it, unfortunately, as not doing it any longer would break compilation of any code including them which relies on _() or wxGetTranslation() being defined after including e.g. wx/dc.h. This was, of course, never guaranteed, but in practice it worked for a very long time, so don't break it now. This commit is best viewed with --color-moved git option.
This commit is contained in:
@@ -13,19 +13,10 @@
|
||||
#define _WX_INTL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/localedefs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/translation.h"
|
||||
|
||||
// Make wxLayoutDirection enum available without need for wxUSE_INTL so wxWindow, wxApp
|
||||
// and other classes are not distrubed by wxUSE_INTL
|
||||
|
||||
enum wxLayoutDirection
|
||||
{
|
||||
wxLayout_Default,
|
||||
wxLayout_LeftToRight,
|
||||
wxLayout_RightToLeft
|
||||
};
|
||||
|
||||
#if wxUSE_INTL
|
||||
|
||||
#include "wx/fontenc.h"
|
||||
@@ -84,52 +75,6 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo
|
||||
const char* TrySetLocale() const;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxLocaleCategory: the category of locale settings
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
enum wxLocaleCategory
|
||||
{
|
||||
// (any) numbers
|
||||
wxLOCALE_CAT_NUMBER,
|
||||
|
||||
// date/time
|
||||
wxLOCALE_CAT_DATE,
|
||||
|
||||
// monetary value
|
||||
wxLOCALE_CAT_MONEY,
|
||||
|
||||
// default category for wxLocaleInfo values which only apply to a single
|
||||
// category (e.g. wxLOCALE_SHORT_DATE_FMT)
|
||||
wxLOCALE_CAT_DEFAULT,
|
||||
|
||||
wxLOCALE_CAT_MAX
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxLocaleInfo: the items understood by wxLocale::GetInfo()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
enum wxLocaleInfo
|
||||
{
|
||||
// the thousands separator (for wxLOCALE_CAT_NUMBER or MONEY)
|
||||
wxLOCALE_THOUSANDS_SEP,
|
||||
|
||||
// the character used as decimal point (for wxLOCALE_CAT_NUMBER or MONEY)
|
||||
wxLOCALE_DECIMAL_POINT,
|
||||
|
||||
// the stftime()-formats used for short/long date and time representations
|
||||
// (under some platforms short and long date formats are the same)
|
||||
//
|
||||
// NB: these elements should appear in this order, code in GetInfo() relies
|
||||
// on it
|
||||
wxLOCALE_SHORT_DATE_FMT,
|
||||
wxLOCALE_LONG_DATE_FMT,
|
||||
wxLOCALE_DATE_TIME_FMT,
|
||||
wxLOCALE_TIME_FMT
|
||||
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxLocale: encapsulates all language dependent settings, including current
|
||||
// message catalogs, date, time and currency formats (TODO) &c
|
||||
|
Reference in New Issue
Block a user