X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/498a1eeb8d044ef64815352ecabe4c223adf8c6a..8648883bfe1106c807f7ab3facddae36419ccead:/docs/latex/wx/function.tex

diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index 58e5964499..75ae7a6ffe 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -189,6 +189,8 @@ the corresponding topic.
 \helpref{wxNewId}{wxnewid}\\
 \helpref{wxNow}{wxnow}\\
 \helpref{wxOnAssert}{wxonassert}\\
+\helpref{wxON\_BLOCK\_EXIT}{wxonblockexit}\\
+\helpref{wxON\_BLOCK\_EXIT\_OBJ}{wxonblockexitobj}\\
 \helpref{wxOpenClipboard}{wxopenclipboard}\\
 \helpref{wxParseCommonDialogsFilter}{wxparsecommondialogsfilter}\\
 \helpref{wxDirExists}{functionwxdirexists}\\
@@ -251,6 +253,7 @@ the corresponding topic.
 \helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw}\\
 \helpref{wx\_static\_cast}{wxstaticcastraw}\\
 \helpref{\_}{underscore}\\
+\helpref{wxPLURAL}{wxplural}\\
 \helpref{\_T}{underscoret}
 
 
@@ -936,6 +939,8 @@ Returns true if the file exists and is a plain file.
 
 Returns time of last modification of given file.
 
+The return value is $0$ if an error occured (e.g. file not found).
+
 
 \membersection{::wxFileNameFromPath}\label{wxfilenamefrompath}
 
@@ -1065,7 +1070,9 @@ Returns the directory part of the filename.
 
 \membersection{::wxUnix2DosFilename}\label{wxunix2dosfilename}
 
-\func{void}{wxUnix2DosFilename}{\param{const wxString\& }{s}}
+\func{void}{wxUnix2DosFilename}{\param{wxChar *}{s}}
+
+This function is deprecated, use \helpref{wxFileName}{wxfilename} instead.
 
 Converts a Unix to a DOS filename by replacing forward
 slashes with backslashes.
@@ -1323,7 +1330,8 @@ Return the (current) user's home directory.
 
 \wxheading{See also}
 
-\helpref{wxGetUserHome}{wxgetuserhome}
+\helpref{wxGetUserHome}{wxgetuserhome}\\
+\helpref{wxStandardPaths}{wxstandardpaths}
 
 \wxheading{Include files}
 
@@ -1504,17 +1512,27 @@ as wxGetTranslation.
 
 The second form is used when retrieving translation of string that has
 different singular and plural form in English or different plural forms in some
-other language. It takes two extra arguments: \arg{str}
-parameter must contain the singular form of the string to be converted.
-It is also used as the key for the search in the catalog.
-The \arg{strPlural} parameter is the plural form (in English).
-The parameter \arg{n} is used to determine the plural form.  If no
-message catalog is found \arg{str} is returned if `n == 1',
+other language. It takes two extra arguments: as above, \arg{str} 
+parameter must contain the singular form of the string to be converted and
+is used as the key for the search in the catalog. The \arg{strPlural} parameter
+is the plural form (in English). The parameter \arg{n} is used to determine the
+plural form.  If no message catalog is found \arg{str} is returned if `n == 1',
 otherwise \arg{strPlural}.
-See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} for additional information on plural forms handling.
+
+See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} 
+for additional information on plural forms handling. For a shorter alternative
+see the \helpref{wxPLURAL()}{wxplural} macro.
 
 Both versions call \helpref{wxLocale::GetString}{wxlocalegetstring}.
 
+Note that this function is not suitable for literal strings in Unicode
+builds, since the literal strings must be enclosed into 
+\helpref{\_T()}{underscoret} or \helpref{wxT}{wxt} macro which makes them
+unrecognised by \texttt{xgettext}, and so they are not extracted to the message
+catalog. Instead, use the \helpref{\_()}{underscore} and 
+\helpref{wxPLURAL}{wxplural} macro for all literal strings.
+
+
 \membersection{::wxIsEmpty}\label{wxisempty}
 
 \func{bool}{wxIsEmpty}{\param{const char *}{ p}}
