X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ae3ead6f0ed2b7b1bfc40317e65ffe71e0b3321..4f2511d706e5274a34e1521e11c1b95fed735b42:/include/wx/stdpaths.h diff --git a/include/wx/stdpaths.h b/include/wx/stdpaths.h index 9f6c619f63..f32d6ee958 100644 --- a/include/wx/stdpaths.h +++ b/include/wx/stdpaths.h @@ -39,6 +39,15 @@ public: ResourceCat_Max }; + // what should we use to construct paths unique to this application: + // (AppInfo_AppName and AppInfo_VendorName can be combined together) + enum + { + AppInfo_None = 0, // nothing + AppInfo_AppName = 1, // the application name + AppInfo_VendorName = 2 // the vendor name + }; + // return the global standard paths object static wxStandardPathsBase& Get(); @@ -126,13 +135,32 @@ public: virtual wxString GetTempDir() const; + // ctor for the base class + wxStandardPathsBase(); + // virtual dtor for the base class virtual ~wxStandardPathsBase(); + // Information used by AppendAppInfo + void UseAppInfo(int info) + { + m_usedAppInfo = info; + } + + bool UsesAppInfo(int info) const { return (m_usedAppInfo & info) != 0; } + + protected: - // append "/appname" suffix if the app name is set (doesn't append the - // slash if dir already ends with a slash or dot) - static wxString AppendAppName(const wxString& dir); + // append the path component, with a leading path seperator if a + // path seperator or dot (.) is not already at the end of dir + static wxString AppendPathComponent(const wxString& dir, const wxString& component); + + // append application information determined by m_usedAppInfo to dir + wxString AppendAppInfo(const wxString& dir) const; + + + // combination of AppInfo_XXX flags used by AppendAppInfo() + int m_usedAppInfo; }; #if wxUSE_STDPATHS @@ -141,7 +169,7 @@ protected: #define wxHAS_NATIVE_STDPATHS // We want CoreFoundation paths on both CarbonLib and Darwin (for all ports) #elif defined(__WXMAC__) || defined(__DARWIN__) - #include "wx/mac/corefoundation/stdpaths.h" + #include "wx/osx/core/stdpaths.h" #define wxHAS_NATIVE_STDPATHS #elif defined(__OS2__) #include "wx/os2/stdpaths.h"