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