]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/stdpaths.tex
renamed wxFileLocator to wxStandardPaths
[wxWidgets.git] / docs / latex / wx / stdpaths.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: stdpaths.tex
3 %% Purpose: wxStandardPaths documentation
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
12 \section{\class{wxStandardPaths}}\label{wxstandardsaths}
13
14 wxStandardPaths returns the standard locations in the file system and should be
15 used by the programs to find their data files in a portable way.
16
17 Please note that this is not a real class because object of this type are never
18 created but more a namespace containing the class methods which are all static,
19 so to use wxStandardPaths simply call its methods directly.
20
21 In the description of the methods below, the example return values are given
22 for the Unix, Windows and Mac OS X systems, however please note that these are
23 just the examples and the actual values may differ. Most importantly:
24 \begin{itemize}
25 \item Unix: \texttt{/usr} should in general be replaced by the
26 program installation prefix which is by default \texttt{/usr/local} but
27 may be any other path as well.
28 \item Windows: the system administrator may change the standard
29 directories locations, i.e. the Windows directory may be named
30 \texttt{W:$\backslash$Win2003} instead of default
31 \texttt{C:$\backslash$Windows}
32 \end{itemize}
33
34 The strings \texttt{\textit{appname}} and \texttt{\textit{username}} should be
35 replaced with the value returned by \helpref{wxApp::GetAppName}{wxappgetappname}
36 and the name of the currently logged in user, respectively.
37
38 The directories returned by the methods of this class may or may not exist. If
39 they don't exist, it's up to the caller to create them, wxStandardPaths doesn't
40 do it.
41
42 Finally note that under Mac, these functions only work for the bundled
43 applications.
44
45 \wxheading{Derived from}
46
47 No base class
48
49 \wxheading{Include files}
50
51 <wx/fileloc.h>
52
53
54 \latexignore{\rtfignore{\wxheading{Members}}}
55
56
57 \membersection{wxStandardPaths::GetConfigDir}\label{wxstandardsathsgetconfigdir}
58
59 \func{static wxString}{GetConfigDir}{\void}
60
61 Return the directory containing the system config files.
62
63 Example return values:
64 \begin{itemize}
65 \item Unix: \texttt{/etc}
66 \item Windows: \texttt{C:$\backslash$Windows}
67 \item Mac: \texttt{/Library/Preferences}
68 \end{itemize}
69
70 \wxheading{See also}
71
72 \helpref{wxFileConfig}{wxfileconfig}
73
74
75 \membersection{wxStandardPaths::GetDataDir}\label{wxstandardsathsgetdatadir}
76
77 \func{static wxString}{GetDataDir}{\void}
78
79 Return the location of the applications global, i.e. not user-specific,
80 data files.
81
82 Example return values:
83 \begin{itemize}
84 \item Unix: \texttt{/usr/share/\textit{appname}}
85 \item Windows: \texttt{C:$\backslash$Program Files$\backslash$\textit{appname}}
86 \item Mac: \texttt{\textit{appname}.app/Contents} bundle subdirectory
87 \end{itemize}
88
89 \wxheading{See also}
90
91 \helpref{GetLocalDataDir}{wxstandardsathsgetlocaldatadir}
92
93
94 \membersection{wxStandardPaths::GetLocalDataDir}\label{wxstandardsathsgetlocaldatadir}
95
96 \func{static wxString}{GetLocalDataDir}{\void}
97
98 Return the location for application data files which are host-specific and
99 can't, or shouldn't, be shared with the other machines.
100
101 This is the same as \helpref{GetDataDir()}{wxstandardsathsgetdatadir} except
102 under Unix where it returns \texttt{/etc/\textit{appname}}.
103
104
105 \membersection{wxStandardPaths::GetPluginsDir}\label{wxstandardsathsgetpluginsdir}
106
107 \func{static wxString}{GetPluginsDir}{\void}
108
109 Return the directory where the loadable modules (plugins) live.
110
111 Example return values:
112 \begin{itemize}
113 \item Unix: \texttt{/usr/lib/\textit{appname}}
114 \item Windows: the directory of the executable file
115 \item Mac: \texttt{\textit{appname}.app/Contents/Plugins} bundle subdirectory
116 \end{itemize}
117
118 \wxheading{See also}
119
120 \helpref{wxDynamicLibrary}{wxdynamiclibrary}
121
122
123 \membersection{wxStandardPaths::GetUserConfigDir}\label{wxstandardsathsgetuserconfigdir}
124
125 \func{static wxString}{GetUserConfigDir}{\void}
126
127 Return the directory for the user config files:
128 \begin{itemize}
129 \item Unix: \texttt{\verb|~|} (the home directory)
130 \item Windows: \texttt{C:$\backslash$Documents and Settings$\backslash$\textit{username}}
131 \item Mac: \texttt{\verb|~|/Library/Preferences}
132 \end{itemize}
133
134 Only use this method if you have a single configuration file to put in this
135 directory, otherwise \helpref{GetUserDataDir()}{wxstandardsathsgetuserdatadir} is
136 more appropriate.
137
138
139 \membersection{wxStandardPaths::GetUserDataDir}\label{wxstandardsathsgetuserdatadir}
140
141 \func{static wxString}{GetUserDataDir}{\void}
142
143 Return the directory for the user-dependent application data files:
144 \begin{itemize}
145 \item Unix: \texttt{\verb|~|/.\textit{appname}}
146 \item Windows: \texttt{C:$\backslash$Documents and Settings$\backslash$\textit{username}$\backslash$Application Data$\backslash$\textit{appname}}
147 \item Mac: \texttt{\verb|~|/Library/\textit{appname}}
148 \end{itemize}
149
150
151 \membersection{wxStandardPaths::GetUserLocalDataDir}\label{wxstandardsathsgetuserlocaldatadir}
152
153 \func{static wxString}{GetUserLocalDataDir}{\void}
154
155 Return the directory for user data files which shouldn't be shared with
156 the other machines.
157
158 This is the same as \helpref{GetUserDataDir()}{wxstandardsathsgetuserdatadir} for
159 all platforms except Windows where it returns
160 \texttt{C:$\backslash$Documents and Settings$\backslash$\textit{username}$\backslash$Local Settings$\backslash$Application Data$\backslash$\textit{appname}}
161
162