Coverage Report

Created: 2024-03-18 06:28

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