X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ae3ead6f0ed2b7b1bfc40317e65ffe71e0b3321..d75a69e8329cecf6f07c667ffc015186c230a2b5:/include/wx/stdpaths.h diff --git a/include/wx/stdpaths.h b/include/wx/stdpaths.h index 9f6c619f63..999720d3ac 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