]>
Commit | Line | Data |
---|---|---|
23324ae1 | 1 | ///////////////////////////////////////////////////////////////////////////// |
7c913512 FM |
2 | // Name: chartype.h |
3 | // Purpose: documentation for global functions | |
4 | // Author: wxWidgets team | |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | //@{ | |
23324ae1 FM |
10 | /** |
11 | wxT() is a macro which can be used with character and string literals (in other | |
12 | words, @c 'x' or @c "foo") to automatically convert them to Unicode in | |
13 | Unicode build configuration. Please see the | |
14 | @ref overview_unicode "Unicode overview" for more information. | |
7c913512 | 15 | |
23324ae1 FM |
16 | This macro is simply returns the value passed to it without changes in ASCII |
17 | build. In fact, its definition is: | |
7c913512 | 18 | |
23324ae1 FM |
19 | @code |
20 | #ifdef UNICODE | |
21 | #define wxT(x) L ## x | |
22 | #else // !Unicode | |
23 | #define wxT(x) x | |
24 | #endif | |
25 | @endcode | |
26 | */ | |
27 | wxChar wxT(char ch); | |
7c913512 | 28 | const wxChar * wxT(const char * s); |
23324ae1 FM |
29 | //@} |
30 | ||
31 | ||
7c913512 | 32 | //@{ |
23324ae1 FM |
33 | /** |
34 | wxS is macro which can be used with character and string literals to either | |
35 | convert them to wide characters or strings in @c wchar_t-based Unicode | |
36 | builds or keep them unchanged in UTF-8 builds. The use of this macro is | |
37 | optional as the translation will always be done at run-time even if there is a | |
38 | mismatch between the kind of the literal used and wxStringCharType used in the | |
39 | current build, but using it can be beneficial in performance-sensitive code to | |
40 | do the conversion at compile-time instead. | |
7c913512 | 41 | |
23324ae1 FM |
42 | @sa wxT |
43 | */ | |
44 | wxStringCharType wxS(char ch); | |
7c913512 | 45 | const wxStringCharType * wxS(const char * s); |
23324ae1 FM |
46 | //@} |
47 |