X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d85cfb3784a10430cc17618645fa66ff3df08040..b737ad10dec946cd7d5e38c43c666e8efe89f0ae:/docs/latex/wx/function.tex

diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index aee339bb42..122ed0d49f 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -31,6 +31,7 @@ the corresponding topic.
 \helpref{wxBITMAP}{wxbitmapmacro}\\
 \helpref{wxBeginBusyCursor}{wxbeginbusycursor}\\
 \helpref{wxBell}{wxbell}\\
+\helpref{wxCHANGE\_UMASK}{wxchangeumask}\\
 \helpref{wxCHECK}{wxcheck}\\
 \helpref{wxCHECK2\_MSG}{wxcheck2msg}\\
 \helpref{wxCHECK2}{wxcheck2}\\
@@ -95,6 +96,7 @@ the corresponding topic.
 \helpref{wxFinite}{wxfinite}\\
 \helpref{wxGetActiveWindow}{wxgetactivewindow}\\
 \helpref{wxGetApp}{wxgetapp}\\
+\helpref{wxGetBatteryState}{wxgetbatterystate}\\
 \helpref{wxGetClipboardData}{wxgetclipboarddata}\\
 \helpref{wxGetClipboardFormatName}{wxgetclipboardformatname}\\
 \helpref{wxGetColourFromUser}{wxgetcolourfromuser}\\
@@ -102,10 +104,11 @@ the corresponding topic.
 \helpref{wxGetDiskSpace}{wxgetdiskspace}\\
 \helpref{wxGetDisplayName}{wxgetdisplayname}\\
 \helpref{wxGetDisplaySize}{wxdisplaysize}\\
-\helpref{wxGetDisplaySizeMM}{wxdisplaysizemm}\\ 
+\helpref{wxGetDisplaySizeMM}{wxdisplaysizemm}\\
 \helpref{wxGetElapsedTime}{wxgetelapsedtime}\\
 \helpref{wxGetEmailAddress}{wxgetemailaddress}\\
 \helpref{wxGetEnv}{wxgetenv}\\
+\helpref{wxGetFileKind}{wxgetfilekind}\\
 \helpref{wxGetFontFromUser}{wxgetfontfromuser}\\
 \helpref{wxGetFreeMemory}{wxgetfreememory}\\
 \helpref{wxGetFullHostName}{wxgetfullhostname}\\
@@ -122,6 +125,7 @@ the corresponding topic.
 \helpref{wxGetOsDescription}{wxgetosdescription}\\
 \helpref{wxGetOsVersion}{wxgetosversion}\\
 \helpref{wxGetPasswordFromUser}{wxgetpasswordfromuser}\\
+\helpref{wxGetPowerType}{wxgetpowertype}\\
 \helpref{wxGetPrinterCommand}{wxgetprintercommand}\\
 \helpref{wxGetPrinterFile}{wxgetprinterfile}\\
 \helpref{wxGetPrinterMode}{wxgetprintermode}\\
@@ -243,6 +247,7 @@ the corresponding topic.
 \helpref{wxWriteResource}{wxwriteresource}\\
 \helpref{wxYield}{wxyield}\\
 \helpref{wx\_const\_cast}{wxconstcastraw}\\
+\helpref{wx\_dynamic\_cast}{wxdynamiccastraw}\\
 \helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw}\\
 \helpref{wx\_static\_cast}{wxstaticcastraw}\\
 \helpref{\_}{underscore}\\
@@ -314,7 +319,7 @@ the following can be done:
 
 \func{bool}{wxCHECK\_VERSION\_FULL}{\param{}{major, minor, release, subrel}}
 
-Same as \helpref{wxCHECK\_VERSION}{wxcheckversion} but also checks that 
+Same as \helpref{wxCHECK\_VERSION}{wxcheckversion} but also checks that
 \texttt{wxSUBRELEASE\_NUMBER} is at least \arg{subrel}.
 
 
@@ -520,16 +525,16 @@ processes.
 
 \perlnote{In wxPerl this function is called \texttt{Wx::ExecuteArgs}}
 
-\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}}
+\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}, \param{int }{flags = 0}}
 
 \perlnote{In wxPerl this function is called \texttt{Wx::ExecuteStdout} and it
 only takes the {\tt command} argument,
 and returns a 2-element list {\tt ( status, output )}, where {\tt output} is
 an array reference.}
 
