X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d524e22d0272e80e0027bc7afd15da8e839caf4a..04a65123066ad12076f42d6ef259eae378e73761:/docs/latex/wx/function.tex

diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index fc3d9d0ff4..ee1ed4a498 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -67,10 +67,12 @@ For example:
 
 \membersection{::wxFindNextFile}\label{wxfindnextfile}
 
-\func{wxString}{wxFindFirstFile}{\void}
+\func{wxString}{wxFindNextFile}{\void}
 
 Returns the next file that matches the path passed to \helpref{wxFindFirstFile}{wxfindfirstfile}.
 
+See \helpref{wxFindFirstFile}{wxfindfirstfile} for an example.
+
 \membersection{::wxGetOSDirectory}\label{wxgetosdirectory}
 
 \func{wxString}{wxGetOSDirectory}{\void}
@@ -159,10 +161,13 @@ with wildcard characters. See \helpref{wxIsWild}{wxiswild}.
 
 \membersection{::wxMkdir}
 
-\func{bool}{wxMkdir}{\param{const wxString\& }{dir}}
+\func{bool}{wxMkdir}{\param{const wxString\& }{dir}, \param{int }{perm = 0777}}
 
 Makes the directory {\it dir}, returning TRUE if successful.
 
+{\it perm} is the access mask for the directory for the systems on which it is
+supported (Unix) and doesn't have effect for the other ones.
+
 \membersection{::wxRemoveFile}
 
 \func{bool}{wxRemoveFile}{\param{const wxString\& }{file}}
@@ -428,7 +433,7 @@ Under Windows (only), the wildcard may be a specification for multiple
 types of file with a description for each, such as:
 
 \begin{verbatim}
- "BMP files (*.bmp) | *.bmp | GIF files (*.gif) | *.gif"
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
 \end{verbatim}
 
 The application must check for an empty return value (the user pressed
@@ -1053,7 +1058,10 @@ If TRUE, the current application waits until the other program has terminated.
 In the case of synchronous execution, the return value is the exit code of
 the process (which terminates by the moment the function returns) and will be
 $-1$ if the process couldn't be started and typically 0 if the process
-terminated successfully.
+terminated successfully. Also, while waiting for the process to
+terminate, wxExecute will call \helpref{wxYield}{wxyield}. The caller
+should ensure that this can cause no recursion, in the simples case by 
+calling \helpref{wxEnableTopLevelWindows(FALSE)}{wxenabletoplevelwindows}.
 
 For asynchronous execution, however, the return value is the process id and
 zero value indicates that the command could not be executed.
@@ -1385,6 +1393,18 @@ Returns the result of the call to \helpref{::wxYield}{wxyield}.
 
 <wx/utils.h>
 
+\membersection{::wxEnableTopLevelWindows}{wxenabletoplevelwindows}
+
+\func{void}{wxEnableTopLevelWindow}{\param{bool}{ enable = TRUE}}
+
+This function enables or disables all top level windows. It is used by
+\helpref{::wxSafeYield}{wxsafeyield}.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
 \membersection{::wxSetDisplayName}\label{wxsetdisplayname}
 
 \func{void}{wxSetDisplayName}{\param{const wxString\& }{displayName}}
@@ -2135,7 +2155,13 @@ assertion).
 
 \func{}{wxASSERT}{\param{}{condition}}
 
-Assert macro. An error message will be generated if the condition is FALSE.
+Assert macro. An error message will be generated if the condition is FALSE in
+debug mode, but nothing will be done in the release build.
+
+Please note that the condition in wxASSERT() should have no side effects
+because it will not be executed in release mode at all.
+
+See also: \helpref{wxASSERT\_MSG}{wxassertmsg}
 
 \membersection{wxASSERT\_MSG}\label{wxassertmsg}
 
@@ -2143,18 +2169,28 @@ Assert macro. An error message will be generated if the condition is FALSE.
 
 Assert macro with message. An error message will be generated if the condition is FALSE.
 
+See also: \helpref{wxASSERT}{wxassert}
+
 \membersection{wxFAIL}\label{wxfail}
 
-\func{}{wxFAIL}{\param{}{condition}}
+\func{}{wxFAIL}{\void}
 
 Will always generate an assert error if this code is reached (in debug mode).
 
+See also: \helpref{wxFAIL\_MSG}{wxfailmsg}
+
 \membersection{wxFAIL\_MSG}\label{wxfailmsg}
 
-\func{}{wxFAIL\_MSG}{\param{}{condition}, \param{}{msg}}
+\func{}{wxFAIL\_MSG}{\param{}{msg}}
 
 Will always generate an assert error with specified message if this code is reached (in debug mode).
 
+This macro is useful for marking unreachable" code areas, for example
+it may be used in the "default:" branch of a switch statement if all possible
+cases are processed above.
+
+See also: \helpref{wxFAIL}{wxfail}
+
 \membersection{wxCHECK}\label{wxcheck}
 
 \func{}{wxCHECK}{\param{}{condition}, \param{}{retValue}}
@@ -2169,3 +2205,35 @@ This check is done even in release mode.
 Checks that the condition is true, returns with the given return value if not (FAILs in debug mode).
 This check is done even in release mode.
 
+This macro may be only used in non void functions, see also 
+\helpref{wxCHECK\_RET}{wxcheckret}.
+
+\membersection{wxCHECK\_RET}\label{wxcheckret}
+
+\func{}{wxCHECK\_RET}{\param{}{condition}, \param{}{msg}}
+
+Checks that the condition is true, and returns if not (FAILs with given error
+message in debug mode). This check is done even in release mode.
+
+This macro should be used in void functions instead of 
+\helpref{wxCHECK\_MSG}{wxcheckmsg}.
+
+\membersection{wxCHECK2}\label{wxcheck2}
+
+\func{}{wxCHECK2}{\param{}{condition}, \param{}{operation}}
+
+Checks that the condition is true and \helpref{wxFAIL}{wxfail} and execute 
+{\it operation} if it is not. This is a generalisation of 
+\helpref{wxCHECK}{wxcheck} and may be used when something else than just
+returning from the function must be done when the {\it condition} is false.
+
+This check is done even in release mode.
+
+\membersection{wxCHECK2\_MSG}\label{wxcheck2msg}
+
+\func{}{wxCHECK2}{\param{}{condition}, \param{}{operation}, \param{}{msg}}
+
+This is the same as \helpref{wxCHECK2}{wxcheck2}, but 
+\helpref{wxFAIL\_MSG}{wxfailmsg} with the specified {\it msg} is called
+instead of wxFAIL() if the {\it condition} is false.
+
