wxMaxima
Loading...
Searching...
No Matches
TroubleshootingDialog.h
Go to the documentation of this file.
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2//
3// Copyright (C) 2026 Gunter Königsmann <wxMaxima@physikbuch.de>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15//
16// You should have received a copy of the GNU General Public License
17// along with this program; if not, write to the Free Software
18// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19//
20// SPDX-License-Identifier: GPL-2.0+
21
26#ifndef TROUBLESHOOTINGDIALOG_H
27#define TROUBLESHOOTINGDIALOG_H
28
29#include "precomp.h"
32#include <wx/bookctrl.h>
33#include <wx/dataview.h>
34#include <wx/dialog.h>
35#include <wx/textctrl.h>
36#include <memory>
37#include <vector>
38
55class TroubleshootingDialog : public wxDialog
56{
57public:
59 struct Inputs {
67 bool offerHelpSidebar = false;
69 long language = 0;
70 };
71
72 TroubleshootingDialog(wxWindow *parent, const Inputs &inputs);
73
75 static std::vector<wxm::TroubleshootingResult> LocalChecks(const Inputs &inputs);
76
77private:
79 void RunChecks();
81 void ShowResult(const wxm::TroubleshootingResult &result);
83 void UpdatePageText(wxm::TroubleshootingSection section);
85 wxm::TroubleshootingCheck SelectedCheck() const;
87 void SelectCheck(wxm::TroubleshootingCheck check);
89 void ShowDetails();
90 void OnSelectionChanged(wxDataViewEvent &event);
91 void OnPageChanged(wxBookCtrlEvent &event);
92 void OnRunAgain(wxCommandEvent &event);
93 void OnCopyReport(wxCommandEvent &event);
95 void OnFinished();
96
97 Inputs m_inputs;
99 std::vector<wxm::TroubleshootingResult> m_results;
100 std::unique_ptr<TroubleshootingRunner> m_runner;
102 wxBookCtrlBase *m_book = nullptr;
104 std::vector<wxDataViewListCtrl *> m_lists;
106 std::vector<unsigned int> m_rows;
107 wxTextCtrl *m_details = nullptr;
108 wxButton *m_runAgain = nullptr;
109};
110
111#endif // TROUBLESHOOTINGDIALOG_H
The checks the troubleshooting dialog runs (GH #2559), their results, and the pure helpers that inter...
TroubleshootingCheck
One thing the troubleshooting dialog checks. The order is the display order.
Definition: TroubleshootingChecks.h:42
TroubleshootingSection
The groups the dialog shows the checks in, one page each.
Definition: TroubleshootingChecks.h:86
Runs the troubleshooting checks that need Maxima or gnuplot (GH #2559).
Checks the things that commonly keep wxMaxima from working, and tells what it found.
Definition: TroubleshootingDialog.h:56
static std::vector< wxm::TroubleshootingResult > LocalChecks(const Inputs &inputs)
The checks that need no Maxima: what wxWidgets and wxMaxima's own state say.
Definition: TroubleshootingDialog.cpp:199
What the checks need to know about the running wxMaxima.
Definition: TroubleshootingDialog.h:59
long language
The language configured, a wxLanguage.
Definition: TroubleshootingDialog.h:69
TroubleshootingRunner::Settings runner
How to start Maxima and where gnuplot is, as the worksheet does it.
Definition: TroubleshootingDialog.h:61
wxString wxMaximaManual
Where wxMaxima's own HTML manual is expected.
Definition: TroubleshootingDialog.h:63
wxString helpUrlForIntegrate
Where the worksheet's help would show the entry for integrate(); empty if nowhere.
Definition: TroubleshootingDialog.h:65
bool offerHelpSidebar
Whether the integrated help browser can be offered.
Definition: TroubleshootingDialog.h:67
What the runner needs to know to start Maxima and gnuplot.
Definition: TroubleshootingRunner.h:72
The result of one check.
Definition: TroubleshootingChecks.h:95