]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/osx/core/stdpaths.h
Define WXBUILDING in Xcode projects.
[wxWidgets.git] / include / wx / osx / core / stdpaths.h
index 3fcb8d5676beca3ffefe77773e93d225a857d867..aed2c10a2105c3fec4e8597105867d61eb585aa6 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        wx/mac/corefoundation/stdpaths.h
+// Name:        wx/osx/core/stdpaths.h
 // Purpose:     wxStandardPaths for CoreFoundation systems
 // Author:      David Elliott
 // Modified by:
 // Purpose:     wxStandardPaths for CoreFoundation systems
 // Author:      David Elliott
 // Modified by:
@@ -18,14 +18,23 @@ struct __CFURL;
 typedef const __CFURL * wxCFURLRef;
 typedef __CFBundle * wxCFBundleRef;
 
 typedef const __CFURL * wxCFURLRef;
 typedef __CFBundle * wxCFBundleRef;
 
+// we inherit the GUI CF-based wxStandardPaths implementation from the Unix one
+// used for console programs if possible (i.e. if we're under a Unix system at
+// all)
+#if defined(__UNIX__)
+    #include "wx/unix/stdpaths.h"
+    #define wxStandardPathsCFBase wxStandardPaths
+#else
+    #define wxStandardPathsCFBase wxStandardPathsBase
+#endif
+
 // ----------------------------------------------------------------------------
 // wxStandardPaths
 // ----------------------------------------------------------------------------
 
 // ----------------------------------------------------------------------------
 // wxStandardPaths
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_BASE wxStandardPathsCF : public wxStandardPathsBase
+class WXDLLIMPEXP_BASE wxStandardPathsCF : public wxStandardPathsCFBase
 {
 public:
 {
 public:
-    wxStandardPathsCF();
     virtual ~wxStandardPathsCF();
 
     // wxMac specific: allow user to specify a different bundle
     virtual ~wxStandardPathsCF();
 
     // wxMac specific: allow user to specify a different bundle
@@ -47,6 +56,10 @@ public:
     virtual wxString GetDocumentsDir() const;
 
 protected:
     virtual wxString GetDocumentsDir() const;
 
 protected:
+    // Ctor is protected, use wxStandardPaths::Get() instead of instantiating
+    // objects of this class directly.
+    wxStandardPathsCF();
+
     // this function can be called with any of CFBundleCopyXXXURL function
     // pointer as parameter
     wxString GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const;
     // this function can be called with any of CFBundleCopyXXXURL function
     // pointer as parameter
     wxString GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const;
@@ -54,14 +67,4 @@ protected:
     wxCFBundleRef m_bundle;
 };
 
     wxCFBundleRef m_bundle;
 };
 
-// If using UNIX (i.e. darwin) then use UNIX standard paths
-#if defined(__UNIX__)
-#include "wx/unix/stdpaths.h"
-#else
-// If compiling wxMac for CarbonLib then we are wxStandardPaths
-class WXDLLIMPEXP_BASE wxStandardPaths: public wxStandardPathsCF
-{
-};
-#endif
-
 #endif // _WX_MAC_STDPATHS_H_
 #endif // _WX_MAC_STDPATHS_H_