X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20d9c24a6f17b93702ba5e4041ee497da22ef7e2..4f690a1d5e6192d0861686982e89f9f17a21e679:/docs/latex/wx/function.tex?ds=sidebyside

diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index bf0618a1e7..3f35029b21 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -84,6 +84,8 @@ the corresponding topic.
 \helpref{wxEndBusyCursor}{wxendbusycursor}\\
 \helpref{wxENTER\_CRIT\_SECT}{wxentercritsect}\\
 \helpref{wxEntry}{wxentry}\\
+\helpref{wxEntryStart}{wxentrystart}\\
+\helpref{wxEntryCleanup}{wxentrycleanup}\\
 \helpref{wxEnumClipboardFormats}{wxenumclipboardformats}\\
 \helpref{wxError}{wxerror}\\
 \helpref{wxExecute}{wxexecute}\\
@@ -310,10 +312,10 @@ and so normally is not useful.
 
 \membersection{wxCHECK\_GCC\_VERSION}\label{wxcheckgccversion}
 
-\func{bool}{wxCHECK\_GCC\_VERSION}{\param{}{major, minor, release}}
+\func{bool}{wxCHECK\_GCC\_VERSION}{\param{}{major, minor}}
 
 Returns $1$ if the compiler being used to compile the code is GNU C++
-compiler (g++) version major.minor.release or greater. Otherwise, and also if
+compiler (g++) version major.minor or greater. Otherwise, and also if
 the compiler is not GNU C++ at all, returns $0$.
 
 
@@ -366,26 +368,27 @@ to control the behaviour of the main event loop of the GUI programs.
 
 \membersection{::wxEntry}\label{wxentry}
 
-This initializes wxWidgets in a platform-dependent way. Use this if you
-are not using the default wxWidgets entry code (e.g. main or WinMain). For example,
-you can initialize wxWidgets from an Microsoft Foundation Classes application using
+This initializes wxWidgets in a platform-dependent way. Use this if you are not
+using the default wxWidgets entry code (e.g. main or WinMain). For example, you
+can initialize wxWidgets from an Microsoft Foundation Classes application using
 this function.
 
-\func{void}{wxEntry}{\param{HANDLE}{ hInstance}, \param{HANDLE}{ hPrevInstance},
- \param{const wxString\& }{commandLine}, \param{int}{ cmdShow}, \param{bool}{ enterLoop = true}}
+The following overload of wxEntry is available under all platforms:
+
+\func{int}{wxEntry}{\param{int\&}{ argc}, \param{wxChar **}{argv}}
 
-wxWidgets initialization under Windows (non-DLL). If {\it enterLoop} is false, the
-function will return immediately after calling wxApp::OnInit. Otherwise, the wxWidgets
-message loop will be entered.
+Under MS Windows, an additional overload suitable for calling from 
+\texttt{WinMain} is available:
 
-\func{void}{wxEntry}{\param{HANDLE}{ hInstance}, \param{HANDLE}{ hPrevInstance},
- \param{WORD}{ wDataSegment}, \param{WORD}{ wHeapSize}, \param{const wxString\& }{ commandLine}}
+\func{int}{wxEntry}{\param{HINSTANCE }{hInstance}, \param{HINSTANCE }{hPrevInstance = \NULL}, \param{char *}{pCmdLine = \NULL}, \param{int }{nCmdShow = \texttt{SW\_SHOWNORMAL}}}
 
-wxWidgets initialization under Windows (for applications constructed as a DLL).
+(notice that under Windows CE platform, and only there, the type of 
+\arg{pCmdLine} is \texttt{wchar\_t *}, otherwise it is \texttt{char *}, even in
+Unicode build).
 
-\func{int}{wxEntry}{\param{int}{ argc}, \param{const wxString\& *}{argv}}
+\wxheading{See also}
 
-wxWidgets initialization under Unix.
+\helpref{wxEntryStart}{wxentrystart}
 
 \wxheading{Remarks}
 
@@ -409,6 +412,38 @@ int CTheApp::ExitInstance()
 
 
 
