X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/050a1327723fc04f45d4d59ed984b53db6d16d48..a33c7e9933163c9763b0072731ba1af5d57fa5fe:/docs/latex/wx/function.tex

diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index 67937a6486..619b25dee1 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}\\
@@ -250,6 +252,7 @@ the corresponding topic.
 \helpref{wx\_const\_cast}{wxconstcastraw}\\
 \helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw}\\
 \helpref{wx\_static\_cast}{wxstaticcastraw}\\
+\helpref{wx\_truncate\_cast}{wxtruncatecast}\\
 \helpref{\_}{underscore}\\
 \helpref{wxPLURAL}{wxplural}\\
 \helpref{\_T}{underscoret}
@@ -937,6 +940,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}
 
@@ -1066,7 +1071,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.
@@ -1324,7 +1331,8 @@ Return the (current) user's home directory.
 
 \wxheading{See also}
 
-\helpref{wxGetUserHome}{wxgetuserhome}
+\helpref{wxGetUserHome}{wxgetuserhome}\\
+\helpref{wxStandardPaths}{wxstandardpaths}
 
 \wxheading{Include files}
 
@@ -2548,7 +2556,7 @@ Empties the clipboard.
 
 \membersection{::wxEnumClipboardFormats}\label{wxenumclipboardformats}
 
-\func{int}{wxEnumClipboardFormats}{\param{int}{dataFormat}}
+\func{int}{wxEnumClipboardFormats}{\param{int}{ dataFormat}}
 
 Enumerates the formats found in a list of available formats that belong
 to the clipboard. Each call to this  function specifies a known
@@ -2569,7 +2577,7 @@ wxOpenClipboard function.
 
 \membersection{::wxGetClipboardData}\label{wxgetclipboarddata}
 
-\func{wxObject *}{wxGetClipboardData}{\param{int}{dataFormat}}
+\func{wxObject *}{wxGetClipboardData}{\param{int}{ dataFormat}}
 
 Gets data from the clipboard.
 
@@ -2585,7 +2593,7 @@ The clipboard must have previously been opened for this call to succeed.
 
 \membersection{::wxGetClipboardFormatName}\label{wxgetclipboardformatname}
 
-\func{bool}{wxGetClipboardFormatName}{\param{int}{dataFormat}, \param{const wxString\& }{formatName}, \param{int}{maxCount}}
+\func{bool}{wxGetClipboardFormatName}{\param{int}{ dataFormat}, \param{const wxString\& }{formatName}, \param{int}{ maxCount}}
 
 Gets the name of a registered clipboard format, and puts it into the buffer {\it formatName} which is of maximum
 length {\it maxCount}. {\it dataFormat} must not specify a predefined clipboard format.
@@ -2593,7 +2601,7 @@ length {\it maxCount}. {\it dataFormat} must not specify a predefined clipboard
 
 \membersection{::wxIsClipboardFormatAvailable}\label{wxisclipboardformatavailable}
 
-\func{bool}{wxIsClipboardFormatAvailable}{\param{int}{dataFormat}}
+\func{bool}{wxIsClipboardFormatAvailable}{\param{int}{ dataFormat}}
 
 Returns true if the given data format is available on the clipboard.
 
@@ -2614,7 +2622,7 @@ Registers the clipboard data format name and returns an identifier.
 
 \membersection{::wxSetClipboardData}\label{wxsetclipboarddata}
 
-\func{bool}{wxSetClipboardData}{\param{int}{dataFormat}, \param{wxObject *}{data}, \param{int}{width}, \param{int}{height}}
+\func{bool}{wxSetClipboardData}{\param{int}{ dataFormat}, \param{wxObject*}{ data}, \param{int}{ width}, \param{int}{ height}}
 
 Passes data to the clipboard.
 
@@ -2630,8 +2638,6 @@ Passes data to the clipboard.
 The clipboard must have previously been opened for this call to succeed.
 
 
-
-
 \section{Miscellaneous functions}\label{miscellany}
 
 
@@ -2749,6 +2755,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}}
@@ -2794,7 +2842,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}.
@@ -3123,7 +3171,7 @@ allows to define unsigned 64 bit compile time constants:
 
 \membersection{wxVaCopy}\label{wxvacopy}
 
-\func{void}{wxVaCopy}{\param{va\_list }{argptrDst}, \param{va\_list}{argptrSrc}}
+\func{void}{wxVaCopy}{\param{va\_list }{argptrDst}, \param{va\_list}{ argptrSrc}}
 
 This macro is the same as the standard C99 \texttt{va\_copy} for the compilers
 which support it or its replacement for those that don't. It must be used to
@@ -3322,8 +3370,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:
 
@@ -3613,8 +3664,20 @@ star is not appended to it.
 \wxheading{See also}
 
 \helpref{wx\_const\_cast}{wxconstcastraw},\\
-\helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw}
+\helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw},\\
+\helpref{wx\_truncate\_cast}{wxtruncatecast}
+
+
+\membersection{wx\_truncate\_cast}\label{wxtruncatecast}
+
+\func{T}{wx\_truncate\_cast}{T, x}
 
+This case doesn't correspond to any standard cast but exists solely to make
+casts which possibly result in a truncation of an integer value more readable.
+
+\wxheading{See also}
+
+\helpref{wx\_static\_cast}{wxstaticcastraw}
 
 
 \section{Log functions}\label{logfunctions}
