]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/stdpaths.tex
change configure to better detect gstreamer. Check create is valid in mediaplayer...
[wxWidgets.git] / docs / latex / wx / stdpaths.tex
CommitLineData
1ee445c7 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
96e2aec5
VZ
2%% Name: stdpaths.tex
3%% Purpose: wxStandardPaths documentation
1ee445c7
VZ
4%% Author: Vadim Zeitlin
5%% Modified by:
6%% Created: 2004-10-17
7%% RCS-ID: $Id$
8%% Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9%% License: wxWidgets license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
48713afd 12\section{\class{wxStandardPaths}}\label{wxstandardpaths}
1ee445c7 13
96e2aec5 14wxStandardPaths returns the standard locations in the file system and should be
dceb1c09 15used by applications to find their data files in a portable way.
1ee445c7
VZ
16
17Please note that this is not a real class because object of this type are never
18created but more a namespace containing the class methods which are all static,
96e2aec5 19so to use wxStandardPaths simply call its methods directly.
1ee445c7
VZ
20
21In the description of the methods below, the example return values are given
22for the Unix, Windows and Mac OS X systems, however please note that these are
48713afd
VZ
23just the examples and the actual values may differ. For example, under Windows:
24the system administrator may change the standard directories locations, i.e.
25the Windows directory may be named \texttt{W:$\backslash$Win2003} instead of
26the default \texttt{C:$\backslash$Windows}.
1ee445c7
VZ
27
28The strings \texttt{\textit{appname}} and \texttt{\textit{username}} should be
29replaced with the value returned by \helpref{wxApp::GetAppName}{wxappgetappname}
48713afd
VZ
30and the name of the currently logged in user, respectively. The string
31\texttt{\textit{prefix}} is only used under Unix and is \texttt{/usr/local} by
32default but may be changed using \helpref{SetInstallPrefix}{wxstandardpathssetinstallprefix}.
1ee445c7
VZ
33
34The directories returned by the methods of this class may or may not exist. If
96e2aec5 35they don't exist, it's up to the caller to create them, wxStandardPaths doesn't
1ee445c7
VZ
36do it.
37
48713afd
VZ
38Finally note that these functions only work with standardly packaged
39applications. I.e. under Unix you should follow the standard installation
40conventions and under Mac you should create your application bundle according
41to the Apple guidelines. Again, this class doesn't help you to do it.
1ee445c7 42
b36d022a
VZ
43This class is MT-safe: its methods may be called concurrently from different
44threads without additional locking.
45
1ee445c7
VZ
46\wxheading{Derived from}
47
48No base class
49
50\wxheading{Include files}
51
52<wx/fileloc.h>
53
54
55\latexignore{\rtfignore{\wxheading{Members}}}
56
57
48713afd 58\membersection{wxStandardPaths::GetConfigDir}\label{wxstandardpathsgetconfigdir}
1ee445c7
VZ
59
60\func{static wxString}{GetConfigDir}{\void}
61
62Return the directory containing the system config files.
63
64Example return values:
65\begin{itemize}
66 \item Unix: \texttt{/etc}
b36d022a 67 \item Windows: \texttt{C:$\backslash$Documents and Settings$\backslash$All Users$\backslash$Application Data}
1ee445c7
VZ
68 \item Mac: \texttt{/Library/Preferences}
69\end{itemize}
70
71\wxheading{See also}
72
73\helpref{wxFileConfig}{wxfileconfig}
74
75
48713afd 76\membersection{wxStandardPaths::GetDataDir}\label{wxstandardpathsgetdatadir}
1ee445c7
VZ
77
78\func{static wxString}{GetDataDir}{\void}
79
80Return the location of the applications global, i.e. not user-specific,
81data files.
82
83Example return values:
84\begin{itemize}
48713afd 85 \item Unix: \texttt{\textit{prefix}/share/\textit{appname}}
1ee445c7 86 \item Windows: \texttt{C:$\backslash$Program Files$\backslash$\textit{appname}}
48713afd 87 \item Mac: \texttt{\textit{appname}.app/Contents/SharedSupport} bundle subdirectory
1ee445c7
VZ
88\end{itemize}
89
90\wxheading{See also}
91
48713afd
VZ
92\helpref{GetLocalDataDir}{wxstandardpathsgetlocaldatadir}
93
94
95\membersection{wxStandardPaths::GetInstallPrefix}\label{wxstandardpathsgetinstallprefix}
96
97\func{static wxString}{GetInstallPrefix}{\void}
98
99\textbf{Note: } This function is only available under Unix.
100
101Return the program installation prefix, e.g. \texttt{/usr}, \texttt{/opt} or
102\texttt{/home/zeitlin}.
1ee445c7 103
48713afd
VZ
104If the prefix had been previously by
105\helpref{SetInstallPrefix}{wxstandardpathssetinstallprefix}, returns that
106value, otherwise tries to determine it automatically (Linux only right
107now) and finally returns the default \texttt{/usr/local} value if it failed.
1ee445c7 108
48713afd
VZ
109
110\membersection{wxStandardPaths::GetLocalDataDir}\label{wxstandardpathsgetlocaldatadir}
1ee445c7
VZ
111
112\func{static wxString}{GetLocalDataDir}{\void}
113
114Return the location for application data files which are host-specific and
115can't, or shouldn't, be shared with the other machines.
116
48713afd 117This is the same as \helpref{GetDataDir()}{wxstandardpathsgetdatadir} except
1ee445c7
VZ
118under Unix where it returns \texttt{/etc/\textit{appname}}.
119
120
48713afd 121\membersection{wxStandardPaths::GetPluginsDir}\label{wxstandardpathsgetpluginsdir}
1ee445c7
VZ
122
123\func{static wxString}{GetPluginsDir}{\void}
124
125Return the directory where the loadable modules (plugins) live.
126
127Example return values:
128\begin{itemize}
48713afd 129 \item Unix: \texttt{\textit{prefix}/lib/\textit{appname}}
1ee445c7 130 \item Windows: the directory of the executable file
48713afd 131 \item Mac: \texttt{\textit{appname}.app/Contents/PlugIns} bundle subdirectory
1ee445c7
VZ
132\end{itemize}
133
134\wxheading{See also}
135
136\helpref{wxDynamicLibrary}{wxdynamiclibrary}
137
138
48713afd 139\membersection{wxStandardPaths::GetUserConfigDir}\label{wxstandardpathsgetuserconfigdir}
1ee445c7
VZ
140
141\func{static wxString}{GetUserConfigDir}{\void}
142
143Return the directory for the user config files:
144\begin{itemize}
0d2b62c5 145 \item Unix: \tt{~} (the home directory)
6fdd4565 146 \item Windows: \tt{C:$\backslash$Documents and Settings$\backslash$\textit{username}}
0d2b62c5 147 \item Mac: \tt{~/Library/Preferences}
1ee445c7
VZ
148\end{itemize}
149
150Only use this method if you have a single configuration file to put in this
48713afd 151directory, otherwise \helpref{GetUserDataDir()}{wxstandardpathsgetuserdatadir} is
1ee445c7
VZ
152more appropriate.
153
154
48713afd 155\membersection{wxStandardPaths::GetUserDataDir}\label{wxstandardpathsgetuserdatadir}
1ee445c7
VZ
156
157\func{static wxString}{GetUserDataDir}{\void}
158
159Return the directory for the user-dependent application data files:
160\begin{itemize}
0d2b62c5 161 \item Unix: \tt{~/.\textit{appname}}
6fdd4565 162 \item Windows: \tt{C:$\backslash$Documents and Settings$\backslash$\textit{username}$\backslash$Application Data$\backslash$\textit{appname}}
0d2b62c5 163 \item Mac: \tt{~/Library/Application Support/\textit{appname}}
1ee445c7
VZ
164\end{itemize}
165
166
48713afd 167\membersection{wxStandardPaths::GetUserLocalDataDir}\label{wxstandardpathsgetuserlocaldatadir}
1ee445c7
VZ
168
169\func{static wxString}{GetUserLocalDataDir}{\void}
170
171Return the directory for user data files which shouldn't be shared with
172the other machines.
173
48713afd 174This is the same as \helpref{GetUserDataDir()}{wxstandardpathsgetuserdatadir} for
1ee445c7 175all platforms except Windows where it returns
96e2aec5 176\texttt{C:$\backslash$Documents and Settings$\backslash$\textit{username}$\backslash$Local Settings$\backslash$Application Data$\backslash$\textit{appname}}
1ee445c7
VZ
177
178
48713afd
VZ
179\membersection{wxStandardPaths::SetInstallPrefix}\label{wxstandardpathssetinstallprefix}
180
181\func{static void}{SetInstallPrefix}{\param{const wxString\& }{prefix}}
182
dceb1c09 183\textbf{Note:} This function is only available under Unix.
48713afd
VZ
184
185Lets wxStandardPaths know about the real program installation prefix on a Unix
186system. By default, the value returned by
187\helpref{GetInstallPrefix}{wxstandardpathsgetinstallprefix} is used.
188
189Although under Linux systems the program prefix may usually be determined
190automatically, portable programs should call this function. Usually the prefix
191is set during program configuration if using GNU autotools and so it is enough
192to pass its value defined in \texttt{config.h} to this function.
193
194