-\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}, \param{wxArrayString\& }{errors}}
+\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}, \param{wxArrayString\& }{errors}, \param{int }{flags = 0}}
 
-\perlnote{In wxPerl this function is called \texttt{Wx::ExecuteStdoutStderr} 
+\perlnote{In wxPerl this function is called \texttt{Wx::ExecuteStdoutStderr}
 and it only takes the {\tt command} argument,
 and returns a 3-element list {\tt ( status, output, errors )}, where
 {\tt output} and {\tt errors} are array references.}
@@ -552,9 +557,12 @@ 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. 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 simplest case by
-calling \helpref{wxEnableTopLevelWindows(false)}{wxenabletoplevelwindows}.
+terminate, wxExecute will call \helpref{wxYield}{wxyield}. Because of this, by
+default this function disables all application windows to avoid unexpected
+reentrancies which could result from the users interaction with the program
+while the child process is running. If you are sure that it is safe to not
+disable the program windows, you may pass \texttt{wxEXEC\_NODISABLE} flag to
+prevent this automatic disabling from happening.
 
 For asynchronous execution, however, the return value is the process id and
 zero value indicates that the command could not be executed. As an added
@@ -576,14 +584,15 @@ happening, i.e. with this flag the child process window will be shown normally.
 
 Under Unix the flag {\tt wxEXEC\_MAKE\_GROUP\_LEADER} may be used to ensure
 that the new process is a group leader (this will create a new session if
-needed). Calling \helpref{wxKill}{wxkill} with the argument of -pid where pid
-is the process ID of the new process will kill this process as well as all of
-its children (except those which have started their own session).
+needed). Calling \helpref{wxKill}{wxkill} passing wxKILL\_CHILDREN will
+will kill this process as well as all of its children (except those which have
+started their own session).
 
 Finally, you may use the third overloaded version of this function to execute
-a process (always synchronously) and capture its output in the array
-{\it output}. The fourth version adds the possibility to additionally capture
-the messages from standard error output in the {\it errors} array.
+a process (always synchronously, the contents of \arg{flags} is or'd with
+\texttt{wxEXEC\_SYNC}) and capture its output in the array \arg{output}. The
+fourth version adds the possibility to additionally capture the messages from
+standard error output in the \arg{errors} array.
 
 {\bf NB:} Currently wxExecute() can only be used from the main thread, calling
 this function from another thread will result in an assert failure in debug
@@ -628,7 +637,7 @@ application. See \helpref{wxCloseEvent}{wxcloseevent} and \helpref{wxApp}{wxapp}
 
 \membersection{::wxKill}\label{wxkill}
 
-\func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig = wxSIGTERM}, \param{wxKillError }{*rc = NULL}}
+\func{int}{wxKill}{\param{long}{ pid}, \param{int}{ sig = wxSIGTERM}, \param{wxKillError }{*rc = NULL}, \param{int }{flags = 0}}
 
 Equivalent to the Unix kill function: send the given signal {\it sig} to the
 process with PID {\it pid}. The valid signal values are
@@ -656,7 +665,7 @@ enum wxSignal
 \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 
+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
@@ -673,6 +682,12 @@ enum wxKillError
 };
 \end{verbatim}
 
+The {\it flags} parameter can be wxKILL\_NOCHILDREN (the default),
+or wxKILL\_CHILDREN, in which case the child processes of this
+process will be killed too. Note that under Unix, for wxKILL\_CHILDREN
+to work you should have created the process by passing wxEXEC\_MAKE\_GROUP\_LEADER
+to wxExecute.
+
 \wxheading{See also}
 
 \helpref{wxProcess::Kill}{wxprocesskill},\rtfsp
@@ -760,7 +775,7 @@ to create and use the critical section only when needed.
 
 \func{}{wxCRIT\_SECT\_DECLARE}{\param{}{cs}}
 
-This macro declares a (static) critical section object named {\it cs} if 
+This macro declares a (static) critical section object named {\it cs} if
 {\tt wxUSE\_THREADS} is $1$ and does nothing if it is $0$.
 
 
@@ -769,9 +784,9 @@ This macro declares a (static) critical section object named {\it cs} if
 
 \func{}{wxCRIT\_SECT\_DECLARE}{\param{}{cs}}
 
