From 845f42688569134c06d48225c1b3e617547c0c00 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Mon, 22 Sep 2003 20:34:03 +0000
Subject: [PATCH] updated wxMBConv docs slightly; added brief docs for UTF16/32
 conversions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/classes.tex  |  1 +
 docs/latex/wx/mbcnvut7.tex |  3 +-
 docs/latex/wx/mbcnvutf.tex | 81 ++++++++++++++++++++++++++++++++++++++
 docs/latex/wx/tmbconv.tex  | 29 +++++++-------
 4 files changed, 98 insertions(+), 16 deletions(-)
 create mode 100644 docs/latex/wx/mbcnvutf.tex

diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex
index 384f0d9e31..959a7de195 100644
--- a/docs/latex/wx/classes.tex
+++ b/docs/latex/wx/classes.tex
@@ -189,6 +189,7 @@
 \input mbcnvfil.tex
 \input mbcnvut7.tex
 \input mbcnvut8.tex
+\input mbcnvutf.tex
 \input mdi.tex
 \input memorydc.tex
 \input fs_mem.tex
diff --git a/docs/latex/wx/mbcnvut7.tex b/docs/latex/wx/mbcnvut7.tex
index 05185f17a9..34f51cb817 100644
--- a/docs/latex/wx/mbcnvut7.tex
+++ b/docs/latex/wx/mbcnvut7.tex
@@ -7,7 +7,8 @@
 
 This class converts between the UTF-7 encoding and Unicode.
 It has one predefined instance, {\bf wxConvUTF7}.
-Unfortunately, this class is not quite implemented yet.
+
+{\bf WARNING:} this class is not implemented yet.
 
 \wxheading{Derived from}
 
diff --git a/docs/latex/wx/mbcnvutf.tex b/docs/latex/wx/mbcnvutf.tex
new file mode 100644
index 0000000000..9bcab5f56a
--- /dev/null
+++ b/docs/latex/wx/mbcnvutf.tex
@@ -0,0 +1,81 @@
+\section{\class{wxMBConvUTF16}}\label{wxmbconvutf16}
+
+This class is used to convert between multibyte encodings and UTF-16 Unicode
+encoding (also known as UCS-2). Unlike \helpref{UTF-8}{wxmbconvutf8} encoding,
+UTF-16 uses words and not bytes and hence depends on the byte ordering:
+big or little endian. Hence this class is provided in two versions:
+wxMBConvUTF16LE and wxMBConvUTF16BE and wxMBConvUTF16 itself is just a typedef
+for one of them (native for the given platform, e.g. LE under Windows and BE
+under Mac).
+
+\wxheading{Derived from}
+
+\helpref{wxMBConv}{wxmbconv}
+
+\wxheading{Include files}
+
+<wx/strconv.h>
+
+\wxheading{See also}
+
+\helpref{wxMBConvUTF8}{wxmbconvutf8}, 
+\helpref{wxMBConvUTF32}{wxmbconvutf32}, 
+\helpref{wxMBConv classes overview}{mbconvclasses}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxMBConvUTF16::MB2WC}\label{wxmbconvutf16mb2wc}
+
+\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}}
+
+Converts from UTF-16 encoding to Unicode. Returns the size of the destination
+buffer.
+
+\membersection{wxMBConvUTF16::WC2MB}\label{wxmbconvutf16wc2mb}
+
+\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}}
+
+Converts from Unicode to UTF-16 encoding. Returns the size of the destination
+buffer.
+
+
+\section{\class{wxMBConvUTF32}}\label{wxmbconvutf32}
+
+This class is used to convert between multibyte encodings and UTF-32 Unicode
+encoding (also known as UCS-4). Unlike \helpref{UTF-8}{wxmbconvutf8} encoding,
+UTF-32 uses (double) words and not bytes and hence depends on the byte ordering:
+big or little endian. Hence this class is provided in two versions:
+wxMBConvUTF32LE and wxMBConvUTF32BE and wxMBConvUTF32 itself is just a typedef
+for one of them (native for the given platform, e.g. LE under Windows and BE
+under Mac).
+
+\wxheading{Derived from}
+
+\helpref{wxMBConv}{wxmbconv}
+
+\wxheading{Include files}
+
+<wx/strconv.h>
+
+\wxheading{See also}
+
+\helpref{wxMBConvUTF8}{wxmbconvutf8}, 
+\helpref{wxMBConvUTF16}{wxmbconvutf16}, 
+\helpref{wxMBConv classes overview}{mbconvclasses}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxMBConvUTF32::MB2WC}\label{wxmbconvutf32mb2wc}
+
+\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}}
+
+Converts from UTF-32 encoding to Unicode. Returns the size of the destination
+buffer.
+
+\membersection{wxMBConvUTF32::WC2MB}\label{wxmbconvutf32wc2mb}
+
+\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}}
+
+Converts from Unicode to UTF-32 encoding. Returns the size of the destination
+buffer.
+
diff --git a/docs/latex/wx/tmbconv.tex b/docs/latex/wx/tmbconv.tex
index b7f5a95568..7a4213f9f5 100644
--- a/docs/latex/wx/tmbconv.tex
+++ b/docs/latex/wx/tmbconv.tex
@@ -11,9 +11,10 @@
 
 \section{wxMBConv classes overview}\label{mbconvclasses}
 
