- added and documented Get/SetInstallPath() under Unix
[wxWidgets.git] / include / wx / stdpaths.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/stdpaths.h
3 // Purpose: declaration of wxStandardPaths class
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 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_FILELOC_H_
13 #define _WX_FILELOC_H_
14
15 // ----------------------------------------------------------------------------
16 // wxStandardPaths returns the standard locations in the file system
17 // ----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_BASE wxStandardPaths
20 {
21 public:
22 #ifdef __UNIX_LIKE__
23 // set the program installation directory which is /usr/local by default
24 //
25 // under some systems (currently only Linux) the program directory can be
26 // determined automatically but for portable programs you should always set
27 // it explicitely
28 static void SetInstallPrefix(const wxString& prefix);
29
30 // get the program installation prefix
31 //
32 // if the prefix had been previously by SetInstallPrefix, returns that
33 // value, otherwise tries to determine it automatically (Linux only right
34 // now) and returns /usr/local if it failed
35 static wxString GetInstallPrefix();
36 #endif // __UNIX_LIKE__
37
38
39 // return the directory with system config files:
40 // /etc under Unix, c:\Windows under Windows, /Library/Preferences for Mac
41 static wxString GetConfigDir();
42
43 // return the directory for the user config files:
44 // $HOME under Unix, c:\Documents and Settings\username under Windows,
45 // ~/Library/Preferences under Mac
46 //
47 // only use this if you have a single file to put there, otherwise
48 // GetUserDataDir() is more appropriate
49 static wxString GetUserConfigDir();
50
51 // return the location of the applications global, i.e. not user-specific,
52 // data files
53 //
54 // prefix/share/appname under Unix, c:\Program Files\appname under Windows,
55 // appname.app/Contents/SharedSupport app bundle directory under Mac
56 static wxString GetDataDir();
57
58 // return the location for application data files which are host-specific
59 //
60 // same as GetDataDir() except under Unix where it is /etc/appname
61 static wxString GetLocalDataDir();
62
63 // return the directory for the user-dependent application data files
64 //
65 // $HOME/.appname under Unix,
66 // c:\Documents and Settings\username\Application Data\appname under Windows
67 // and ~/Library/Application Support/appname under Mac
68 static wxString GetUserDataDir();
69
70 // return the directory for user data files which shouldn't be shared with
71 // the other machines
72 //
73 // same as GetUserDataDir() for all platforms except Windows where it is
74 // the "Local Settings\Application Data\appname" directory
75 static wxString GetUserLocalDataDir();
76
77 // return the directory where the loadable modules (plugins) live
78 //
79 // prefix/lib/appname under Unix, program directory under Windows and
80 // Contents/Plugins app bundle subdirectory under Mac
81 static wxString GetPluginsDir();
82 };
83
84 #endif // _WX_FILELOC_H_
85