]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/function.tex
Added wxUSE_DC_CACHEING and associated code to wxMSW
[wxWidgets.git] / docs / latex / wx / function.tex
index 952dcc160ce270d7908e56fa013768a7b05fd5dc..09ba843d9f9135bf111224b679a7742d7b728616 100644 (file)
@@ -461,15 +461,34 @@ if successful, FALSE otherwise.
 Makes a copy of the string {\it s} using the C++ new operator, so it can be
 deleted with the {\it delete} operator.
 
+\membersection{::wxIsEmpty}\label{wxisempty}
+
+\func{bool}{wxIsEmpty}{\param{const char *}{ p}}
+
+Returns {\tt TRUE} if the pointer is either {\tt NULL} or points to an empty
+string, {\tt FALSE} otherwise.
+
+\membersection{::wxStricmp}\label{wxstricmp}
+
+\func{int}{wxStricmp}{\param{const char *}{p1}, \param{const char *}{p2}}
+
+Returns a negative value, 0, or positive value if {\it p1} is less than, equal
+to or greater than {\it p2}. The comparison is case-insensitive.
+
+This function complements the standard C function {\it strcmp()} which performs
+case-sensitive comparison.
+
 \membersection{::wxStringMatch}
 
 \func{bool}{wxStringMatch}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2},\\
   \param{bool}{ subString = TRUE}, \param{bool}{ exact = FALSE}}
 
-Returns TRUE if the substring {\it s1} is found within {\it s2},
-ignoring case if {\it exact} is FALSE. If {\it subString} is FALSE,
+Returns {\tt TRUE} if the substring {\it s1} is found within {\it s2},
+ignoring case if {\it exact} is FALSE. If {\it subString} is {\tt FALSE},
 no substring matching is done.
 
+This function is obsolete, use \helpref{wxString::Find}{wxstringfind} instead.
+
 \membersection{::wxStringEq}\label{wxstringeq}
 
 \func{bool}{wxStringEq}{\param{const wxString\& }{s1}, \param{const wxString\& }{s2}}
@@ -480,30 +499,15 @@ A macro defined as:
 #define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0))
 \end{verbatim}
 
-\membersection{::IsEmpty}\label{isempty}
-
-\func{bool}{IsEmpty}{\param{const char *}{ p}}
-
-Returns TRUE if the string is empty, FALSE otherwise. It is safe to pass NULL
-pointer to this function and it will return TRUE for it.
-
-\membersection{::Stricmp}\label{stricmp}
-
-\func{int}{Stricmp}{\param{const char *}{p1}, \param{const char *}{p2}}
-
-Returns a negative value, 0, or positive value if {\it p1} is less than, equal
-to or greater than {\it p2}. The comparison is case-insensitive.
-
-This function complements the standard C function {\it strcmp()} which performs
-case-sensitive comparison.
+This function is obsolete, use \helpref{wxString}{wxstring} instead.
 
-\membersection{::Strlen}\label{strlen}
+\membersection{::wxStrlen}\label{wxstrlen}
 
-\func{size\_t}{Strlen}{\param{const char *}{ p}}
+\func{size\_t}{wxStrlen}{\param{const char *}{ p}}
 
 This is a safe version of standard function {\it strlen()}: it does exactly the
 same thing (i.e. returns the length of the string) except that it returns 0 if
-{\it p} is the NULL pointer.
+{\it p} is the {\tt NULL} pointer.
 
 \membersection{::wxGetTranslation}\label{wxgettranslation}
 
@@ -1751,13 +1755,56 @@ this default behaviour.
 
 \membersection{::wxKill}\label{wxkill}
 
-\func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig}}
+\func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig = wxSIGTERM}, \param{wxKillError }{*rc = NULL}}
 
-Under Unix (the only supported platform), equivalent to the Unix kill function.
-Returns 0 on success, -1 on failure.
+Equivalent to the Unix kill function: send the given signal {\it sig} to the
+process with PID {\it pid}. The valud signal values are
 
-Tip: sending a signal of 0 to a process returns -1 if the process does not exist.
-It does not raise a signal in the receiving process.
+\begin{verbatim}
+enum wxSignal
+{
+    wxSIGNONE = 0,  // verify if the process exists under Unix
+    wxSIGHUP,
+    wxSIGINT,
+    wxSIGQUIT,
+    wxSIGILL,
+    wxSIGTRAP,
+    wxSIGABRT,
+    wxSIGEMT,
+    wxSIGFPE,
+    wxSIGKILL,      // forcefully kill, dangerous!
+    wxSIGBUS,
+    wxSIGSEGV,
+    wxSIGSYS,
+    wxSIGPIPE,
+    wxSIGALRM,
+    wxSIGTERM       // terminate the process gently
+};
+\end{verbatim}
+
+{\tt wxSIGNONE}, {\tt wxSIGKILL} and {\tt wxSIGTERM} have the same meaning
+under both Unix and Windows but all the other signals are equivalent to 
+{\tt wxSIGTERM} under Windows.
+
+Returns 0 on success, -1 on failure. If {\it rc} parameter is not NULL, it will
+be filled with an element of {\tt wxKillError} enum:
+
+\begin{verbatim}
+enum wxKillError
+{
+    wxKILL_OK,              // no error
+    wxKILL_BAD_SIGNAL,      // no such signal
+    wxKILL_ACCESS_DENIED,   // permission denied
+    wxKILL_NO_PROCESS,      // no such process
+    wxKILL_ERROR            // another, unspecified error
+};
+\end{verbatim}
+
+\wxheading{See also}
+
+\helpref{wxProcess::Kill}{wxprocesskill},\rtfsp
+\helpref{wxProcess::Exists}{wxprocessexists},\rtfsp
+\helpref{Exec sample}{sampleexec}
 
 \wxheading{Include files}
 
@@ -1979,6 +2026,20 @@ This function is now obsolete, replaced by \helpref{Log functions}{logfunctions}
 
 <wx/memory.h>
 
+\membersection{::wxTrap}\label{wxtrap}
+
+\func{void}{wxTrap}{\void}
+
+In debug mode (when {\tt \_\_WXDEBUG\_\_} is defined) this function generates a
+debugger exception meaning that the control is passed to the debugger if one is
+attached to the process. Otherwise the program just terminates abnormally.
+
+In release mode this function does nothing.
+
+\wxheading{Include files}
+
+<wx/debug.h>
+
 \membersection{::wxUsleep}\label{wxusleep}
 
 \func{void}{wxUsleep}{\param{unsigned long}{ milliseconds}}
@@ -2482,7 +2543,7 @@ loading from resource data.
 \func{bool}{wxResourceAddIdentifier}{\param{const wxString\& }{name}, \param{int }{value}}
 
 Used for associating a name with an integer identifier (equivalent to dynamically\rtfsp
-\verb$#$defining a name to an integer). Unlikely to be used by an application except
+\tt{#}defining a name to an integer). Unlikely to be used by an application except
 perhaps for implementing resource functionality for interpreted languages.
 
 \membersection{::wxResourceClear}
@@ -2648,7 +2709,7 @@ load an entire {\tt .wxr file} into a string.
 
 \func{bool}{wxResourceRegisterBitmapData}{\param{const wxString\& }{name}, \param{char** }{xpm\_data}}
 
-Makes \verb$#$included XBM or XPM bitmap data known to the wxWindows resource system.
+Makes \tt{#}included XBM or XPM bitmap data known to the wxWindows resource system.
 This is required if other resources will use the bitmap data, since otherwise there
 is no connection between names used in resources, and the global bitmap data.