X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3af9f2de592953bec39a58cc871678fa85a3b056..5064e6eff3ca35cb20130dc9e5e53fb3ac02127e:/include/wx/stdpaths.h diff --git a/include/wx/stdpaths.h b/include/wx/stdpaths.h index 233fc7f3a8..7828b69e62 100644 --- a/include/wx/stdpaths.h +++ b/include/wx/stdpaths.h @@ -17,6 +17,7 @@ #if wxUSE_STDPATHS #include "wx/string.h" +#include "wx/filefn.h" // ---------------------------------------------------------------------------- // wxStandardPaths returns the standard locations in the file system @@ -42,6 +43,11 @@ public: // return the global standard paths object static wxStandardPathsBase& Get(); + // return the path (directory+filename) of the running executable or + // wxEmptyString if it couldn't be determined. + // The path is returned as an absolute path whenever possible. + // Default implementation only try to use wxApp->argv[0]. + virtual wxString GetExecutablePath() const; // return the directory with system config files: // /etc under Unix, c:\Documents and Settings\All Users\Application Data @@ -104,11 +110,21 @@ public: // prefix/share/locale/lang/LC_MESSAGES) virtual wxString GetLocalizedResourcesDir(const wxChar *lang, - ResourceCat category = ResourceCat_None) const + ResourceCat WXUNUSED(category) + = ResourceCat_None) const { return GetResourcesDir() + wxFILE_SEP_PATH + lang; } + // return the "Documents" directory for the current user + // + // C:\Documents and Settings\username\Documents under Windows, + // $HOME under Unix and ~/Documents under Mac + virtual wxString GetDocumentsDir() const; + + // return the temporary directory for the current user + virtual wxString GetTempDir() const; + // virtual dtor for the base class virtual ~wxStandardPathsBase(); @@ -141,12 +157,15 @@ class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase public: void SetInstallPrefix(const wxString& prefix) { m_prefix = prefix; } wxString GetInstallPrefix() const { return m_prefix; } + + virtual wxString GetExecutablePath() const { return m_prefix; } virtual wxString GetConfigDir() const { return m_prefix; } virtual wxString GetUserConfigDir() const { return m_prefix; } virtual wxString GetDataDir() const { return m_prefix; } virtual wxString GetLocalDataDir() const { return m_prefix; } virtual wxString GetUserDataDir() const { return m_prefix; } virtual wxString GetPluginsDir() const { return m_prefix; } + virtual wxString GetDocumentsDir() const { return m_prefix; } private: wxString m_prefix;