1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: declaration of wxStandardPaths class
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_STDPATHS_H_
13 #define _WX_STDPATHS_H_
19 #include "wx/string.h"
21 // ----------------------------------------------------------------------------
22 // wxStandardPaths returns the standard locations in the file system
23 // ----------------------------------------------------------------------------
25 class WXDLLIMPEXP_BASE wxStandardPathsBase
28 // return the global standard paths object
29 static wxStandardPathsBase
& Get();
32 // return the directory with system config files:
33 // /etc under Unix, c:\Documents and Settings\All Users\Application Data
34 // under Windows, /Library/Preferences for Mac
35 virtual wxString
GetConfigDir() const = 0;
37 // return the directory for the user config files:
38 // $HOME under Unix, c:\Documents and Settings\username under Windows,
39 // ~/Library/Preferences under Mac
41 // only use this if you have a single file to put there, otherwise
42 // GetUserDataDir() is more appropriate
43 virtual wxString
GetUserConfigDir() const = 0;
45 // return the location of the applications global, i.e. not user-specific,
48 // prefix/share/appname under Unix, c:\Program Files\appname under Windows,
49 // appname.app/Contents/SharedSupport app bundle directory under Mac
50 virtual wxString
GetDataDir() const = 0;
52 // return the location for application data files which are host-specific
54 // same as GetDataDir() except under Unix where it is /etc/appname
55 virtual wxString
GetLocalDataDir() const;
57 // return the directory for the user-dependent application data files
59 // $HOME/.appname under Unix,
60 // c:\Documents and Settings\username\Application Data\appname under Windows
61 // and ~/Library/Application Support/appname under Mac
62 virtual wxString
GetUserDataDir() const = 0;
64 // return the directory for user data files which shouldn't be shared with
67 // same as GetUserDataDir() for all platforms except Windows where it is
68 // the "Local Settings\Application Data\appname" directory
69 virtual wxString
GetUserLocalDataDir() const;
71 // return the directory where the loadable modules (plugins) live
73 // prefix/lib/appname under Unix, program directory under Windows and
74 // Contents/Plugins app bundle subdirectory under Mac
75 virtual wxString
GetPluginsDir() const = 0;
78 // virtual dtor for the base class
79 virtual ~wxStandardPathsBase();
82 // append "/appname" suffix if the app name is set (doesn't append the
83 // slash if dir already ends with a slash or dot)
84 static wxString
AppendAppName(const wxString
& dir
);
87 #if defined(__WXMSW__)
88 #include "wx/msw/stdpaths.h"
89 // We want CoreFoundation paths on both CarbonLib and Darwin (for all ports)
90 #elif defined(__WXMAC__) || defined(__DARWIN__)
91 #include "wx/mac/corefoundation/stdpaths.h"
92 #elif defined(__OS2__)
93 #include "wx/os2/stdpaths.h"
94 #elif defined(__UNIX__)
95 #include "wx/unix/stdpaths.h"
96 #elif defined(__PALMOS__)
97 #include "wx/palmos/stdpaths.h"
100 #endif // wxUSE_STDPATHS
102 #endif // _WX_STDPATHS_H_