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 // implement base class pure virtuals
23 virtual wxString
GetExecutablePath() const;
24 virtual wxString
GetConfigDir() const;
25 virtual wxString
GetUserConfigDir() const;
26 virtual wxString
GetDataDir() const;
27 virtual wxString
GetUserDataDir() const;
28 virtual wxString
GetUserLocalDataDir() const;
29 virtual wxString
GetPluginsDir() const;
30 virtual wxString
GetDocumentsDir() const;
33 // MSW-specific methods
35 // This class supposes that data, plugins &c files are located under the
36 // program directory which is the directory containing the application
37 // binary itself. But sometimes this binary may be in a subdirectory of the
38 // main program directory, e.g. this happens in at least the following
40 // 1. The program is in "bin" subdirectory of the installation directory.
41 // 2. The program is in "debug" subdirectory of the directory containing
42 // sources and data files during development
44 // By calling this function you instruct the class to remove the last
45 // component of the path if it matches its argument. Notice that it may be
46 // called more than once, e.g. you can call both IgnoreAppSubDir("bin") and
47 // IgnoreAppSubDir("debug") to take care of both production and development
48 // cases above but that each call will only remove the last path component.
49 // Finally note that the argument can contain wild cards so you can also
50 // call IgnoreAppSubDir("vc*msw*") to ignore all build directories at once
51 // when using wxWidgets-inspired output directories names.
52 void IgnoreAppSubDir(const wxString
& subdirPattern
);
54 // This function is used to ignore all common build directories and is
55 // called from the ctor -- use DontIgnoreAppSubDir() to undo this.
56 void IgnoreAppBuildSubDirs();
58 // Undo the effects of all preceding IgnoreAppSubDir() calls.
59 void DontIgnoreAppSubDir();
62 // Returns the directory corresponding to the specified Windows shell CSIDL
63 static wxString
MSWGetShellDir(int csidl
);
66 // Ctor is protected, use wxStandardPaths::Get() instead of instantiating
67 // objects of this class directly.
69 // It calls IgnoreAppBuildSubDirs() and also sets up the object to use
70 // both vendor and application name by default.
73 // get the path corresponding to the given standard CSIDL_XXX constant
74 static wxString
DoGetDirectory(int csidl
);
76 // return the directory of the application itself
77 wxString
GetAppDir() const;
79 // directory returned by GetAppDir()
80 mutable wxString m_appDir
;
83 // ----------------------------------------------------------------------------
84 // wxStandardPathsWin16: this class is for internal use only
85 // ----------------------------------------------------------------------------
87 // override config file locations to be compatible with the values used by
88 // wxFileConfig (dating from Win16 days which explains the class name)
89 class WXDLLIMPEXP_BASE wxStandardPathsWin16
: public wxStandardPaths
92 virtual wxString
GetConfigDir() const;
93 virtual wxString
GetUserConfigDir() const;
96 #endif // _WX_MSW_STDPATHS_H_