-This macro declares a critical section object named {\it cs} if 
+This macro declares a critical section object named {\it cs} if
 {\tt wxUSE\_THREADS} is $1$ and does nothing if it is $0$. As it doesn't
-include the {\tt static} keyword (unlike 
+include the {\tt static} keyword (unlike
 \helpref{wxCRIT\_SECT\_DECLARE}{wxcritsectdeclare}), it can be used to declare
 a class or struct member which explains its name.
 
@@ -781,8 +796,8 @@ a class or struct member which explains its name.
 
 \func{}{wxCRIT\_SECT\_LOCKER}{\param{}{name}, \param{}{cs}}
 
-This macro creates a \helpref{critical section lock}{wxcriticalsectionlocker} 
-object named {\it name} and associated with the critical section {\it cs} if 
+This macro creates a \helpref{critical section lock}{wxcriticalsectionlocker}
+object named {\it name} and associated with the critical section {\it cs} if
 {\tt wxUSE\_THREADS} is $1$ and does nothing if it is $0$.
 
 
@@ -791,7 +806,7 @@ object named {\it name} and associated with the critical section {\it cs} if
 
 \func{}{wxCRITICAL\_SECTION}{\param{}{name}}
 
-This macro combines \helpref{wxCRIT\_SECT\_DECLARE}{wxcritsectdeclare} and 
+This macro combines \helpref{wxCRIT\_SECT\_DECLARE}{wxcritsectdeclare} and
 \helpref{wxCRIT\_SECT\_LOCKER}{wxcritsectlocker}: it creates a static critical
 section object and also the lock object associated with it. Because of this, it
 can be only used inside a function, not at global scope. For example:
@@ -809,7 +824,7 @@ int IncCount()
 
 (note that we suppose that the function is called the first time from the main
 thread so that the critical section object is initialized correctly by the time
-other threads start calling it, if this is not the case this approach can 
+other threads start calling it, if this is not the case this approach can
 {\bf not} be used and the critical section must be made a global instead).
 
 
@@ -818,7 +833,7 @@ other threads start calling it, if this is not the case this approach can
 
 \func{}{wxENTER\_CRIT\_SECT}{\param{wxCriticalSection\& }{cs}}
 
-This macro is equivalent to \helpref{cs.Enter()}{wxcriticalsectionenter} if 
+This macro is equivalent to \helpref{cs.Enter()}{wxcriticalsectionenter} if
 {\tt wxUSE\_THREADS} is $1$ and does nothing if it is $0$.
 
 
@@ -836,7 +851,7 @@ Returns {\tt true} if this thread is the main one. Always returns {\tt true} if
 
 \func{}{wxLEAVE\_CRIT\_SECT}{\param{wxCriticalSection\& }{cs}}
 
-This macro is equivalent to \helpref{cs.Leave()}{wxcriticalsectionleave} if 
+This macro is equivalent to \helpref{cs.Leave()}{wxcriticalsectionleave} if
 {\tt wxUSE\_THREADS} is $1$ and does nothing if it is $0$.
 
 
@@ -890,7 +905,7 @@ threads.
 
 \wxheading{Include files}
 
-<wx/utils.h>
+<wx/filefn.h>
 
 \wxheading{See also}
 
@@ -963,7 +978,7 @@ For example:
 
 \begin{verbatim}
   wxString f = wxFindFirstFile("/home/project/*.*");
-  while ( !f.IsEmpty() )
+  while ( !f.empty() )
   {
     ...
     f = wxFindNextFile();
@@ -1002,6 +1017,30 @@ Mac OS and generic Unix provided the system has {\tt statfs()} function.
 This function first appeared in wxWidgets 2.3.2.
 
 
+\membersection{::wxGetFileKind}\label{wxgetfilekind}
+
+\func{wxFileKind}{wxGetFileKind}{\param{int }{fd}}
+
+\func{wxFileKind}{wxGetFileKind}{\param{FILE *}{fp}}
+
+Returns the type of an open file. Possible return values are:
+
+\begin{verbatim}
+enum wxFileKind
+{
+  wxFILE_KIND_UNKNOWN,
+  wxFILE_KIND_DISK,     // a file supporting seeking to arbitrary offsets
+  wxFILE_KIND_TERMINAL, // a tty
+  wxFILE_KIND_PIPE      // a pipe
+};
+
+\end{verbatim}
+
+\wxheading{Include files}
+
+<wx/filefn.h>
+
+
 \membersection{::wxGetOSDirectory}\label{wxgetosdirectory}
 
 \func{wxString}{wxGetOSDirectory}{\void}
@@ -1032,6 +1071,18 @@ Converts a Unix to a DOS filename by replacing forward
 slashes with backslashes.
 
 
+\membersection{wxCHANGE\_UMASK}\label{wxchangeumask}
+
+\func{}{wxCHANGE\_UMASK}{\param{int }{mask}}
+
+Under Unix this macro changes the current process umask to the given value,
+unless it is equal to $-1$ in which case nothing is done, and restores it to
+the original value on scope exit. It works by declaring a variable which sets
+umask to \arg{mask} in its constructor and restores it in its destructor.
+
+Under other platforms this macro expands to nothing.
+
+
 \membersection{::wxConcatFiles}\label{wxconcatfiles}
 
 \func{bool}{wxConcatFiles}{\param{const wxString\& }{file1}, \param{const wxString\& }{file2},
@@ -1219,13 +1270,29 @@ The functions in this section are used to retrieve information about the
 current computer and/or user characteristics.
 
 
+\membersection{::wxGetEmailAddress}\label{wxgetemailaddress}
+
+\func{wxString}{wxGetEmailAddress}{\void}
+
+\func{bool}{wxGetEmailAddress}{\param{char * }{buf}, \param{int }{sz}}
+
+Copies the user's email address into the supplied buffer, by
+concatenating the values returned by \helpref{wxGetFullHostName}{wxgetfullhostname}\rtfsp
+and \helpref{wxGetUserId}{wxgetuserid}.
+
+Returns true if successful, false otherwise.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
 \membersection{::wxGetFreeMemory}\label{wxgetfreememory}
 
-\func{long}{wxGetFreeMemory}{\void}
+\func{wxMemorySize}{wxGetFreeMemory}{\void}
 
 Returns the amount of free memory in bytes under environments which
-support it, and -1 if not supported. Currently, it is supported only
-under Windows, Linux and Solaris.
+support it, and -1 if not supported or failed to perform measurement.
 
 \wxheading{Include files}
 
@@ -1248,21 +1315,6 @@ error.
 <wx/utils.h>
 
 
-\membersection{::wxGetEmailAddress}\label{wxgetemailaddress}
-
-\func{bool}{wxGetEmailAddress}{\param{const wxString\& }{buf}, \param{int }{sz}}
-
-Copies the user's email address into the supplied buffer, by
-concatenating the values returned by \helpref{wxGetFullHostName}{wxgetfullhostname}\rtfsp
-and \helpref{wxGetUserId}{wxgetuserid}.
-
-Returns true if successful, false otherwise.
-
-\wxheading{Include files}
-
-<wx/utils.h>
-
-
 \membersection{::wxGetHomeDir}\label{wxgethomedir}
 
 \func{wxString}{wxGetHomeDir}{\void}
@@ -1305,32 +1357,6 @@ if successful, false otherwise.
 <wx/utils.h>
 
 
-\membersection{::wxGetUserId}\label{wxgetuserid}
-
-\func{wxString}{wxGetUserId}{\void}
-
-\func{bool}{wxGetUserId}{\param{char * }{buf}, \param{int }{sz}}
-
-This function returns the "user id" also known as "login name" under Unix i.e.
-something like "jsmith". It uniquely identifies the current user (on this system).
-
-Under Windows or NT, this function first looks in the environment
-variables USER and LOGNAME; if neither of these is found, the entry {\bf UserId}\rtfsp
-in the {\bf wxWidgets} section of the WIN.INI file is tried.
-
-The first variant of this function returns the login name if successful or an
-empty string otherwise. The second (deprecated) function returns true
-if successful, false otherwise.
-
-\wxheading{See also}
-
-\helpref{wxGetUserName}{wxgetusername}
-
-\wxheading{Include files}
-
-<wx/utils.h>
-
-
 \membersection{::wxGetOsDescription}\label{wxgetosdescription}
 
 \func{wxString}{wxGetOsDescription}{\void}
@@ -1356,7 +1382,7 @@ Gets operating system version information.
 
 \begin{twocollist}\itemsep=0pt
 \twocolitemruled{Platform}{Return types}
-\twocolitem{Mac OS}{Return value is wxMAC when compiled with CodeWarrior under Mac OS 8.x/9.x and Mac OS X, wxMAC\_DARWIN when compiled with the Apple Developer Tools under Mac OS X. 
+\twocolitem{Mac OS}{Return value is wxMAC when compiled with CodeWarrior under Mac OS 8.x/9.x and Mac OS X, wxMAC\_DARWIN when compiled with the Apple Developer Tools under Mac OS X.
 
 Both {\it major} and {\it minor} have to be looked at as hexadecimal numbers. So System 10.2.4 returns 0x10, resp 16 for {\it major} and 0x24, resp 36 for {\it minor}. }
 \twocolitem{GTK}{Return value is wxGTK, For GTK 1.0, {\it major} is 1, {\it minor} is 0. }
@@ -1392,6 +1418,32 @@ Returns the home directory for the given user. If the username is empty
 <wx/utils.h>
 
 
+\membersection{::wxGetUserId}\label{wxgetuserid}
+
+\func{wxString}{wxGetUserId}{\void}
+
+\func{bool}{wxGetUserId}{\param{char * }{buf}, \param{int }{sz}}
+
+This function returns the "user id" also known as "login name" under Unix i.e.
+something like "jsmith". It uniquely identifies the current user (on this system).
+
+Under Windows or NT, this function first looks in the environment
+variables USER and LOGNAME; if neither of these is found, the entry {\bf UserId}\rtfsp
+in the {\bf wxWidgets} section of the WIN.INI file is tried.
+
+The first variant of this function returns the login name if successful or an
+empty string otherwise. The second (deprecated) function returns true
+if successful, false otherwise.
+
+\wxheading{See also}
+
+\helpref{wxGetUserName}{wxgetusername}
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
 \membersection{::wxGetUserName}\label{wxgetusername}
 
 \func{wxString}{wxGetUserName}{\void}
@@ -1549,7 +1601,7 @@ enough space.
 
 wxT() is a macro which can be used with character and string literals (in other
 words, {\tt 'x'} or {\tt "foo"}) to automatically convert them to Unicode in
-Unicode build configuration. Please see the 
+Unicode build configuration. Please see the
 \helpref{Unicode overview}{unicode} for more information.
 
 This macro is simply returns the value passed to it without changes in ASCII
@@ -1568,21 +1620,21 @@ build. In fact, its definition is:
 \func{const wxChar *}{wxTRANSLATE}{\param{const char *}{s}}
 
 This macro doesn't do anything in the program code -- it simply expands to the
-value of its argument (except in Unicode build where it is equivalent to 
+value of its argument (except in Unicode build where it is equivalent to
 \helpref{wxT}{wxt} which makes it unnecessary to use both wxTRANSLATE and wxT
 with the same string which would be really unreadable).
 
 However it does have a purpose and it is to mark the literal strings for the
 extraction into the message catalog created by {\tt xgettext} program. Usually
 this is achieved using \helpref{\_()}{underscore} but that macro not only marks
-the string for extraction but also expands into a 
+the string for extraction but also expands into a
 \helpref{wxGetTranslation}{wxgettranslation} function call which means that it
 cannot be used in some situations, notably for static array
 initialization.
 
 Here is an example which should make it more clear: suppose that you have a
 static array of strings containing the weekday names and which have to be
-translated (note that it is a bad example, really, as 
+translated (note that it is a bad example, really, as
 \helpref{wxDateTime}{wxdatetime} already can be used to get the localized week
 day names already). If you write
 
@@ -1625,7 +1677,7 @@ argument instead of arbitrary number of parameters.
 
 \func{const wxChar *}{\_}{\param{const char *}{s}}
 
-This macro expands into a call to \helpref{wxGetTranslation}{wxgettranslation} 
+This macro expands into a call to \helpref{wxGetTranslation}{wxgettranslation}
 function, so it marks the message for the extraction by {\tt xgettext} just as
 \helpref{wxTRANSLATE}{wxtranslate} does, but also returns the translation of
 the string for the current locale during execution.
@@ -1905,8 +1957,9 @@ Dialog is centered on its {\it parent} unless an explicit position is given in
 
 \membersection{::wxGetPasswordFromUser}\label{wxgetpasswordfromuser}
 
-\func{wxString}{wxGetTextFromUser}{\param{const wxString\& }{message}, \param{const wxString\& }{caption = ``Input text"},\\
- \param{const wxString\& }{default\_value = ``"}, \param{wxWindow *}{parent = NULL}}
+\func{wxString}{wxGetPasswordFromUser}{\param{const wxString\& }{message}, \param{const wxString\& }{caption = ``Input text"},\\
+ \param{const wxString\& }{default\_value = ``"}, \param{wxWindow *}{parent = NULL},\\
+ \param{int}{ x = wxDefaultCoord}, \param{int}{ y = wxDefaultCoord}, \param{bool}{ centre = true}}
 
 Similar to \helpref{wxGetTextFromUser}{wxgettextfromuser} but the text entered
 in the dialog is not shown on screen but replaced with stars. This is intended
@@ -1921,7 +1974,7 @@ to be used for entering passwords as the function name implies.
 
 \func{wxString}{wxGetTextFromUser}{\param{const wxString\& }{message}, \param{const wxString\& }{caption = ``Input text"},\\
  \param{const wxString\& }{default\_value = ``"}, \param{wxWindow *}{parent = NULL},\\
- \param{int}{ x = -1}, \param{int}{ y = -1}, \param{bool}{ centre = true}}
+ \param{int}{ x = wxDefaultCoord}, \param{int}{ y = wxDefaultCoord}, \param{bool}{ centre = true}}
 
 Pop up a dialog box with title set to {\it caption}, {\it message}, and a
 \rtfsp{\it default\_value}.  The user may type in text and press OK to return this text,
@@ -2154,7 +2207,7 @@ checkbox which is shown in the tips dialog.}
 
 \func{int}{wxFinite}{\param{double }{x}}
 
-Returns a non-zero value if {\it x} is neither infinite or NaN (not a number), 
+Returns a non-zero value if {\it x} is neither infinite or NaN (not a number),
 returns 0 otherwise.
 
 
@@ -2571,7 +2624,7 @@ This macro returns the concatenation of two tokens \arg{x} and \arg{y}.
 
 \func{}{wxDYNLIB\_FUNCTION}{\param{}{type}, \param{}{name}, \param{}{dynlib}}
 
-When loading a function from a DLL you always have to cast the returned 
+When loading a function from a DLL you always have to cast the returned
 {\tt void *} pointer to the correct type and, even more annoyingly, you have to
 repeat this type twice if you want to declare and define a function pointer all
 in one line
@@ -2579,7 +2632,7 @@ in one line
 This macro makes this slightly less painful by allowing you to specify the
 type only once, as the first parameter, and creating a variable of this type
 named after the function but with {\tt pfn} prefix and initialized with the
-function \arg{name} from the \helpref{wxDynamicLibrary}{wxdynamiclibrary} 
+function \arg{name} from the \helpref{wxDynamicLibrary}{wxdynamiclibrary}
 \arg{dynlib}.
 
 \wxheading{Parameters}
@@ -2798,6 +2851,21 @@ Gets the currently active window (Windows only).
 <wx/windows.h>
 
 
+\membersection{::wxGetBatteryState}\label{wxgetbatterystate}
+
+\func{wxBatteryState}{wxGetBatteryState}{\void}
+
+Returns battery state as one of \texttt{wxBATTERY\_NORMAL\_STATE},
+\texttt{wxBATTERY\_LOW\_STATE}, \texttt{wxBATTERY\_CRITICAL\_STATE},
+\texttt{wxBATTERY\_SHUTDOWN\_STATE} or \texttt{wxBATTERY\_UNKNOWN\_STATE}.
+\texttt{wxBATTERY\_UNKNOWN\_STATE} is also the default on platforms where
+this feature is not implemented.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
 \membersection{::wxGetDisplayName}\label{wxgetdisplayname}
 
 \func{wxString}{wxGetDisplayName}{\void}
@@ -2809,6 +2877,20 @@ Under X only, returns the current display name. See also \helpref{wxSetDisplayNa
 <wx/utils.h>
 
 
+\membersection{::wxGetPowerType}\label{wxgetpowertype}
+
+\func{wxPowerType}{wxGetPowerType}{\void}
+
+Returns the type of power source as one of \texttt{wxPOWER\_SOCKET},
+\texttt{wxPOWER\_BATTERY} or \texttt{wxPOWER\_UNKNOWN}.
+\texttt{wxPOWER\_UNKNOWN} is also the default on platforms where this
+feature is not implemented.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
 \membersection{::wxGetMousePosition}\label{wxgetmouseposition}
 
 \func{wxPoint}{wxGetMousePosition}{\void}
@@ -2855,6 +2937,28 @@ See also \helpref{wxWriteResource}{wxwriteresource}, \helpref{wxConfigBase}{wxco
 <wx/utils.h>
 
 
+\membersection{::wxGetStockLabel}\label{wxgetstocklabel}
+
+\func{wxString}{wxGetStockLabel}{\param{wxWindowID }{id}, \param{bool }{withCodes = true}, \param{wxString }{accelerator = wxEmptyString}}
+
+Returns label that should be used for given {\it id} element.
+
+\wxheading{Parameters}
+
+\docparam{id}{given id of the \helpref{wxMenuItem}{wxmenuitem}, \helpref{wxButton}{wxbutton}, \helpref{wxToolBar}{wxtoolbar} tool, etc.}
+
+\docparam{withCodes}{if false then strip accelerator code from the label;
+usefull for getting labels without accelerator char code like for toolbar tooltip or
+under platforms without traditional keyboard like smartphones}
+
+\docparam{accelerator}{optional accelerator string automatically added to label; useful
+for building labels for \helpref{wxMenuItem}{wxmenuitem}}
+
+\wxheading{Include files}
+
+<wx/stockitem.h>
+
+
 \membersection{::wxGetTopLevelParent}\label{wxgettoplevelparent}
 
 \func{wxWindow *}{wxGetTopLevelParent}{\param{wxWindow }{*win}}
@@ -2987,7 +3091,7 @@ which support it or its replacement for those that don't. It must be used to
 preserve the value of a \texttt{va\_list} object if you need to use it after
 passing it to another function because it can be modified by the latter.
 
-As with \texttt{va\_start}, each call to \texttt{wxVaCopy} must have a matching 
+As with \texttt{va\_start}, each call to \texttt{wxVaCopy} must have a matching
 \texttt{va\_end}.
 
 
@@ -3146,9 +3250,9 @@ class wxCommand: public wxObject
 
 \func{}{DECLARE\_APP}{className}
 
-This is used in headers to create a forward declaration of the 
-\helpref{wxGetApp}{wxgetapp} function implemented by 
-\helpref{IMPLEMENT\_APP}{implementapp}. It creates the declaration 
+This is used in headers to create a forward declaration of the
+\helpref{wxGetApp}{wxgetapp} function implemented by
+\helpref{IMPLEMENT\_APP}{implementapp}. It creates the declaration
 {\tt className\& wxGetApp(void)}.
 
 Example:
@@ -3397,7 +3501,8 @@ Example:
 \helpref{RTTI overview}{runtimeclassoverview}\\
 \helpref{wxDynamicCastThis}{wxdynamiccastthis}\\
 \helpref{wxConstCast}{wxconstcast}\\
-\helpref{wxStatiicCast}{wxstaticcast}
+\helpref{wxStaticCast}{wxstaticcast}\\
+\helpref{wx\_dynamic\_cast}{wxdynamiccastraw}
 
 
 \membersection{wxDynamicCastThis}\label{wxdynamiccastthis}
@@ -3433,13 +3538,30 @@ result of executing an equivalent of {\tt static\_cast<classname *>(ptr)}.
 
 \func{T}{wx\_const\_cast}{T, x}
 
-Same as \texttt{const\_cast<T>(x)} if the compiler supports const cast or 
+Same as \texttt{const\_cast<T>(x)} if the compiler supports const cast or
 \texttt{(T)x} for old compilers. Unlike \helpref{wxConstCast}{wxconstcast},
 the cast it to the type \arg{T} and not to \texttt{T *} and also the order of
 arguments is the same as for the standard cast.
 
 \wxheading{See also}
 
+\helpref{wx\_dynamic\_cast}{wxdynamiccastraw},\\
+\helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw},\\
+\helpref{wx\_static\_cast}{wxstaticcastraw}
+
+
+\membersection{wx\_dynamic\_cast}\label{wxdynamiccastraw}
+
+\func{T}{wx\_dynamic\_cast}{T, x}
+
+Same as \texttt{dynamic\_cast<T>(x)} if the compiler supports dynamic cast or
+\texttt{(T)x} for old compilers. Unlike \helpref{wxDynamicCast}{wxdynamiccast},
+the cast it to the type \arg{T} and not to \texttt{T *} and also the order of
+arguments is the same as for the standard cast.
+
+\wxheading{See also}
+
+\helpref{wx\_const\_cast}{wxconstcastraw},\\
 \helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw},\\
 \helpref{wx\_static\_cast}{wxstaticcastraw}
 
@@ -3448,12 +3570,13 @@ arguments is the same as for the standard cast.
 
 \func{T}{wx\_reinterpret\_cast}{T, x}
 
-Same as \texttt{reinterpret\_cast<T>(x)} if the compiler supports reinterpret cast or 
+Same as \texttt{reinterpret\_cast<T>(x)} if the compiler supports reinterpret cast or
 \texttt{(T)x} for old compilers.
 
 \wxheading{See also}
 
 \helpref{wx\_const\_cast}{wxconstcastraw},\\
+\helpref{wx\_dynamic\_cast}{wxdynamiccastraw},\\
 \helpref{wx\_static\_cast}{wxstaticcastraw}
 
 
@@ -3461,7 +3584,7 @@ Same as \texttt{reinterpret\_cast<T>(x)} if the compiler supports reinterpret ca
 
 \func{T}{wx\_static\_cast}{T, x}
 
-Same as \texttt{static\_cast<T>(x)} if the compiler supports static cast or 
+Same as \texttt{static\_cast<T>(x)} if the compiler supports static cast or
 \texttt{(T)x} for old compilers. Unlike \helpref{wxStaticCast}{wxstaticcast},
 there are no checks being done and the meaning of the macro arguments is exactly
 the same as for the standard static cast, i.e. \arg{T} is the full type name and
@@ -3470,6 +3593,7 @@ star is not appended to it.
 \wxheading{See also}
 
 \helpref{wx\_const\_cast}{wxconstcastraw},\\
+\helpref{wx\_dynamic\_cast}{wxdynamiccastraw},\\
 \helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw}
 
 
@@ -3690,7 +3814,7 @@ this might lead to function signature confusion in some cases:
 if you intend to call the format string only version of wxLogTrace,
 then add a \%s format string parameter and then supply a second string parameter for that \%s, the string mask version of wxLogTrace will erroneously get called instead, since you are supplying two string parameters to the function.
 In this case you'll unfortunately have to avoid having two leading
-string parameters, e.g. by adding a bogus integer (with its \%d format string). 
+string parameters, e.g. by adding a bogus integer (with its \%d format string).
 
 The third version of the function only logs the message if all the bits
 corresponding to the {\it mask} are set in the wxLog trace mask which can be
@@ -3908,7 +4032,7 @@ Returns the number of seconds since GMT 00:00:00 Jan 1st 1970.
 
 Sleeps for the specified number of microseconds. The microsecond resolution may
 not, in fact, be available on all platforms (currently only Unix platforms with
-nanosleep(2) may provide it) in which case this is the same as 
+nanosleep(2) may provide it) in which case this is the same as
 \helpref{wxMilliSleep}{wxmillisleep}(\arg{microseconds}$/1000$).
 
 \wxheading{Include files}
@@ -3969,8 +4093,8 @@ See also \helpref{wxTimer}{wxtimer}.
 \func{void}{wxUsleep}{\param{unsigned long}{ milliseconds}}
 
 This function is deprecated because its name is misleading: notice that the
-argument is in milliseconds, not microseconds. Please use either 
-\helpref{wxMilliSleep}{wxmillisleep} or \helpref{wxMicroSleep}{wxmicrosleep} 
+argument is in milliseconds, not microseconds. Please use either
+\helpref{wxMilliSleep}{wxmillisleep} or \helpref{wxMicroSleep}{wxmicrosleep}
 depending on the resolution you need.
 
 
@@ -4188,11 +4312,10 @@ In release mode this function does nothing.
 
 \func{bool}{wxIsDebuggerRunning}{\void}
 
-Returns {\tt true} if the program is running under debugger, {\tt false} 
-otherwise.
+Returns \true if the program is running under debugger, \false otherwise.
 
-Please note that this function is currently only implemented for Mac builds
-using CodeWarrior and always returns {\tt false} elsewhere.
+Please note that this function is currently only implemented for Win32 and Mac
+builds using CodeWarrior and always returns \false elsewhere.
 
 
 
