stdpaths.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/unix/stdpaths.h
  3. // Purpose: wxStandardPaths for Unix systems
  4. // Author: Vadim Zeitlin
  5. // Modified by:
  6. // Created: 2004-10-19
  7. // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_UNIX_STDPATHS_H_
  11. #define _WX_UNIX_STDPATHS_H_
  12. // ----------------------------------------------------------------------------
  13. // wxStandardPaths
  14. // ----------------------------------------------------------------------------
  15. class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase
  16. {
  17. public:
  18. // tries to determine the installation prefix automatically (Linux only right
  19. // now) and returns /usr/local if it failed
  20. void DetectPrefix();
  21. // set the program installation directory which is /usr/local by default
  22. //
  23. // under some systems (currently only Linux) the program directory can be
  24. // determined automatically but for portable programs you should always set
  25. // it explicitly
  26. void SetInstallPrefix(const wxString& prefix);
  27. // get the program installation prefix
  28. //
  29. // if the prefix had been previously by SetInstallPrefix, returns that
  30. // value, otherwise calls DetectPrefix()
  31. wxString GetInstallPrefix() const;
  32. // implement base class pure virtuals
  33. virtual wxString GetExecutablePath() const;
  34. virtual wxString GetConfigDir() const;
  35. virtual wxString GetUserConfigDir() const;
  36. virtual wxString GetDataDir() const;
  37. virtual wxString GetLocalDataDir() const;
  38. virtual wxString GetUserDataDir() const;
  39. virtual wxString GetPluginsDir() const;
  40. virtual wxString GetLocalizedResourcesDir(const wxString& lang,
  41. ResourceCat category) const;
  42. #ifndef __VMS
  43. virtual wxString GetDocumentsDir() const;
  44. #endif
  45. protected:
  46. // Ctor is protected, use wxStandardPaths::Get() instead of instantiating
  47. // objects of this class directly.
  48. wxStandardPaths() { }
  49. private:
  50. wxString m_prefix;
  51. };
  52. #endif // _WX_UNIX_STDPATHS_H_