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