@@ -1688,6 +1706,14 @@ the string for the current locale during execution.
 Don't confuse this macro with \helpref{\_T()}{underscoret}!
 
 
+\membersection{wxPLURAL}\label{wxplural}
+
+\func{const wxChar *}{wxPLURAL}{\param{const char *}{sing}, \param{const char *}{plur}, \param{size\_t}{n}}
+
+This macro is identical to \helpref{\_()}{underscore} but for the plural variant
+of \helpref{wxGetTranslation}{wxgettranslation}.
+
+
 \membersection{\_T}\label{underscoret}
 
 \func{wxChar}{\_T}{\param{char }{ch}}
@@ -2730,6 +2756,48 @@ Generates an integer identifier unique to this run of the program.
 <wx/utils.h>
 
 
+\membersection{wxON\_BLOCK\_EXIT}\label{wxonblockexit}
+
+\func{}{wxON\_BLOCK\_EXIT0}{\param{}{func}}
+\func{}{wxON\_BLOCK\_EXIT1}{\param{}{func}, \param{}{p1}}
+\func{}{wxON\_BLOCK\_EXIT2}{\param{}{func}, \param{}{p1}, \param{}{p2}}
+
+This family of macros allows to ensure that the global function \arg{func}
+with 0, 1, 2 or more parameters (up to some implementaton-defined limit) is
+executed on scope exit, whether due to a normal function return or because an
+exception has been thrown. A typical example of its usage:
+\begin{verbatim}
+    void *buf = malloc(size);
+    wxON_BLOCK_EXIT1(free, buf);
+\end{verbatim}
+
+Please see the original article by Andrei Alexandrescu and Petru Marginean
+published in December 2000 issue of \emph{C/C++ Users Journal} for more
+details.
+
+\wxheading{Include files}
+
+<wx/scopeguard.h>
+
+\wxheading{See also}
+
+\helpref{wxON\_BLOCK\_EXIT\_OBJ}{wxonblockexitobj}
+
+
+\membersection{wxON\_BLOCK\_EXIT\_OBJ}\label{wxonblockexitobj}
+
+\func{}{wxON\_BLOCK\_EXIT\_OBJ0}{\param{}{obj}, \param{}{method}}
+\func{}{wxON\_BLOCK\_EXIT\_OBJ1}{\param{}{obj}, \param{}{method}, \param{}{p1}}
+\func{}{wxON\_BLOCK\_EXIT\_OBJ2}{\param{}{obj}, \param{}{method}, \param{}{p1}, \param{}{p2}}
+
+This family of macros is similar to \helpref{wxON\_BLOCK\_EXIT}{wxonblockexit} 
+but calls a method of the given object instead of a free function.
+
+\wxheading{Include files}
+
+<wx/scopeguard.h>
+
+
 \membersection{::wxRegisterId}\label{wxregisterid}
 
 \func{void}{wxRegisterId}{\param{long}{ id}}
@@ -2775,7 +2843,7 @@ See also \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEClient}{wxddeclient},
 
 \membersection{::wxEnableTopLevelWindows}\label{wxenabletoplevelwindows}
 
-\func{void}{wxEnableTopLevelWindow}{\param{bool}{ enable = true}}
+\func{void}{wxEnableTopLevelWindows}{\param{bool}{ enable = true}}
 
 This function enables or disables all top level windows. It is used by
 \helpref{::wxSafeYield}{wxsafeyield}.
@@ -3303,8 +3371,11 @@ dynamically. The same as DECLARE\_ABSTRACT\_CLASS.
 
 \func{}{DECLARE\_DYNAMIC\_CLASS}{className}
 
-Used inside a class declaration to declare that the objects of this class should be dynamically
-creatable from run-time type information.
+Used inside a class declaration to make the class known to wxWidgets RTTI
+system and also declare that the objects of this class should be dynamically
+creatable from run-time type information. Notice that this implies that the
+class should have a default constructor, if this is not the case consider using 
+\helpref{DECLARE\_CLASS}{declareclass}.
 
 Example:
 
