]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/core/stdpaths.h
aed2c10a2105c3fec4e8597105867d61eb585aa6
[wxWidgets.git] / include / wx / osx / core / stdpaths.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/core/stdpaths.h
3 // Purpose: wxStandardPaths for CoreFoundation systems
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2004-10-27
7 // RCS-ID: $Id$
8 // Copyright: (c) 2004 David Elliott
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MAC_STDPATHS_H_
13 #define _WX_MAC_STDPATHS_H_
14
15 struct __CFBundle;
16 struct __CFURL;
17
18 typedef const __CFURL * wxCFURLRef;
19 typedef __CFBundle * wxCFBundleRef;
20
21 // we inherit the GUI CF-based wxStandardPaths implementation from the Unix one
22 // used for console programs if possible (i.e. if we're under a Unix system at
23 // all)
24 #if defined(__UNIX__)
25 #include "wx/unix/stdpaths.h"
26 #define wxStandardPathsCFBase wxStandardPaths
27 #else
28 #define wxStandardPathsCFBase wxStandardPathsBase
29 #endif
30
31 // ----------------------------------------------------------------------------
32 // wxStandardPaths
33 // ----------------------------------------------------------------------------
34
35 class WXDLLIMPEXP_BASE wxStandardPathsCF : public wxStandardPathsCFBase
36 {
37 public:
38 virtual ~wxStandardPathsCF();
39
40 // wxMac specific: allow user to specify a different bundle
41 wxStandardPathsCF(wxCFBundleRef bundle);
42 void SetBundle(wxCFBundleRef bundle);
43
44 // implement base class pure virtuals
45 virtual wxString GetExecutablePath() const;
46 virtual wxString GetConfigDir() const;
47 virtual wxString GetUserConfigDir() const;
48 virtual wxString GetDataDir() const;
49 virtual wxString GetLocalDataDir() const;
50 virtual wxString GetUserDataDir() const;
51 virtual wxString GetPluginsDir() const;
52 virtual wxString GetResourcesDir() const;
53 virtual wxString
54 GetLocalizedResourcesDir(const wxString& lang,
55 ResourceCat category = ResourceCat_None) const;
56 virtual wxString GetDocumentsDir() const;
57
58 protected:
59 // Ctor is protected, use wxStandardPaths::Get() instead of instantiating
60 // objects of this class directly.
61 wxStandardPathsCF();
62
63 // this function can be called with any of CFBundleCopyXXXURL function
64 // pointer as parameter
65 wxString GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const;
66
67 wxCFBundleRef m_bundle;
68 };
69
70 #endif // _WX_MAC_STDPATHS_H_