X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7cacb43db1e69b87b257a67912b4d52995b070a..a387938f80a2804f259e7305513231be39620fd2:/docs/latex/wx/function.tex diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index ad94c6e4f5..47d46b1b40 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -58,6 +58,7 @@ the corresponding topic. \helpref{wxCONCAT}{wxconcat}\\ \helpref{wxConcatFiles}{wxconcatfiles}\\ \helpref{wxConstCast}{wxconstcast}\\ +\helpref{wxCoordRound}{wxcoordround}\\ \helpref{wxCopyFile}{wxcopyfile}\\ \helpref{wxCreateDynamicObject}{wxcreatedynamicobject}\\ \helpref{wxCreateFileTipProvider}{wxcreatefiletipprovider}\\ @@ -84,6 +85,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}\\ @@ -366,26 +369,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: -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. +\func{int}{wxEntry}{\param{int\&}{ argc}, \param{wxChar **}{argv}} -\func{void}{wxEntry}{\param{HANDLE}{ hInstance}, \param{HANDLE}{ hPrevInstance}, - \param{WORD}{ wDataSegment}, \param{WORD}{ wHeapSize}, \param{const wxString\& }{ commandLine}} +Under MS Windows, an additional overload suitable for calling from +\texttt{WinMain} is available: -wxWidgets initialization under Windows (for applications constructed as a DLL). +\func{int}{wxEntry}{\param{HINSTANCE }{hInstance}, \param{HINSTANCE }{hPrevInstance = \NULL}, \param{char *}{pCmdLine = \NULL}, \param{int }{nCmdShow = \texttt{SW\_SHOWNORMAL}}} -\func{int}{wxEntry}{\param{int}{ argc}, \param{const wxString\& *}{argv}} +(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). -wxWidgets initialization under Unix. +\wxheading{See also} + +\helpref{wxEntryStart}{wxentrystart} \wxheading{Remarks} @@ -409,6 +413,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} + + + + +\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} + + + + \membersection{::wxGetApp}\label{wxgetapp} \func{wxAppDerivedClass\&}{wxGetApp}{\void} @@ -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} @@ -2811,6 +2847,21 @@ 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{::wxCoordRound}\label{wxcoordround} + +\func{wxCoord}{wxCoordRound}{\param{const float\& }{f}} + +\func{wxCoord}{wxCoordRound}{\param{const double\& }{f}} + +Convert \em{f} to a wxCoord, using round-to-nearest. This is commonly used +in scaling calculations. + +\wxheading{Include files} + + + + \membersection{::wxGetKeyState}\label{wxgetkeystate} \func{bool}{wxGetKeyState}{\param{wxKeyCode }{key}}