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