+\membersection{::wxEntryCleanup}\label{wxentrycleanup}
+
+\func{void}{wxEntryCleanup}{\void}
+
+Free resources allocated by a successful call to \helpref{wxEntryStart}{wxentrystart}.
+
+\wxheading{Include files}
+
+<wx/init.h>
+
+
+\membersection{::wxEntryStart}\label{wxentrystart}
+
+\func{bool}{wxEntryStart}{\param{int\&}{ argc}, \param{wxChar **}{argv}}
+
+This function can be used to perform the initialization of wxWidgets if you
+can't use the default initialization code for any reason.
+
+If the function returns \true, the initialization was successful and the global 
+\helpref{wxApp}{wxapp} object \texttt{wxTheApp} has been created. Moreover, 
+\helpref{wxEntryCleanup}{wxentrycleanup} must be called afterwards. If the
+function returns \false, a catastrophic initialization error occured and (at
+least the GUI part of) the library can't be used at all.
+
+Notice that parameters \arg{argc} and \arg{argv} may be modified by this
+function.
+
+\wxheading{Include files}
+
+<wx/init.h>
+
+
 \membersection{::wxGetApp}\label{wxgetapp}
 
 \func{wxAppDerivedClass\&}{wxGetApp}{\void}
@@ -961,7 +996,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).
+The function returns \texttt{(time\_t)}$-1$ if an error occurred (e.g. file not
+found).
 
 
 \membersection{::wxFileNameFromPath}\label{wxfilenamefrompath}
@@ -1078,9 +1114,9 @@ or drive name at the beginning.
 
 \membersection{::wxDirExists}\label{functionwxdirexists}
 
-\func{bool}{wxDirExists}{\param{const wxString\& }{dirname}}
+\func{bool}{wxDirExists}{\param{const wxChar *}{dirname}}
 
-Returns true if the path exists.
+Returns true if \arg{dirname} exists and is a directory.
 
 
 \membersection{::wxPathOnly}\label{wxpathonly}
@@ -1238,6 +1274,11 @@ Removes the directory {\it dir}, returning true if successful. Does not work und
 
 The {\it flags} parameter is reserved for future use.
 
+Please notice that there is also a wxRmDir() function which simply wraps the
+standard POSIX rmdir() function and so return an integer error code instead of
+a boolean value (but otherwise is currently identical to wxRmdir), don't
+confuse these two functions.
+
 
 \membersection{::wxSetWorkingDirectory}\label{wxsetworkingdirectory}
 
@@ -2004,7 +2045,7 @@ customization.
 \func{wxColour}{wxGetColourFromUser}{\param{wxWindow *}{parent}, \param{const wxColour\& }{colInit}, \param{const wxString\& }{caption = wxEmptyString}}
 
 Shows the colour selection dialog and returns the colour selected by user or
-invalid colour (use \helpref{wxColour::Ok}{wxcolourok} to test whether a colour
+invalid colour (use \helpref{wxColour:IsOk}{wxcolourisok} to test whether a colour
 is valid) if the dialog was cancelled.
 
 \wxheading{Parameters}
@@ -2025,7 +2066,7 @@ is valid) if the dialog was cancelled.
 \func{wxFont}{wxGetFontFromUser}{\param{wxWindow *}{parent}, \param{const wxFont\& }{fontInit}, \param{const wxString\& }{caption = wxEmptyString}}
 
 Shows the font selection dialog and returns the font selected by user or
-invalid font (use \helpref{wxFont::Ok}{wxfontok} to test whether a font
+invalid font (use \helpref{wxFont:IsOk}{wxfontisok} to test whether a font
 is valid) if the dialog was cancelled.
 
 \wxheading{Parameters}
@@ -2811,6 +2852,7 @@ code which might have to be compiled with an old compiler without support for
 this language feature but still take advantage of it when it is available.
 
 
+
 \membersection{::wxGetKeyState}\label{wxgetkeystate}
 
 \func{bool}{wxGetKeyState}{\param{wxKeyCode }{key}}
@@ -3053,7 +3095,7 @@ always returns \NULL in the other ports).
 
 \wxheading{Include files}
 
-<wx/windows.h>
+<wx/window.h>
 
 
 \membersection{::wxGetBatteryState}\label{wxgetbatterystate}
@@ -3235,6 +3277,10 @@ Open the \arg{url} in user's default browser. If \arg{flags} parameter contains
 
 Returns \true if the application was successfully launched.
 
+Note that for some configurations of the running user, the application which
+is launched to open the given URL may be URL-dependent (e.g. a browser may be used for
+local URLs while another one may be used for remote URLs).
+
 \wxheading{Include files}
 
 <wx/utils.h>
