]>
Commit | Line | Data |
---|---|---|
1ee445c7 | 1 | /////////////////////////////////////////////////////////////////////////////// |
96e2aec5 VZ |
2 | // Name: wx/stdpaths.h |
3 | // Purpose: declaration of wxStandardPaths class | |
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 | // Licence: wxWindows licence | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
0b75a1e0 VZ |
12 | #ifndef _WX_STDPATHS_H_ |
13 | #define _WX_STDPATHS_H_ | |
1ee445c7 | 14 | |
6cb5e50b VZ |
15 | #include "wx/string.h" |
16 | ||
3b01b1fe DE |
17 | #if defined(__WXMAC__) |
18 | class WXDLLIMPEXP_BASE wxStandardPathsCF; | |
19 | #define wxStandardPaths wxStandardPathsCF | |
20 | #else | |
6cb5e50b | 21 | class WXDLLIMPEXP_BASE wxStandardPaths; |
3b01b1fe | 22 | #endif |
6cb5e50b | 23 | |
1ee445c7 | 24 | // ---------------------------------------------------------------------------- |
96e2aec5 | 25 | // wxStandardPaths returns the standard locations in the file system |
1ee445c7 VZ |
26 | // ---------------------------------------------------------------------------- |
27 | ||
6cb5e50b | 28 | class WXDLLIMPEXP_BASE wxStandardPathsBase |
1ee445c7 VZ |
29 | { |
30 | public: | |
6cb5e50b VZ |
31 | // return the global standard paths object |
32 | static wxStandardPaths& Get(); | |
48713afd VZ |
33 | |
34 | ||
1ee445c7 | 35 | // return the directory with system config files: |
6cb5e50b VZ |
36 | // /etc under Unix, c:\Documents and Settings\All Users\Application Data |
37 | // under Windows, /Library/Preferences for Mac | |
38 | virtual wxString GetConfigDir() const = 0; | |
1ee445c7 VZ |
39 | |
40 | // return the directory for the user config files: | |
41 | // $HOME under Unix, c:\Documents and Settings\username under Windows, | |
42 | // ~/Library/Preferences under Mac | |
43 | // | |
44 | // only use this if you have a single file to put there, otherwise | |
45 | // GetUserDataDir() is more appropriate | |
6cb5e50b | 46 | virtual wxString GetUserConfigDir() const = 0; |
1ee445c7 VZ |
47 | |
48 | // return the location of the applications global, i.e. not user-specific, | |
49 | // data files | |
50 | // | |
48713afd VZ |
51 | // prefix/share/appname under Unix, c:\Program Files\appname under Windows, |
52 | // appname.app/Contents/SharedSupport app bundle directory under Mac | |
6cb5e50b | 53 | virtual wxString GetDataDir() const = 0; |
1ee445c7 VZ |
54 | |
55 | // return the location for application data files which are host-specific | |
56 | // | |
57 | // same as GetDataDir() except under Unix where it is /etc/appname | |
6cb5e50b | 58 | virtual wxString GetLocalDataDir() const; |
1ee445c7 VZ |
59 | |
60 | // return the directory for the user-dependent application data files | |
61 | // | |
62 | // $HOME/.appname under Unix, | |
63 | // c:\Documents and Settings\username\Application Data\appname under Windows | |
48713afd | 64 | // and ~/Library/Application Support/appname under Mac |
6cb5e50b | 65 | virtual wxString GetUserDataDir() const = 0; |
1ee445c7 VZ |
66 | |
67 | // return the directory for user data files which shouldn't be shared with | |
68 | // the other machines | |
69 | // | |
70 | // same as GetUserDataDir() for all platforms except Windows where it is | |
71 | // the "Local Settings\Application Data\appname" directory | |
6cb5e50b | 72 | virtual wxString GetUserLocalDataDir() const; |
1ee445c7 VZ |
73 | |
74 | // return the directory where the loadable modules (plugins) live | |
75 | // | |
48713afd | 76 | // prefix/lib/appname under Unix, program directory under Windows and |
1ee445c7 | 77 | // Contents/Plugins app bundle subdirectory under Mac |
6cb5e50b VZ |
78 | virtual wxString GetPluginsDir() const = 0; |
79 | ||
80 | ||
81 | // virtual dtor for the base class | |
82 | virtual ~wxStandardPathsBase(); | |
ce336c6d VZ |
83 | |
84 | protected: | |
85 | // append "/appname" suffix if the app name is set (doesn't append the | |
86 | // slash if dir already ends with a slash or dot) | |
87 | static wxString AppendAppName(const wxString& dir); | |
1ee445c7 VZ |
88 | }; |
89 | ||
6cb5e50b VZ |
90 | #if defined(__WXMSW__) |
91 | #include "wx/msw/stdpaths.h" | |
726b98e9 DE |
92 | #elif defined(__WXMAC__) || defined(__WXCOCOA__) |
93 | #include "wx/mac/corefoundation/stdpaths.h" | |
175bb578 SN |
94 | #elif defined(__OS2__) |
95 | #include "wx/os2/stdpaths.h" | |
6cb5e50b VZ |
96 | #elif defined(__UNIX__) |
97 | #include "wx/unix/stdpaths.h" | |
98 | #endif | |
99 | ||
0b75a1e0 | 100 | #endif // _WX_STDPATHS_H_ |
1ee445c7 | 101 |