X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/effdccd8fda96caf3db17934864ef1ee236a1730..e815120e412d91e79c98dd0afac2a1e399f10810:/docs/latex/wx/stdpaths.tex diff --git a/docs/latex/wx/stdpaths.tex b/docs/latex/wx/stdpaths.tex index a0aae80c3a..6d5da635e8 100644 --- a/docs/latex/wx/stdpaths.tex +++ b/docs/latex/wx/stdpaths.tex @@ -22,8 +22,8 @@ the Windows directory may be named \texttt{W:$\backslash$Win2003} instead of the default \texttt{C:$\backslash$Windows}. The strings \texttt{\textit{appname}} and \texttt{\textit{username}} should be -replaced with the value returned by \helpref{wxApp::GetAppName}{wxappgetappname} -and the name of the currently logged in user, respectively. The string +replaced with the value returned by \helpref{wxApp::GetAppName}{wxappgetappname} +and the name of the currently logged in user, respectively. The string \texttt{\textit{prefix}} is only used under Unix and is \texttt{/usr/local} by default but may be changed using \helpref{SetInstallPrefix}{wxstandardpathssetinstallprefix}. @@ -47,20 +47,24 @@ No base class +\wxheading{Library} + +\helpref{wxBase}{librarieslist} + \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxStandardPaths::Get}\label{wxstandardpathsget} -\func{static wxStandardPaths\&}{Get}{\void} +\func{static wxStandardPathsBase\&}{Get}{\void} Returns reference to the unique global standard paths object. \membersection{wxStandardPaths::GetConfigDir}\label{wxstandardpathsgetconfigdir} -\func{wxString}{GetConfigDir}{\void} +\constfunc{wxString}{GetConfigDir}{\void} Return the directory containing the system config files. @@ -78,7 +82,7 @@ Example return values: \membersection{wxStandardPaths::GetDataDir}\label{wxstandardpathsgetdatadir} -\func{wxString}{GetDataDir}{\void} +\constfunc{wxString}{GetDataDir}{\void} Return the location of the applications global, i.e. not user-specific, data files. @@ -95,16 +99,47 @@ Example return values: \helpref{GetLocalDataDir}{wxstandardpathsgetlocaldatadir} +\membersection{wxStandardPaths::GetDocumentsDir}\label{wxstandardpathsgetdocumentsdir} + +\constfunc{wxString}{GetDocumentsDir}{\void} + +Return the directory containing the current user's documents. + +Example return values: +\begin{itemize} + \item Unix: \tt{~} (the home directory) + \item Windows: \texttt{C:$\backslash$Documents and Settings$\backslash$\textit{username}$\backslash$Documents} + \item Mac: \texttt{~/Documents} +\end{itemize} + +\newsince{2.7.0} + + +\membersection{wxStandardPaths::GetExecutablePath}\label{wxstandardpathsgetexecutablepath} + +\constfunc{wxString}{GetExecutablePath}{\void} + +Return the directory and the filename for the current executable. + +Example return values: +\begin{itemize} + \item Unix: \texttt{/usr/local/bin/exename} + \item Windows: \texttt{C:$\backslash$Programs$\backslash$AppFolder$\backslash$exename.exe} + \item Mac: \texttt{/Programs/exename} +\end{itemize} + + + \membersection{wxStandardPaths::GetInstallPrefix}\label{wxstandardpathsgetinstallprefix} -\func{wxString}{GetInstallPrefix}{\void} +\constfunc{wxString}{GetInstallPrefix}{\void} \textbf{Note: } This function is only available under Unix. -Return the program installation prefix, e.g. \texttt{/usr}, \texttt{/opt} or +Return the program installation prefix, e.g. \texttt{/usr}, \texttt{/opt} or \texttt{/home/zeitlin}. -If the prefix had been previously by +If the prefix had been previously by \helpref{SetInstallPrefix}{wxstandardpathssetinstallprefix}, returns that value, otherwise tries to determine it automatically (Linux only right now) and finally returns the default \texttt{/usr/local} value if it failed. @@ -112,7 +147,7 @@ now) and finally returns the default \texttt{/usr/local} value if it failed. \membersection{wxStandardPaths::GetLocalDataDir}\label{wxstandardpathsgetlocaldatadir} -\func{wxString}{GetLocalDataDir}{\void} +\constfunc{wxString}{GetLocalDataDir}{\void} Return the location for application data files which are host-specific and can't, or shouldn't, be shared with the other machines. @@ -121,9 +156,25 @@ This is the same as \helpref{GetDataDir()}{wxstandardpathsgetdatadir} except under Unix where it returns \texttt{/etc/\textit{appname}}. +\membersection{wxStandardPaths::GetLocalizedResourcesDir}\label{wxstandardpathsgetlocalizedresourcesdir} + +\constfunc{wxString}{GetLocalizedResourcesDir}{\param{const wxString\&}{ lang}, \param{ResourceCat}{ category = ResourceCat\_None}} + +Return the localized resources directory containing the resource files of the +specified category for the given language. + +In general this is just the same as \arg{lang} subdirectory of +\helpref{GetResourcesDir()}{wxstandardpathsgetresourcesdir} (or +\texttt{\arg{lang}.lproj} under Mac OS X) but is something quite +different for message catalog category under Unix where it returns the standard +\texttt{\textit{prefix}/share/locale/\arg{lang}/LC\_MESSAGES} directory. + +\newsince{2.7.0} + + \membersection{wxStandardPaths::GetPluginsDir}\label{wxstandardpathsgetpluginsdir} -\func{wxString}{GetPluginsDir}{\void} +\constfunc{wxString}{GetPluginsDir}{\void} Return the directory where the loadable modules (plugins) live. @@ -139,14 +190,49 @@ Example return values: \helpref{wxDynamicLibrary}{wxdynamiclibrary} +\membersection{wxStandardPaths::GetResourcesDir}\label{wxstandardpathsgetresourcesdir} + +\constfunc{wxString}{GetResourcesDir}{\void} + +Return the directory where the application resource files are located. The +resources are the auxiliary data files needed for the application to run and +include, for example, image and sound files it might use. + +This function is the same as \helpref{GetDataDir}{wxstandardpathsgetdatadir} for +all platforms except Mac OS X. + +Example return values: +\begin{itemize} + \item Unix: \texttt{\textit{prefix}/share/\textit{appname}} + \item Windows: the directory where the executable file is located + \item Mac: \texttt{\textit{appname}.app/Contents/Resources} bundle subdirectory +\end{itemize} + +\newsince{2.7.0} + + +\wxheading{See also} + +\helpref{GetLocalizedResourcesDir}{wxstandardpathsgetlocalizedresourcesdir} + +\membersection{wxStandardPaths::GetTempDir}\label{wxstandardpathsgettempdir} + +\constfunc{wxString}{GetTempDir}{\void} + +Return the directory for storing temporary files. To create unique temporary files, +it is best to use \helpref{wxFileName::CreateTempFileName}{wxfilenamecreatetempfilename} for correct behaviour when +multiple processes are attempting to create temporary files. + +\newsince{2.7.2} + \membersection{wxStandardPaths::GetUserConfigDir}\label{wxstandardpathsgetuserconfigdir} -\func{wxString}{GetUserConfigDir}{\void} +\constfunc{wxString}{GetUserConfigDir}{\void} Return the directory for the user config files: \begin{itemize} \item Unix: \tt{~} (the home directory) - \item Windows: \tt{C:$\backslash$Documents and Settings$\backslash$\textit{username}} + \item Windows: \tt{C:$\backslash$Documents and Settings$\backslash$\textit{username}$\backslash$Application Data} \item Mac: \tt{~/Library/Preferences} \end{itemize} @@ -157,7 +243,7 @@ more appropriate. \membersection{wxStandardPaths::GetUserDataDir}\label{wxstandardpathsgetuserdatadir} -\func{wxString}{GetUserDataDir}{\void} +\constfunc{wxString}{GetUserDataDir}{\void} Return the directory for the user-dependent application data files: \begin{itemize} @@ -169,13 +255,13 @@ Return the directory for the user-dependent application data files: \membersection{wxStandardPaths::GetUserLocalDataDir}\label{wxstandardpathsgetuserlocaldatadir} -\func{wxString}{GetUserLocalDataDir}{\void} +\constfunc{wxString}{GetUserLocalDataDir}{\void} Return the directory for user data files which shouldn't be shared with the other machines. This is the same as \helpref{GetUserDataDir()}{wxstandardpathsgetuserdatadir} for -all platforms except Windows where it returns +all platforms except Windows where it returns \texttt{C:$\backslash$Documents and Settings$\backslash$\textit{username}$\backslash$Local Settings$\backslash$Application Data$\backslash$\textit{appname}} @@ -186,7 +272,7 @@ all platforms except Windows where it returns \textbf{Note:} This function is only available under Unix. Lets wxStandardPaths know about the real program installation prefix on a Unix -system. By default, the value returned by +system. By default, the value returned by \helpref{GetInstallPrefix}{wxstandardpathsgetinstallprefix} is used. Although under Linux systems the program prefix may usually be determined @@ -194,4 +280,3 @@ automatically, portable programs should call this function. Usually the prefix is set during program configuration if using GNU autotools and so it is enough to pass its value defined in \texttt{config.h} to this function. -