X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..184abb52a8ae838ef8586ce45a550b4e8ef96e54:/interface/wx/chartype.h diff --git a/interface/wx/chartype.h b/interface/wx/chartype.h index ff550ef8be..f674710020 100644 --- a/interface/wx/chartype.h +++ b/interface/wx/chartype.h @@ -3,7 +3,7 @@ // Purpose: interface of global functions // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @addtogroup group_funcmacro_string */ @@ -33,9 +33,38 @@ #define wxT(string) /** - 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 + Compatibility macro which expands to wxT() in wxWidgets 2 only. + + This macro can be used in code which needs to compile with both + wxWidgets 2 and 3 versions, in places where the wx2 API requires a Unicode string + (in Unicode build) but the wx3 API only accepts a standard narrow + string, as in e.g. wxCmdLineEntryDesc structure objects initializers. + + Example of use: + @code + const wxCmdLineEntryDesc cmdLineDesc[] = + { + { wxCMD_LINE_SWITCH, wxT_2("q"), wxT_2("quiet"), + wxT_2("Don't output verbose messages") }, + wxCMD_LINE_DESC_END + }; + @endcode + + Without @c wxT_2 the code above wouldn't compile with wxWidgets 2, but using @c + wxT instead, it wouldn't compile with wxWidgets 3. + + @see wxT() + + @since 2.8.12, 2.9.2 + + @header{wx/chartype.h} + */ +#define wxT_2(string) + +/** + wxS is a macro which can be used with character and string literals (in other words, + @c 'x' or @c "foo") to convert them either to wide characters or wide strings + in @c wchar_t-based (UTF-16) builds, or to keep them unchanged in @c char-based (UTF-8) builds. Basically this macro produces characters or strings of type wxStringCharType.