X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b82827dd43caa489eade15cc02edef7fb79e8c20..80d2803f703d1b238f42725504f08266ef02defe:/docs/latex/wx/app.tex?ds=sidebyside diff --git a/docs/latex/wx/app.tex b/docs/latex/wx/app.tex index 4581eabe5d..2add770cd4 100644 --- a/docs/latex/wx/app.tex +++ b/docs/latex/wx/app.tex @@ -22,6 +22,10 @@ a reference to your application object) to be visible to other files. \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \wxheading{See also} \helpref{wxApp overview}{wxappoverview} @@ -34,8 +38,9 @@ a reference to your application object) to be visible to other files. Constructor. Called implicitly with a definition of a wxApp object. -The argument is a language identifier; this is an experimental -feature and will be expanded and documented in future versions. +% VZ: there is no such feature so far... +% The argument is a language identifier; this is an experimental +% feature and will be expanded and documented in future versions. \membersection{wxApp::\destruct{wxApp}} @@ -116,22 +121,16 @@ manner to refer to the application. \helpref{wxApp::SetClassName}{wxappsetclassname} -\membersection{wxApp::GetExitOnDelete}\label{wxappgetexitondelete} +\membersection{wxApp::GetExitOnFrameDelete}\label{wxappgetexitonframedelete} -\constfunc{bool}{GetExitOnDelete}{\void} +\constfunc{bool}{GetExitFrameOnDelete}{\void} Returns TRUE if the application will exit when the top-level window is deleted, FALSE otherwise. \wxheading{See also} -\helpref{wxApp::SetExitOnDelete}{wxappsetexitondelete} - -\membersection{wxApp::GetPrintMode}\label{wxappgetprintmode} - -\constfunc{bool}{GetPrintMode}{\void} - -Returns the print mode: see \helpref{wxApp::SetPrintMode}{wxappsetprintmode}. +\helpref{wxApp::SetExitOnFrameDelete}{wxappsetexitonframedelete} \membersection{wxApp::GetTopWindow}\label{wxappgettopwindow} @@ -139,9 +138,31 @@ Returns the print mode: see \helpref{wxApp::SetPrintMode}{wxappsetprintmode}. Returns a pointer to the top window. +\wxheading{Remarks} + +If the top window hasn't been set using \helpref{wxApp::SetTopWindow}{wxappsettopwindow}, this +function will find the first top-level window (frame or dialog) and return that. + +\wxheading{See also} + +\helpref{SetTopWindow}{wxappsettopwindow} + +\membersection{wxApp::GetUseBestVisual}\label{wxappgetusebestvisual} + +\constfunc{bool}{GetUseBestVisual}{\void} + +Returns TRUE if the application will use the best visual on systems that support +different visuals, FALSE otherwise. + \wxheading{See also} -\helpref{wxApp::SetTopWindow}{wxappsettopwindow} +\helpref{SetUseBestVisual}{wxappsetusebestvisual} + +\membersection{wxApp::GetVendorName}\label{wxappgetvendorname} + +\constfunc{wxString}{GetVendorName}{\void} + +Returns the application's vendor name. \membersection{wxApp::ExitMainLoop}\label{wxappexitmainloop} @@ -213,6 +234,23 @@ If you use this member, you can selectively consume keypress events by calling\r \helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp \helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook} +\membersection{wxApp::OnFatalException}\label{wxapponfatalexception} + +\func{void}{OnFatalException}{\void} + +This function may be called if something fatal happens: an unhandled +exception under Win32 or a a fatal signal under Unix, for example. However, +this will not happen by default: you have to explicitly call +\helpref{wxHandleFatalExceptions}{wxhandlefatalexceptions} to enable this. + +Generally speaking, this function should only show a message to the user and +return. You may attempt to save unsaved data but this is not guaranteed to +work and, in fact, probably won't. + +\wxheading{See also} + +\helpref{wxHandleFatalExcetions}{wxhandlefatalexceptions} + \membersection{wxApp::OnIdle}\label{wxapponidle} \func{void}{OnIdle}{\param{wxIdleEvent\& }{event}} @@ -226,7 +264,7 @@ wxWindows' strategy for OnIdle processing is as follows. After pending user inte application have all been processed, wxWindows sends an OnIdle event to the application object. wxApp::OnIdle itself sends an OnIdle event to each application window, allowing windows to do idle processing such as updating their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by -caling \helpref{wxIdleEvent::ReqestMore}{wxidleeventrequestmore}, wxWindows will send another OnIdle +caling \helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}, wxWindows will send another OnIdle event to the application object. This will occur in a loop until either a user event is found to be pending, or OnIdle requests no more time. Then all pending user events are processed until the system goes idle again, when OnIdle is called, and so on. @@ -251,7 +289,7 @@ The default handler calls \helpref{wxWindow::Close}{wxwindowclose} with a TRUE a \wxheading{Remarks} -Under X, OnEndSession is called in response to the 'die' event. +Under X, OnEndSession is called in response to the `die' event. Under Windows, OnEndSession is called in response to the WM\_ENDSESSION message. @@ -267,7 +305,7 @@ Under Windows, OnEndSession is called in response to the WM\_ENDSESSION message. \func{bool}{OnInit}{\void} This must be provided by the application, and will usually create the -application's main window, calling \helpref{wxApp::SetTopWindow}{wxappsettopwindow}. +application's main window, optionally calling \helpref{wxApp::SetTopWindow}{wxappsettopwindow}. Return TRUE to continue processing, FALSE to exit the application. @@ -296,7 +334,7 @@ and vetoes the shutdown if Close returns FALSE. This will be sufficient for many \wxheading{Remarks} -Under X, OnQueryEndSession is called in response to the 'save session' event. +Under X, OnQueryEndSession is called in response to the `save session' event. Under Windows, OnQueryEndSession is called in response to the WM\_QUERYENDSESSION message. @@ -335,8 +373,7 @@ BOOL CTheApp::PreTranslateMessage(MSG *msg) \func{bool}{Pending}{\void} -Returns TRUE if unprocessed events are in the window system event queue -(MS Windows and Motif). +Returns TRUE if unprocessed events are in the window system event queue. \wxheading{See also} @@ -403,9 +440,9 @@ manner to refer to the application. \helpref{wxApp::GetClassName}{wxappgetclassname} -\membersection{wxApp::SetExitOnDelete}\label{wxappsetexitondelete} +\membersection{wxApp::SetExitOnFrameDelete}\label{wxappsetexitonframedelete} -\func{void}{SetExitOnDelete}{\param{bool}{ flag}} +\func{void}{SetExitOnFrameDelete}{\param{bool}{ flag}} Allows the programmer to specify whether the application will exit when the top-level frame is deleted. @@ -415,41 +452,67 @@ top-level frame is deleted. \docparam{flag}{If TRUE (the default), the application will exit when the top-level frame is deleted. If FALSE, the application will continue to run.} -\wxheading{Remarks} +\membersection{wxApp::SetTopWindow}\label{wxappsettopwindow} -Currently, setting this to FALSE only has an effect under Windows. +\func{void}{SetTopWindow}{\param{wxWindow* }{window}} -\membersection{wxApp::SetPrintMode}\label{wxappsetprintmode} +Sets the `top' window. You can call this from within \helpref{wxApp::OnInit}{wxapponinit} to +let wxWindows know which is the main window. You don't have to set the top window; +it is only a convenience so that (for example) certain dialogs without parents can use a +specific window as the top window. If no top window is specified by the application, +wxWindows just uses the first frame or dialog in its top-level window list, when it +needs to use the top window. -\func{void}{SetPrintMode}{\param{int}{ mode}} +\wxheading{Parameters} -Sets the print mode determining what printing facilities will be -used by the printing framework. +\docparam{window}{The new top window.} -\wxheading{Parameters} +\wxheading{See also} -\docparam{mode}{This can be one of: +\helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxPRINT\_WINDOWS}}{Under Windows, use Windows printing (wxPrinterDC). This is the -default under Windows.} -\twocolitem{{\bf wxPRINT\_POSTSCRIPT}}{Use PostScript printing (wxPostScriptDC). This is the -default for non-Windows platforms.} -\end{twocollist} -}% -\membersection{wxApp::SetTopWindow}\label{wxappsettopwindow} +\membersection{wxApp::SetVendorName}\label{wxappsetvendorname} -\func{void}{SetTopWindow}{\param{wxWindow* }{window}} +\func{void}{SetVendorName}{\param{const wxString\& }{name}} + +Sets the name of application's vendor. The name will be used +in registry access. A default name is set by +wxWindows. + +\wxheading{See also} + +\helpref{wxApp::GetVendorName}{wxappgetvendorname} -Sets the `top' window. You should normally call this from within \helpref{wxApp::OnInit}{wxapponinit} to -let wxWindows know which is the main window. +\membersection{wxApp::GetStdIcon}\label{wxappgetstdicon} + +\func{virtual wxIcon}{GetStdIcon}{\param{int }{which}} const + +Returns the icons used by wxWindows internally, e.g. the ones used for +message boxes. This function is used internally and +can be overridden by the user to change the default icons. \wxheading{Parameters} -\docparam{window}{The new top window.} +\docparam{which}{One of the wxICON\_XXX specifies which icon to return.} -\wxheading{See also} +See \helpref{wxMessageBox}{wxmessagebox} for a list of icon identifiers. -\helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit} +\membersection{wxApp::SetUseBestVisual}\label{wxappsetusebestvisual} + +\func{void}{SetUseBestVisual}{\param{bool}{ flag}} + +Allows the programmer to specify whether the application will use the best visual +on systems that support several visual on the same display. This is typically the +case under Solaris and IRIX, where the default visual is only 8-bit whereas certain +appications are supposed to run in TrueColour mode. + +Note that this function has to be called in the constructor of the {\tt wxApp} +instance and won't have any effect when called later on. + +This function currently only has effect under GTK. + +\wxheading{Parameters} + +\docparam{flag}{If TRUE, the app will use the best visual.}