1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/stdpaths.h
3 // Purpose: wxStandardPaths for Win32
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSW_STDPATHS_H_
13 #define _WX_MSW_STDPATHS_H_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_BASE wxStandardPaths
: public wxStandardPathsBase
22 // ctor calls IgnoreAppBuildSubDirs() and also sets up the object to use
23 // both vendor and application name by default
26 // implement base class pure virtuals
27 virtual wxString
GetExecutablePath() const;
28 virtual wxString
GetConfigDir() const;
29 virtual wxString
GetUserConfigDir() const;
30 virtual wxString
GetDataDir() const;
31 virtual wxString
GetUserDataDir() const;
32 virtual wxString
GetUserLocalDataDir() const;
33 virtual wxString
GetPluginsDir() const;
34 virtual wxString
GetDocumentsDir() const;
37 // MSW-specific methods
39 // This class supposes that data, plugins &c files are located under the
40 // program directory which is the directory containing the application
41 // binary itself. But sometimes this binary may be in a subdirectory of the
42 // main program directory, e.g. this happens in at least the following
44 // 1. The program is in "bin" subdirectory of the installation directory.
45 // 2. The program is in "debug" subdirectory of the directory containing
46 // sources and data files during development
48 // By calling this function you instruct the class to remove the last
49 // component of the path if it matches its argument. Notice that it may be
50 // called more than once, e.g. you can call both IgnoreAppSubDir("bin") and
51 // IgnoreAppSubDir("debug") to take care of both production and development
52 // cases above but that each call will only remove the last path component.
53 // Finally note that the argument can contain wild cards so you can also
54 // call IgnoreAppSubDir("vc*msw*") to ignore all build directories at once
55 // when using wxWidgets-inspired output directories names.
56 void IgnoreAppSubDir(const wxString
& subdirPattern
);
58 // This function is used to ignore all common build directories and is
59 // called from the ctor -- use DontIgnoreAppSubDir() to undo this.
60 void IgnoreAppBuildSubDirs();
62 // Undo the effects of all preceding IgnoreAppSubDir() calls.
63 void DontIgnoreAppSubDir();
66 // get the path corresponding to the given standard CSIDL_XXX constant
67 static wxString
DoGetDirectory(int csidl
);
69 // return the directory of the application itself
70 wxString
GetAppDir() const;
72 // directory returned by GetAppDir()
73 mutable wxString m_appDir
;
76 // ----------------------------------------------------------------------------
77 // wxStandardPathsWin16: this class is for internal use only
78 // ----------------------------------------------------------------------------
80 // override config file locations to be compatible with the values used by
81 // wxFileConfig (dating from Win16 days which explains the class name)
82 class WXDLLIMPEXP_BASE wxStandardPathsWin16
: public wxStandardPaths
85 virtual wxString
GetConfigDir() const;
86 virtual wxString
GetUserConfigDir() const;
89 #endif // _WX_MSW_STDPATHS_H_