-Classes: \helpref{wxMBConv}{wxmbconv}, \helpref{wxMBConvFile}{wxmbconvfile}, 
+Classes: \helpref{wxMBConv}{wxmbconv}, \helpref{wxMBConvLibc}{wxmbconvlibc}, 
 \helpref{wxMBConvUTF7}{wxmbconvutf7}, \helpref{wxMBConvUTF8}{wxmbconvutf8}, 
-\helpref{wxCSConv}{wxcsconv}
+\helpref{wxCSConv}{wxcsconv},
+\helpref{wxMBConvUTF16}{wxmbconvutf16}, \helpref{wxMBConvUTF32}{wxmbconvutf32}
 
 The wxMBConv classes in wxWindows enables an Unicode-aware application to
 easily convert between Unicode and the variety of 8-bit encoding systems still
@@ -57,23 +58,21 @@ traditional 8-bit-encoding. And this is what the wxMBConv classes do.
 
 The base class for all these conversions is the wxMBConv class (which itself
 implements standard libc locale conversion). Derived classes include
-wxMBConvFile, wxMBConvUTF7, wxMBConvUTF8, and wxCSConv, which implement
-different kinds of conversions. You can also derive your own class for your
-own custom encoding and use it, should you need it. All you need to do is
-override the MB2WC and WC2MB methods.
+wxMBConvLibc, several different wxMBConvUTFxxx classes, and wxCSConv, which
+implement different kinds of conversions. You can also derive your own class
+for your own custom encoding and use it, should you need it. All you need to do
+is override the MB2WC and WC2MB methods.
 
 \subsection{wxMBConv objects}
 
-In C++, for a class to be useful and possible to pass around, it needs to be
-instantiated. All of the wxWindows-provided wxMBConv classes have predefined
-instances (wxConvLibc, wxConvFile, wxConvUTF7, wxConvUTF8, wxConvLocal).
-You can use these predefined objects directly, or you can instantiate your own
-objects.
+Several of the wxWindows-provided wxMBConv classes have predefined instances
+(wxConvLibc, wxConvFile, wxConvUTF7, wxConvUTF8, wxConvLocal). You can use
+these predefined objects directly, or you can instantiate your own objects.
 
-A variable, wxConvCurrent, points to the conversion object that the user interface
-is supposed to use, in the case that the user interface is not Unicode-based (like
-with GTK+ 1.2). By default, it points to wxConvLibc or wxConvLocal, depending on
-which works best on the current platform.
+A variable, wxConvCurrent, points to the conversion object that the user
+interface is supposed to use, in the case that the user interface is not
+Unicode-based (like with GTK+ 1.2). By default, it points to wxConvLibc or
+wxConvLocal, depending on which works best on the current platform.
 
 \subsection{wxCSConv}
 
-- 
2.50.0

