]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/corefoundation/stdpaths.h
allow changing the page from keyboard in property sheet like controls even when the...
[wxWidgets.git] / include / wx / mac / corefoundation / stdpaths.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/corefoundation/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 // ----------------------------------------------------------------------------
22 // wxStandardPaths
23 // ----------------------------------------------------------------------------
24
25 class WXDLLIMPEXP_BASE wxStandardPathsCF : public wxStandardPathsBase
26 {
27 public:
28 wxStandardPathsCF();
29 ~wxStandardPathsCF();
30
31 // wxMac specific: allow user to specify a different bundle
32 wxStandardPathsCF(wxCFBundleRef bundle);
33 void SetBundle(wxCFBundleRef bundle);
34
35 // implement base class pure virtuals
36 virtual wxString GetConfigDir() const;
37 virtual wxString GetUserConfigDir() const;
38 virtual wxString GetDataDir() const;
39 virtual wxString GetLocalDataDir() const;
40 virtual wxString GetUserDataDir() const;
41 virtual wxString GetPluginsDir() const;
42 virtual wxString GetResourcesDir() const;
43 virtual wxString GetLocalizedResourcesDir(const wxChar *lang,
44 ResourceCat category) const;
45 virtual wxString GetDocumentsDir() const;
46
47 protected:
48 // this function can be called with any of CFBundleCopyXXXURL function
49 // pointer as parameter
50 wxString GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const;
51
52 wxCFBundleRef m_bundle;
53 };
54
55 // If using UNIX (i.e. darwin) then use UNIX standard paths
56 #if defined(__UNIX__)
57 #include "wx/unix/stdpaths.h"
58 #else
59 // If compiling wxMac for CarbonLib then we are wxStandardPaths
60 class WXDLLIMPEXP_BASE wxStandardPaths: public wxStandardPathsCF
61 {
62 };
63 #endif
64
65 #endif // _WX_MAC_STDPATHS_H_