wxMaxima
Loading...
Searching...
No Matches
Dirstructure.h
Go to the documentation of this file.
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2// Copyright (C) 2004-2015 Andrej Vodopivec <andrej.vodopivec@gmail.com>
3// (C) 2015 Gunter Königsmann <wxMaxima@physikbuch.de>
4// (C) 2013 Doug Ilijev <doug.ilijev@gmail.com>
5//
6// This program is free software; you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation; either version 2 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16//
17// You should have received a copy of the GNU General Public License
18// along with this program; if not, write to the Free Software
19// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20//
21// SPDX-License-Identifier: GPL-2.0+
22
29#ifndef DIRSTRUCTURE_H
30#define DIRSTRUCTURE_H
31
32
33
34#include "precomp.h"
35#include <wx/wx.h>
36#include <wx/string.h>
37#include <wx/stdpaths.h>
38#include <wx/utils.h>
39
50{
51public:
54 ~Dirstructure(){ m_dirStructure = nullptr; }
55private:
57 static wxString ResourcesDir();
58
59public:
61 static wxString UserConfDir() {return m_userConfDir;}
63 static void UserConfDir(const wxString &userConfDir);
64
66 static wxString DataDir();
67
69 wxString HelpDir() const {return m_helpDir;}
71 void HelpDir(const wxString &helpDir){m_helpDir = helpDir;}
72
76 static wxString UserAutocompleteFile();
77
79 static wxString AutocompleteFile()
80 { return DataDir() + wxS("/autocomplete.txt"); }
81
86 static wxString LocaleDir()
87 { return ResourcesDir() + wxS("/locale"); }
88
90 static wxString MaximaDefaultLocation();
91
92 static wxString AnchorsCacheFile()
93 {
94 // UserConfDir() already ends in a path separator; don't add another or the
95 // cache path gets a stray "//" (a "strange directory" in the logs).
96 return UserConfDir() + "manual_anchors.xml";
97 }
98
99 static Dirstructure *Get()
100 {
101 return m_dirStructure;
102 }
103private:
104 wxString m_helpDir;
105 static wxString m_userConfDir;
106 static Dirstructure *m_dirStructure;
107};
108
109#endif // DIRSTRUCTURE_H
An object that represents the directory structure wxMaxima is installed in.
Definition: Dirstructure.h:50
static wxString LocaleDir()
The directory the locale data is to be found in.
Definition: Dirstructure.h:86
static wxString MaximaDefaultLocation()
The executable file path to the maxima executable (or .bat on Windows)
Definition: Dirstructure.cpp:149
static wxString AutocompleteFile()
The path to wxMaxima's own AutoComplete file.
Definition: Dirstructure.h:79
Dirstructure()
The constructor and destructor.
Definition: Dirstructure.cpp:42
static wxString UserConfDir()
The directory the user stores its data in.
Definition: Dirstructure.h:61
void HelpDir(const wxString &helpDir)
Set the directory the help file is stored in.
Definition: Dirstructure.h:71
static wxString DataDir()
The directory general data is stored in.
Definition: Dirstructure.cpp:139
static wxString UserAutocompleteFile()
The file private accelerator key information is stored in.
Definition: Dirstructure.cpp:251
wxString HelpDir() const
The directory the help file is stored in.
Definition: Dirstructure.h:69