1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxStandardPaths documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 %% License: wxWidgets license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxStandardPaths
}}\label{wxstandardsaths
}
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.
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.
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:
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
}
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.
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
42 Finally note that under Mac, these functions only work for the bundled
45 \wxheading{Derived from
}
49 \wxheading{Include files
}
54 \latexignore{\rtfignore{\wxheading{Members
}}}
57 \membersection{wxStandardPaths::GetConfigDir
}\label{wxstandardsathsgetconfigdir
}
59 \func{static wxString
}{GetConfigDir
}{\void}
61 Return the directory containing the system config files.
63 Example return values:
65 \item Unix:
\texttt{/etc
}
66 \item Windows:
\texttt{C:$
\backslash$Windows
}
67 \item Mac:
\texttt{/Library/Preferences
}
72 \helpref{wxFileConfig
}{wxfileconfig
}
75 \membersection{wxStandardPaths::GetDataDir
}\label{wxstandardsathsgetdatadir
}
77 \func{static wxString
}{GetDataDir
}{\void}
79 Return the location of the applications global, i.e. not user-specific,
82 Example return values:
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
91 \helpref{GetLocalDataDir
}{wxstandardsathsgetlocaldatadir
}
94 \membersection{wxStandardPaths::GetLocalDataDir
}\label{wxstandardsathsgetlocaldatadir
}
96 \func{static wxString
}{GetLocalDataDir
}{\void}
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.
101 This is the same as
\helpref{GetDataDir()
}{wxstandardsathsgetdatadir
} except
102 under Unix where it returns
\texttt{/etc/
\textit{appname
}}.
105 \membersection{wxStandardPaths::GetPluginsDir
}\label{wxstandardsathsgetpluginsdir
}
107 \func{static wxString
}{GetPluginsDir
}{\void}
109 Return the directory where the loadable modules (plugins) live.
111 Example return values:
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
120 \helpref{wxDynamicLibrary
}{wxdynamiclibrary
}
123 \membersection{wxStandardPaths::GetUserConfigDir
}\label{wxstandardsathsgetuserconfigdir
}
125 \func{static wxString
}{GetUserConfigDir
}{\void}
127 Return the directory for the user config files:
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
}
134 Only use this method if you have a single configuration file to put in this
135 directory, otherwise
\helpref{GetUserDataDir()
}{wxstandardsathsgetuserdatadir
} is
139 \membersection{wxStandardPaths::GetUserDataDir
}\label{wxstandardsathsgetuserdatadir
}
141 \func{static wxString
}{GetUserDataDir
}{\void}
143 Return the directory for the user-dependent application data files:
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
}}
151 \membersection{wxStandardPaths::GetUserLocalDataDir
}\label{wxstandardsathsgetuserlocaldatadir
}
153 \func{static wxString
}{GetUserLocalDataDir
}{\void}
155 Return the directory for user data files which shouldn't be shared with
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
}}