]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/stdpaths.h
Implement monitoring of file descriptors in wxMotif event loop.
[wxWidgets.git] / include / wx / msw / stdpaths.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/stdpaths.h
3 // Purpose: wxStandardPaths for Win32
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 2004-10-19
7 // RCS-ID: $Id$
8 // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MSW_STDPATHS_H_
13 #define _WX_MSW_STDPATHS_H_
14
15 // ----------------------------------------------------------------------------
16 // wxStandardPaths
17 // ----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase
20 {
21 public:
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;
31
32
33 // MSW-specific methods
34
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
39 // common cases:
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
43 //
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);
53
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();
57
58 // Undo the effects of all preceding IgnoreAppSubDir() calls.
59 void DontIgnoreAppSubDir();
60
61
62 // Returns the directory corresponding to the specified Windows shell CSIDL
63 static wxString MSWGetShellDir(int csidl);
64
65 protected:
66 // Ctor is protected, use wxStandardPaths::Get() instead of instantiating
67 // objects of this class directly.
68 //
69 // It calls IgnoreAppBuildSubDirs() and also sets up the object to use
70 // both vendor and application name by default.
71 wxStandardPaths();
72
73 // get the path corresponding to the given standard CSIDL_XXX constant
74 static wxString DoGetDirectory(int csidl);
75
76 // return the directory of the application itself
77 wxString GetAppDir() const;
78
79 // directory returned by GetAppDir()
80 mutable wxString m_appDir;
81 };
82
83 // ----------------------------------------------------------------------------
84 // wxStandardPathsWin16: this class is for internal use only
85 // ----------------------------------------------------------------------------
86
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
90 {
91 public:
92 virtual wxString GetConfigDir() const;
93 virtual wxString GetUserConfigDir() const;
94 };
95
96 #endif // _WX_MSW_STDPATHS_H_