Preparing wxString for UTF-8 representation:
1) split into wxStringImpl class that has std::string-like API and operates on char* or wchar_t* data and wxString class that provides Unicode iterators and indexes 2) added both char* and wchar_t* versions of many wxString methods to avoid having to use _T() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -183,6 +183,31 @@
|
||||
#endif /* __WCHAR_TYPE__ */
|
||||
#endif /* ASCII/Unicode */
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* define wxStringCharType */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* depending on the platform, Unicode build can either store wxStrings as
|
||||
wchar_t* or UTF-8 encoded char*: */
|
||||
#if wxUSE_UNICODE
|
||||
/* for now, all Unicode builds are wchar_t* based: */
|
||||
#define wxUSE_UNICODE_WCHAR 1
|
||||
#define wxUSE_UNICODE_UTF8 0
|
||||
#else
|
||||
#define wxUSE_UNICODE_WCHAR 0
|
||||
#define wxUSE_UNICODE_UTF8 0
|
||||
#endif
|
||||
|
||||
/* define char type used by wxString internal representation: */
|
||||
#if wxUSE_UNICODE_UTF8
|
||||
typedef char wxStringCharType;
|
||||
#elif wxUSE_UNICODE_WCHAR
|
||||
typedef wchar_t wxStringCharType;
|
||||
#else
|
||||
typedef char wxStringCharType;
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* define _T() and related macros */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user