document wx[US]Char and wxStringCharType typedefs; in docs for wxS() specify better that it makes wide strings under UTF16 builds and narrow strings under UTF8 builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
|
||||
/**
|
||||
This macro can be used with character and string literals (in other words,
|
||||
@c 'x' or @c "foo") to automatically convert them to Unicode in Unicode
|
||||
builds of wxWidgets. This macro is simply returns the value passed to it
|
||||
@c 'x' or @c "foo") to automatically convert them to wide strings in Unicode
|
||||
builds of wxWidgets. This macro simply returns the value passed to it
|
||||
without changes in ASCII build. In fact, its definition is:
|
||||
|
||||
@code
|
||||
@@ -23,22 +23,25 @@
|
||||
#endif
|
||||
@endcode
|
||||
|
||||
@see @ref overview_unicode
|
||||
@see @ref overview_unicode, wxS()
|
||||
|
||||
@header{wx/chartype.h}
|
||||
*/
|
||||
#define wxT(string)
|
||||
|
||||
/**
|
||||
wxS is macro which can be used with character and string literals to either
|
||||
convert them to wide characters or strings in @c wchar_t-based Unicode
|
||||
builds or keep them unchanged in UTF-8 builds. The use of this macro is
|
||||
optional as the translation will always be done at run-time even if there
|
||||
is a mismatch between the kind of the literal used and string or character
|
||||
type used in the current build, but using it can be beneficial in
|
||||
performance-sensitive code to do the conversion at compile-time instead.
|
||||
wxS is macro which can be used with character and string literals (in other words,
|
||||
@c 'x' or @c "foo") to either convert them to wide characters or wide strings
|
||||
in @c wchar_t-based (UTF-16) builds or keep them unchanged in @c char-based
|
||||
(UTF-8) builds.
|
||||
|
||||
@see wxT()
|
||||
The use of this macro is optional as the translation will always be done at
|
||||
run-time even if there is a mismatch between the kind of the literal used
|
||||
and the string or character type used in the current build.
|
||||
However using it can be beneficial in <b>performance-sensitive code</b> to
|
||||
do the conversion at compile-time instead.
|
||||
|
||||
@see @ref overview_unicode, wxT()
|
||||
|
||||
@header{wx/chartype.h}
|
||||
*/
|
||||
@@ -56,4 +59,39 @@
|
||||
*/
|
||||
#define _T(string)
|
||||
|
||||
/**
|
||||
wxChar is defined to be
|
||||
- @c char when <tt>wxUSE_UNICODE==0</tt>
|
||||
- @c wchar_t when <tt>wxUSE_UNICODE==1</tt> (the default).
|
||||
*/
|
||||
typedef wxUSE_UNICODE_dependent wxChar;
|
||||
|
||||
/**
|
||||
wxSChar is defined to be
|
||||
- <tt>signed char</tt> when <tt>wxUSE_UNICODE==0</tt>
|
||||
- @c wchar_t when <tt>wxUSE_UNICODE==1</tt> (the default).
|
||||
*/
|
||||
typedef wxUSE_UNICODE_dependent wxSChar;
|
||||
|
||||
/**
|
||||
wxUChar is defined to be
|
||||
- <tt>unsigned char</tt> when <tt>wxUSE_UNICODE==0</tt>
|
||||
- @c wchar_t when <tt>wxUSE_UNICODE==1</tt> (the default).
|
||||
*/
|
||||
typedef wxUSE_UNICODE_dependent wxUChar;
|
||||
|
||||
/**
|
||||
wxStringCharType is defined to be:
|
||||
- @c char when <tt>wxUSE_UNICODE==0</tt>
|
||||
- @c char when <tt>wxUSE_UNICODE_WCHAR==0</tt> and <tt>wxUSE_UNICODE==1</tt>
|
||||
- @c wchar_t when <tt>wxUSE_UNICODE_WCHAR==1</tt> and <tt>wxUSE_UNICODE==1</tt>
|
||||
|
||||
The @c wxUSE_UNICODE_WCHAR symbol is defined to @c 1 when building on
|
||||
Windows while it's defined to @c 0 when building on Unix, Linux or OS X.
|
||||
|
||||
Note that wxStringCharType is the type used by wxString for internal storage
|
||||
of the characters.
|
||||
*/
|
||||
typedef wxUSE_UNICODE_WCHAR_dependent wxStringCharType;
|
||||
|
||||
//@}
|
||||
|
Reference in New Issue
Block a user