]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/stdpaths.h
Define WXBUILDING in Xcode projects.
[wxWidgets.git] / include / wx / msw / stdpaths.h
CommitLineData
40e8ee37
VZ
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
19class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase
20{
21public:
22 // implement base class pure virtuals
ac7ad70d 23 virtual wxString GetExecutablePath() const;
40e8ee37
VZ
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;
17af82fb 30 virtual wxString GetDocumentsDir() const;
40e8ee37 31
4cd15b49
VZ
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
94aff795
VZ
61
62 // Returns the directory corresponding to the specified Windows shell CSIDL
63 static wxString MSWGetShellDir(int csidl);
64
40e8ee37 65protected:
38aae140
VZ
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
40e8ee37
VZ
73 // get the path corresponding to the given standard CSIDL_XXX constant
74 static wxString DoGetDirectory(int csidl);
adaa49a8
VZ
75
76 // return the directory of the application itself
4cd15b49
VZ
77 wxString GetAppDir() const;
78
79 // directory returned by GetAppDir()
80 mutable wxString m_appDir;
40e8ee37
VZ
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)
89class WXDLLIMPEXP_BASE wxStandardPathsWin16 : public wxStandardPaths
90{
91public:
92 virtual wxString GetConfigDir() const;
93 virtual wxString GetUserConfigDir() const;
94};
95
96#endif // _WX_MSW_STDPATHS_H_