wxMaxima
Loading...
Searching...
No Matches
MaximaEvaluator.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
35#ifndef MAXIMAEVALUATOR_H
36#define MAXIMAEVALUATOR_H
37
38#include <wx/string.h>
39
40class wxMaxima;
41class wxCommandEvent;
42
49{
50public:
51 explicit MaximaEvaluator(wxMaxima &wxm) : m_wxMaxima(wxm) {}
52
55 void SendMaxima(wxString s, bool addToHistory = false, bool background = false);
56
58 void FirstOutput();
59
64 bool AbortOnError();
65
70 bool QueryVariableValue();
71
74 void EvaluateEvent(wxCommandEvent &event);
75
78 void TriggerEvaluation();
79
85 void SetupVariables();
86
87private:
90 wxMaxima &m_wxMaxima;
91};
92
93#endif // MAXIMAEVALUATOR_H
The evaluation-queue driver / command protocol extracted from wxMaxima.
Definition: MaximaEvaluator.h:49
void SendMaxima(wxString s, bool addToHistory=false, bool background=false)
Sends a string to the Maxima process (optionally adding it to the history and/or marking it a backgro...
Definition: MaximaEvaluator.cpp:44
bool QueryVariableValue()
Queries the value of the next variable wxMaxima wants to know about.
Definition: MaximaEvaluator.cpp:137
void TriggerEvaluation()
If Maxima is idle and the queue is non-empty, sends the next command; otherwise settles the UI into i...
Definition: MaximaEvaluator.cpp:305
void SetupVariables()
Sends Maxima the one-time startup configuration.
Definition: MaximaEvaluator.cpp:491
void EvaluateEvent(wxCommandEvent &event)
The "evaluate" menu/hotkey handler: queues the active/selected cells and starts evaluation (or sends ...
Definition: MaximaEvaluator.cpp:211
void FirstOutput()
Prepares the worksheet once Maxima's first prompt has been seen.
Definition: MaximaEvaluator.cpp:38
bool AbortOnError()
Reacts to a Maxima error: decides whether to keep evaluating the queue.
Definition: MaximaEvaluator.cpp:173
Definition: wxMaxima.h:75