X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fab86f26bf792dc79c67968dad906e4afa00a98c..42d9ad7949254ed53f89ad6306dcb2a266bfffb3:/docs/latex/wx/app.tex diff --git a/docs/latex/wx/app.tex b/docs/latex/wx/app.tex index d29ee9d6db..adefdadd83 100644 --- a/docs/latex/wx/app.tex +++ b/docs/latex/wx/app.tex @@ -26,6 +26,10 @@ a reference to your application object) to be visible to other files. +\wxheading{Library} + +\helpref{wxBase}{librarieslist} + \wxheading{See also} \helpref{wxApp overview}{wxappoverview} @@ -60,7 +64,13 @@ Number of command line arguments (after environment-specific processing). \member{wxChar **}{argv} Command line arguments (after environment-specific processing). +Under Windows and Linux/Unix, you should parse the command line +arguments and check for files to be opened when starting your +application. Under OS X, you need to override \helpref{MacOpenFile}{wxappmacopenfile} +since command line arguments are used differently there. +You may use the \helpref{wxCmdLineParser}{wxcmdlineparser} to +parse command line arguments. \membersection{wxApp::CreateLogTarget}\label{wxappcreatelogtarget} @@ -125,6 +135,21 @@ had been already processed (for the former return value) or that it is not going to be processed at all (for the latter one). +\membersection{wxApp::GetAppDisplayName}\label{wxappgetappdisplayname} + +\constfunc{wxString}{GetAppDisplayName}{\void} + +Returns the user-readable application name. The difference between this string +and the one returned by \helpref{GetAppName}{wxappgetappname} is that this one +is meant to be shown to the user and so should be used for the window titles, +page headers and so on while the other one should be only used internally, e.g. +for the file names or configuration file keys. + +By default, returns the same string as \helpref{GetAppName}{wxappgetappname}. + +\newsince{2.9.0} + + \membersection{wxApp::GetAppName}\label{wxappgetappname} \constfunc{wxString}{GetAppName}{\void} @@ -136,6 +161,10 @@ Returns the application name. wxWidgets sets this to a reasonable default before calling \helpref{wxApp::OnInit}{wxapponinit}, but the application can reset it at will. +\wxheading{See also} + +\helpref{GetAppDisplayName}{wxappgetappdisplayname} + \membersection{wxApp::GetClassName}\label{wxappgetclassname} @@ -213,6 +242,21 @@ different visuals, false otherwise. \helpref{SetUseBestVisual}{wxappsetusebestvisual} +\membersection{wxApp::GetVendorDisplayName}\label{wxappgetvendordisplayname} + +\constfunc{wxString}{GetVendorDisplayName}{\void} + +Returns the user-readable vendor name. The difference between this string +and the one returned by \helpref{GetVendorName}{wxappgetvendorname} is that this one +is meant to be shown to the user and so should be used for the window titles, +page headers and so on while the other one should be only used internally, e.g. +for the file names or configuration file keys. + +By default, returns the same string as \helpref{GetVendorName}{wxappgetvendorname}. + +\newsince{2.9.0} + + \membersection{wxApp::GetVendorName}\label{wxappgetvendorname} \constfunc{wxString}{GetVendorName}{\void} @@ -243,6 +287,42 @@ if this function returns \false, non-blocking sockets cannot be used because the events from them would never be processed. +\membersection{wxApp::MacNewFile}\label{wxappmacnewfile} + +\func{void}{MacNewFile}{\void} + +Mac specific. Called in response of an "open-application" Apple event. +Override this to create a new document in your app. + +\membersection{wxApp::MacOpenFile}\label{wxappmacopenfile} + +\func{void}{MacOpenFile}{\param{const wxString\& }{fileName}} + +Mac specific. Called in response of an "open-document" Apple event. You need to +override this method in order to open a document file after the +user double clicked on it or if the document file was dropped +on either the running application or the application icon in +Finder. + +\membersection{wxApp::MacOpenURL}\label{wxappmacopenurl} + +\func{void}{MacOpenURL}{\param{const wxString\& }{url}} + +Mac specific. Called in response of a "get-url" Apple event. + +\membersection{wxApp::MacPrintFile}\label{wxappmacprintfile} + +\func{void}{MacPrintFile}{\param{const wxString\& }{fileName}} + +Mac specific. Called in response of a "print-document" Apple event. + + +\membersection{wxApp::MacReopenApp}\label{wxappmacreopenapp} + +\func{void}{MacReopenApp}{\void} + +Mac specific. Called in response of a "reopen-application" Apple event. + \membersection{wxApp::MainLoop}\label{wxappmainloop} \func{virtual int}{MainLoop}{\void} @@ -519,10 +599,13 @@ should return $0$ in case of successful termination. This function is called when an unhandled C++ exception occurs inside \helpref{OnRun()}{wxapponrun} (the exceptions which occur during the program -startup and shutdown might not be caught at all). -Note that the exception type is lost by now, so if you want to really handle -the exception you should override \helpref{OnRun()}{wxapponrun} and put a -try/catch clause around the call to the base class version there. +startup and shutdown might not be caught at all). Notice that by now the main +event loop has been terminated and the program will exit, if you want to +prevent this from happening (i.e. continue running after catching an exception) +you need to override \helpref{OnExceptionInMainLoop}{wxapponexceptioninmainloop}. + +The default implementation shows information about the exception in debug build +but does nothing in the release build. \membersection{wxApp::ProcessMessage}\label{wxappprocessmessage} @@ -580,13 +663,25 @@ If true is returned, more OnIdle processing is requested by one or more window. \helpref{wxIdleEvent}{wxidleevent} +\membersection{wxApp::SetAppDisplayName}\label{wxappsetappdisplayname} + +\func{void}{SetAppDisplayName}{\param{const wxString\& }{name}} + +Set the application name to be used in the user-visible places such as window +titles. See \helpref{GetAppDisplayName}{wxappgetappdisplayname} for more about +the differences between the display name and name. + + \membersection{wxApp::SetAppName}\label{wxappsetappname} \func{void}{SetAppName}{\param{const wxString\& }{name}} -Sets the name of the application. The name may be used in dialogs -(for example by the document/view framework). A default name is set by -wxWidgets. +Sets the name of the application. This name should be used for file names, +configuration file entries and other internal strings. For the user-visible +strings, such as the window titles, the application display name set by +\helpref{SetAppDisplayName}{wxappsetappdisplayname} is used instead. + +By default the application name is set to the name of its executable file. \wxheading{See also} @@ -659,6 +754,14 @@ needs to use the top window. \helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit} +\membersection{wxApp::SetVendorDisplayName}\label{wxappsetvendordisplayname} + +\func{void}{SetVendorDisplayName}{\param{const wxString\& }{name}} + +Set the vendor name to be used in the user-visible places. See +\helpref{GetVendorDisplayName}{wxappgetvendordisplayname} for more about +the differences between the display name and name. + \membersection{wxApp::SetVendorName}\label{wxappsetvendorname}