Remove most mentions of wxUSE_UNICODE from the documentation
Still document this symbol itself, but only as being defined as 1.
This commit is contained in:
parent
885ab36c11
commit
c8f29fea8f
9 changed files with 24 additions and 51 deletions
|
|
@ -368,7 +368,8 @@ more details.
|
|||
and so the usual idiom which allows to support both cases is to first include
|
||||
@c wx/wxprec.h} and then, inside <tt>\#ifndef WX_PRECOMP</tt>, individual
|
||||
headers you need.}
|
||||
@itemdef{_UNICODE and UNICODE, both are defined if wxUSE_UNICODE is set to @c 1}
|
||||
@itemdef{_UNICODE and UNICODE, are both always defined in current wxWidgets
|
||||
versions.}
|
||||
@itemdef{wxUSE_GUI,
|
||||
this particular feature test macro is defined to 1
|
||||
when compiling or using the library with the GUI features activated,
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ library:
|
|||
particular is implicitly convertible to @c char* and not std::[w]string).}
|
||||
@itemdef{wxUSE_STD_IOSTREAM, Standard C++ classes are used instead of or in
|
||||
addition to wx stream classes.}
|
||||
@itemdef{wxUSE_UNICODE, Compiled with Unicode support (default in wxWidgets
|
||||
3.0, non-Unicode build is deprecated and will be removed in the future).}
|
||||
@itemdef{wxUSE_UNICODE, Always defined as 1 in wxWidgets 3.3 and later, only
|
||||
exists for compatibility.}
|
||||
@itemdef{wxUSE_UNICODE_WCHAR, wxString uses wchar_t buffer for internal storage
|
||||
(default).}
|
||||
@itemdef{wxUSE_UNICODE_UTF8, wxString uses UTF-8 for internal storage (mostly
|
||||
|
|
|
|||
|
|
@ -402,12 +402,9 @@ difference the change to @c EXTRA_ALLOC makes to your program.
|
|||
|
||||
@section overview_string_settings wxString Related Compilation Settings
|
||||
|
||||
The main option affecting wxString is @c wxUSE_UNICODE which is now always
|
||||
defined as @c 1 by default to indicate Unicode support. You may set it to 0 to
|
||||
disable Unicode support in wxString and elsewhere in wxWidgets but this is @e
|
||||
strongly not recommended.
|
||||
|
||||
Another option affecting wxWidgets is @c wxUSE_UNICODE_WCHAR which is also 1 by
|
||||
wxString always supports Unicode in wxWidgets 3.3 and later, but it may use
|
||||
either UTF-8 or `wchar_t` (which, in turn, may use either UTF-16 or UTF-32)
|
||||
internally. It uses the latter if @c wxUSE_UNICODE_WCHAR is set, which is the case by
|
||||
default. You may want to set it to 0 and set @c wxUSE_UNICODE_UTF8 to 1 instead
|
||||
to use UTF-8 internally. wxString still provides the same API in this case, but
|
||||
using UTF-8 has performance implications as explained in @ref
|
||||
|
|
|
|||
|
|
@ -215,9 +215,7 @@ size and removes the need for conversions in more cases.
|
|||
|
||||
@subsection overview_unicode_settings Unicode Related Preprocessor Symbols
|
||||
|
||||
@c wxUSE_UNICODE is defined as 1 now to indicate Unicode support. It can be
|
||||
explicitly set to 0 in @c setup.h under MSW or you can use @c \--disable-unicode
|
||||
under Unix but doing this is strongly discouraged. By default, @c
|
||||
@c wxUSE_UNICODE is always defined as 1 in wxWidgets 3.3 or later. By default, @c
|
||||
wxUSE_UNICODE_WCHAR is also defined as 1, however in UTF-8 build (described in
|
||||
the previous section), it is set to 0 and @c wxUSE_UNICODE_UTF8, which is
|
||||
usually 0, is set to 1 instead. In the latter case, @c wxUSE_UTF8_LOCALE_ONLY
|
||||
|
|
|
|||
|
|
@ -98,36 +98,29 @@
|
|||
#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).
|
||||
wxChar is a compatibility typedef always defined as @c wchar_t now.
|
||||
|
||||
Note that it is not affected by @c wxUSE_UNICODE_UTF8 option.
|
||||
*/
|
||||
typedef wxUSE_UNICODE_dependent wxChar;
|
||||
typedef wchar_t 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).
|
||||
wxSChar is a compatibility typedef always defined as @c wchar_t now.
|
||||
*/
|
||||
typedef wxUSE_UNICODE_dependent wxSChar;
|
||||
typedef wchar_t 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).
|
||||
wxUChar is a compatibility typedef always defined as @c wchar_t now.
|
||||
*/
|
||||
typedef wxUSE_UNICODE_dependent wxUChar;
|
||||
typedef wchar_t 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>
|
||||
\- @c char when <tt>wxUSE_UNICODE_WCHAR==0</tt>
|
||||
\- @c wchar_t when <tt>wxUSE_UNICODE_WCHAR==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 macOS.
|
||||
(Note that @c wxUSE_UNICODE_UTF8 symbol is defined as the opposite of
|
||||
@c wxUSE_UNICODE_WCHAR.)
|
||||
The @c wxUSE_UNICODE_WCHAR symbol is defined by default, but may be turned
|
||||
off in which case @c wxUSE_UNICODE_UTF8 is turned on.
|
||||
|
||||
Note that wxStringCharType (as the name says) is the type used by wxString
|
||||
for internal storage of the characters.
|
||||
|
|
|
|||
|
|
@ -753,18 +753,16 @@ public:
|
|||
/**
|
||||
Returns 2 under wxMac and wxGTK, where text data coming from the
|
||||
clipboard may be provided as ANSI (@c wxDF_TEXT) or as Unicode text
|
||||
(@c wxDF_UNICODETEXT, but only when @c wxUSE_UNICODE==1).
|
||||
(@c wxDF_UNICODETEXT).
|
||||
|
||||
Returns 1 under other platforms (e.g. wxMSW) or when building in ANSI mode
|
||||
(@c wxUSE_UNICODE==0).
|
||||
Returns 1 under other platforms (e.g. wxMSW).
|
||||
*/
|
||||
virtual size_t GetFormatCount(wxDataObject::Direction dir = wxDataObject::Get) const;
|
||||
|
||||
/**
|
||||
Returns the preferred format supported by this object.
|
||||
|
||||
This is @c wxDF_TEXT or @c wxDF_UNICODETEXT depending on the platform
|
||||
and from the build mode (i.e. from @c wxUSE_UNICODE).
|
||||
This is @c wxDF_TEXT or @c wxDF_UNICODETEXT depending on the platform.
|
||||
*/
|
||||
const wxDataFormat& GetFormat() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -1632,9 +1632,6 @@ public:
|
|||
If the key pressed doesn't have any character value (e.g. a cursor key)
|
||||
this method will return @c WXK_NONE. In this case you should use
|
||||
GetKeyCode() to retrieve the value of the key.
|
||||
|
||||
This function is only available in Unicode build, i.e. when
|
||||
@c wxUSE_UNICODE is 1.
|
||||
*/
|
||||
wxChar GetUnicodeKey() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -231,18 +231,10 @@ public:
|
|||
*/
|
||||
wxWCharBuffer cMB2WC(const wxCharBuffer& buf) const;
|
||||
|
||||
///@{
|
||||
/**
|
||||
Converts from multibyte encoding to the current wxChar type (which
|
||||
depends on whether wxUSE_UNICODE is set to 1).
|
||||
|
||||
If wxChar is char, it returns the parameter unaltered. If wxChar is
|
||||
wchar_t, it returns the result in a wxWCharBuffer. The macro wxMB2WXbuf
|
||||
is defined as the correct return type (without const).
|
||||
Converts from multibyte encoding to `wchar_t`.
|
||||
*/
|
||||
const char* cMB2WX(const char* psz) const;
|
||||
wxWCharBuffer cMB2WX(const char* psz) const;
|
||||
///@}
|
||||
|
||||
/**
|
||||
Converts from Unicode to multibyte encoding by calling FromWChar() and
|
||||
|
|
|
|||
|
|
@ -55,9 +55,6 @@ enum wxXmlNodeType
|
|||
The @c wxXML_DOCUMENT_TYPE_NODE is not implemented at this time. Instead,
|
||||
you should get and set the DOCTYPE values using the wxXmlDocument class.
|
||||
|
||||
If @c wxUSE_UNICODE is 0, all strings are encoded in the encoding given to
|
||||
wxXmlDocument::Load (default is UTF-8).
|
||||
|
||||
@note
|
||||
Once a wxXmlNode has been added to a wxXmlDocument it becomes owned by the
|
||||
document and this has two implications. Firstly, the wxXmlDocument takes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue