wxMaxima
Loading...
Searching...
No Matches
wxMaxima.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) 2013 Doug Ilijev <doug.ilijev@gmail.com>
4// (C) 2014-2018 Gunter Königsmann <wxMaxima@physikbuch.de>
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
31#ifndef WXMAXIMA_H
32#define WXMAXIMA_H
33
34#include "BuildConfig.h"
35#include <vector>
36#include "wxMaximaFrame.h"
37#include "WXMXformat.h"
38#include "Configuration.h"
39#include "MathParser.h"
40#include "MaximaIPC.h"
41#include "MaximaCommandMenus.h"
44#include "MaximaEvaluator.h"
45#include "MaximaFileIO.h"
47#include "Dirstructure.h"
48#include <wx/socket.h>
49#include <wx/config.h>
50#include <wx/process.h>
51#include <wx/regex.h>
52#include <wx/dnd.h>
53#include <wx/txtstrm.h>
54#include <wx/sckstrm.h>
55#include <wx/buffer.h>
56#include <wx/power.h>
57#ifdef USE_QA
58#include <wx/debugrpt.h>
59#endif
60#include <memory>
61#ifdef __WXMSW__
62#include <windows.h>
63#endif
64#include <unordered_map>
65
67#define MAXIMAPOLLMSECS 2000
68
69class Maxima; // The Maxima process interface
70
71/* The top-level window and the main application logic
72
73 */
74class wxMaxima : public wxMaximaFrame
75{
76public:
77 wxMaxima(wxWindow *parent, int id, const wxString &title,
78 const wxString &filename = wxEmptyString,
79 const wxString &initialWorksheetContents = wxEmptyString,
80 const wxPoint pos = wxDefaultPosition, const wxSize size = wxDefaultSize);
81
82 virtual ~wxMaxima();
83 wxString EscapeFilenameForShell(wxString name);
85 static void ExitOnError(){m_exitOnError = true;}
87 static bool GetExitOnError(){return m_exitOnError;}
98 bool ExitOnErrorArmed() const { return m_exitOnError && m_exitOnErrorArmed; }
99
100#ifdef __WXMSW__
109 static void RepairFileAssociations();
110#endif
115 static void EnableIPC(){ MaximaIPC::EnableIPC(); }
117 static bool GetEnableIPC(){ return MaximaIPC::GetEnableIPC(); }
119 static void ExtraMaximaArgs(const wxString &args){m_extraMaximaArgs = args;}
121 static wxString ExtraMaximaArgs(){return m_extraMaximaArgs;}
122
125 {
132 };
133
134#ifdef wxHAS_POWER_EVENTS
135 void OnPowerEvent(wxPowerEvent &event);
136#endif
137
139 void OnTimerEvent(wxTimerEvent &event);
140
143
144 void ShowTip(bool force);
146 void EvalOnStartup(bool eval)
147 {
148 m_evalOnStartup = eval;
149 }
150
152 void ExitAfterEval(bool exitaftereval);
162 bool IsInteractive() const { return !m_exitAfterEval; }
163
164 void StripLispComments(wxString &s);
165
167 void LaunchHelpBrowser(wxString uri);
168
169
172 { return m_fileSaved; }
173
175 void LoadImage(const wxString &file)
176 { GetWorksheet()->OpenHCaret(file, GC_TYPE_IMAGE); }
177
180 {
181 public:
182 explicit VersionNumber(const wxString &version);
183 long Major() const {return m_major;}
184 long Minor() const {return m_minor;}
185 long Patchlevel() const {return m_patchlevel;}
186 auto operator<=>(const VersionNumber&) const = default;
187 private:
188 long m_major = -1;
189 long m_minor = -1;
190 long m_patchlevel = -1;
191 };
192
194 static void Set_Maxima_Commandline_Filename(const wxString &filename)
195 {maxima_command_line_filename = filename;}
197 static const wxString Get_Maxima_Commandline_Filename() {return maxima_command_line_filename;}
198
199 static int GetExitCode(){return m_exitCode;}
200
201private:
203 static wxString maxima_command_line_filename;
205 bool m_maximaAuthenticated = false;
207 bool m_discardAllData = false;
209 wxString m_maximaAuthString;
211 MaximaIPC m_ipc{this};
214 static bool m_exitOnError;
218 bool m_exitOnErrorArmed = true;
220 static wxString m_extraMaximaArgs;
222 std::vector<wxString> m_varNamesToQuery;
223
225 bool m_openInitialFileError = false;
227 wxString EscapeForLisp(wxString str);
229 long long m_maximaJiffies_old = 0;
231 long long m_cpuTotalJiffies_old = 0;
234 wxString m_configCommands;
236 static wxRegEx m_gnuplotErrorRegex;
238 wxString m_oldFindString;
240 int m_oldFindFlags = 0;
242 bool m_hasEvaluatedCells = false;
244 long m_outputCellsFromCurrentCommand = 0;
246 long m_maxOutputCellsPerCommand = 0;
253 int m_unsuccessfulConnectionAttempts = 11;
255 wxString m_CWD;
257 bool m_evalOnStartup = false;
259 bool m_exitAfterEval = false;
261 bool m_ready = false;
262
267 wxString GetUnmatchedParenthesisState(wxString text, std::size_t &index);
269 wxMemoryBuffer m_uncompletedChars;
270
271protected:
273 void CommandWiz(const wxString &title,
274 const wxString &description, const wxString &description_tooltip,
275 const wxString &commandRule,
276 wxString label1, wxString defaultval1, wxString tooltip1 = {},
277 wxString label2 = {}, wxString defaultval2 = {}, wxString tooltip2 = {},
278 wxString label3 = {}, wxString defaultval3 = {}, wxString tooltip3 = {},
279 wxString label4 = {}, wxString defaultval4 = {}, wxString tooltip4 = {},
280 wxString label5 = {}, wxString defaultval5 = {}, wxString tooltip5 = {},
281 wxString label6 = {}, wxString defaultval6 = {}, wxString tooltip6 = {},
282 wxString label7 = {}, wxString defaultval7 = {}, wxString tooltip7 = {},
283 wxString label8 = {}, wxString defaultval8 = {}, wxString tooltip8 = {},
284 wxString label9 = {}, wxString defaultval9 = {}, wxString tooltip9 = {},
285 wxString label10 = {}, wxString defaultval10 = {}, wxString tooltip10 = {}
286 );
288 static wxRegEx m_xmlOpeningTagName;
290 static wxRegEx m_xmlOpeningTag;
292 wxProcess *m_gnuplotProcess = NULL;
305 bool m_isActive = true;
307 void OnFocus(wxFocusEvent &event);
308
310 void PassKeyboardFocus();
312 void OnMinimize(wxIconizeEvent &event);
314 void ConfigChanged();
316 void OnJumpToError(wxCommandEvent &event);
318 void OnSymbolAdd(wxCommandEvent &event);
320 void OnFollow(wxCommandEvent &event);
321 void OnWizardAbort(wxCommandEvent &event);
322 void OnWizardOK(wxCommandEvent &event);
323 void OnWizardInsert(wxCommandEvent &event);
324 void OnWizardHelpButton(wxCommandEvent &event);
325
327 void ShowMaximaHelp(wxString = {});
328
331
333 void ShowWxMaximaHelp();
334
336 void ShowHelp(const wxString &keyword);
337
338 void CheckForUpdates(bool reportUpToDate = false);
339
340 void OnRecentDocument(wxCommandEvent &event);
341 void OnRecentPackage (wxCommandEvent &event);
342 void OnUnsavedDocument(wxCommandEvent &event);
343
344 void OnChar(wxKeyEvent &event);
345 void OnKeyDown(wxKeyEvent &event);
346
373 void OnIdle(wxIdleEvent &event);
374 bool m_dataFromMaximaIs = false;
375
376 void MenuCommand(const wxString &cmd);
377
384 void ExportWorksheetToHtml(const wxString &filename, const wxString &flavor,
385 bool embedWxmx);
386
395 void ExportWorksheetToTex(const wxString &filename,
396 const wxString &documentclass,
397 const wxString &documentclassOptions);
398#ifdef __WXMSW__
400 void RegisterWxmxDiffTool();
401#endif
402 void ReplaceSuggestion(wxCommandEvent &event);
404 void UpdateMenus();
405 void UpdateToolBar();
406 void UpdateSlider();
410 void ShowPane(wxCommandEvent &event); //<! Makes a sidebar visible
411
413 void ChangeCellStyle(wxCommandEvent &event);
414
416 void OnFind(wxFindDialogEvent &event);
417
419 void OnReplace(wxFindDialogEvent &event);
420
422 void OnReplaceAll(wxFindDialogEvent &event);
423
430 void AddDrawParameter(wxString cmd, int dimensionsOfNewDrawCommand = 2);
431
432 // The console output appenders (ConsoleAppend / DoConsoleAppend /
433 // DoRawConsoleAppend) and their AppendOpt options now live in
434 // MaximaOutputAppender (m_outputAppender).
435
441 void VarReadEvent(wxCommandEvent &event);
443 void VarAddAllEvent(wxCommandEvent &event);
444
445 void SliderEvent(wxScrollEvent &event);
446
448 void NetworkDClick(wxMouseEvent &ev);
450 void MaximaDClick(wxMouseEvent &ev);
452 void StatusMsgDClick(wxMouseEvent &ev);
453
455 void HistoryDClick(wxCommandEvent &event);
456
458 void TableOfContentsSelection(wxListEvent &event);
459
460 void OnInspectorEvent(wxCommandEvent &ev);
461
462 void DumpProcessOutput();
463
464
465 void TryUpdateInspector();
466
467 bool UpdateDrawPane();
468
469 wxString ExtractFirstExpression(const wxString &entry);
470
471 wxString GetDefaultEntry();
472
473 void OnClose(wxCloseEvent &event);
474 wxString GetCommand(bool params = true);
475 // (uses guessConfiguration)
476
477 void ReadMaximaIPC(const wxString &data){m_ipc.ReadInputData(data);}
478
479 wxString m_maximaVariable_display2d;
480 wxString m_maximaVariable_altdisplay2d;
481 wxString m_maximaVariable_engineeringFormat;
482 bool m_readMaximaVariables = false;
483 bool m_updateAutocompletion = true;
488 long long GetTotalCpuTime();
489
495 long long GetMaximaCpuTime();
496
501 double GetMaximaCPUPercentage();
502
504 bool SaveNecessary();
505
506
514 void ResetTitle(bool saved, bool force = false);
515
517 std::unique_ptr<GroupCell> CreateTreeFromXMLNode(wxXmlNode *xmlcells, const wxString &wxmxfilename = {});
518
520 bool SaveOnClose();
521
529 int SaveDocumentP();
530
532 void SetCWD(wxString file);
533
535 wxString GetCWD()
536 {
537 return m_CWD;
538 }
539
540 std::unique_ptr<Maxima> m_client;
547 void operator()(wxSocketServer* server) const {
548 server->Destroy(); // Destroy() calls Close() automatically.
549 }
550 };
557 std::unique_ptr<wxSocketServer, ServerDeleter> m_server;
558
559 wxProcess *m_maximaProcess = NULL;
561 wxInputStream *m_maximaStdout = NULL;
563 wxInputStream *m_maximaStderr = NULL;
567 wxOutputStream *m_maximaStdin = NULL;
571 bool m_inLDB = false;
573 int m_port = -1;
575 static wxString m_mathPrefix1;
577 static wxString m_mathPrefix2;
579 static wxString m_promptPrefix;
580public:
582 const static wxString m_promptSuffix;
583protected:
589 void QuestionAnswered(){if(GetWorksheet()) GetWorksheet()->QuestionAnswered();}
592 void OnNewDemoFiles(wxCommandEvent &event);
594 void OnUpdateTOCEvent(wxCommandEvent &event);
595
597 static wxString m_firstPrompt;
598 bool m_dispReadOut = false;
599 wxWindowIDRef m_gnuplot_process_id;
600 wxWindowIDRef m_maxima_process_id;
601 wxString m_lastPrompt;
602 wxString m_firstPromptBuffer;
603 wxString m_lastPath;
604 std::unique_ptr<wxPrintData> m_printData;
609 bool m_closing = false;
612 wxString m_maximaHtmlDir;
613 bool m_fileSaved = true;
614 static int m_exitCode;
617#ifdef __WINDOWS__
618 // For Windows, store "gnuplot.exe", even if wgnuplot.exe is preferred.
619 // We query the terminals using: gnuplot -e "print GPVAL_TERMINALS"
620 // and that does only work with gnuplot, not wgnuplot.
622 wxString m_gnuplotcommand_commandline;
623#endif
624 long m_commandIndex = -1;
626 static wxRegEx m_funRegEx;
627 static wxRegEx m_varRegEx;
628 static wxRegEx m_blankStatementRegEx;
629 static wxRegEx m_sbclCompilationRegEx;
630 MathParser m_parser;
631 bool m_maximaBusy = true;
632 bool m_maximaError = false;
633private:
634 wxString m_fileToOpen;
635 bool m_fourierLoaded = false;
636
637#if wxUSE_DRAG_AND_DROP
638
639 friend class MyDropTarget;
640
641#endif
642 friend class MaximaIPC;
645 friend class MaximaCommandMenus;
657 friend class MaximaEvaluator;
661 friend class MaximaFileIO;
666
677 wxTimer m_autoSaveTimer;
678
679 /* A timer that delays redraws while maxima evaluates
680
681 If we always start a redraw when maxima has nearly finished a command that slows
682 down evaluating many simple commands in a row.
683 */
684 wxTimer m_fastResponseTimer;
685
687 void StartAutoSaveTimer();
691 MaximaCommandMenus m_menuCommands;
696 MaximaResponseReader m_responseReader;
700 MaximaProcessManager m_processManager;
704 MaximaEvaluator m_evaluator;
708 MaximaFileIO m_fileIO;
712 MaximaOutputAppender m_outputAppender;
713};
714
723
724#if wxUSE_DRAG_AND_DROP
725
726// cppcheck-suppress noConstructor
727class MyApp : public wxApp
728{
729public:
730 virtual bool OnInit() override;
731 virtual int OnRun() override;
732 virtual int OnExit() override;
733#if wxUSE_ON_FATAL_EXCEPTION && wxUSE_DEBUGREPORT
734 void OnFatalException () override;
735#endif
746 void OnAssertFailure(const wxChar *file, int line, const wxChar *func,
747 const wxChar *cond, const wxChar *msg) override;
761 static void NewWindow(const wxString &file = {}, bool evalOnStartup = false, bool exitAfterEval = false, unsigned char *wxmData = NULL, std::size_t wxmLen = 0);
762
763 void OnFileMenu(wxCommandEvent &ev);
764
765#ifdef __WXMSW__
778 void DisableConsoleQuickEdit();
780 void RestoreConsoleMode();
781#endif // __WXMSW__
782
783#ifdef __WXMAC__
784 void MacNewFile() override;
785 void MacOpenFile(const wxString &file) override;
786#endif // __WXMAC__
787
788public:
789 static wxLogWindow *m_logWindow; // The wxWidgets log window, we use.
790
798 static std::unique_ptr<wxLogChain> m_logChain;
799 static std::vector<wxProcess *> m_wxMaximaProcesses;
800#ifdef USE_QA
801#if wxUSE_ON_FATAL_EXCEPTION && wxUSE_DEBUGREPORT
802 void GenerateDebugReport(wxDebugReport::Context ctx);
803#endif
804#endif
805 std::unique_ptr<wxLocale> m_locale;
806 std::unique_ptr<wxTranslations> m_translations;
807#ifdef __WXMSW__
809 unsigned long m_consoleModeToRestore = 0;
811 bool m_consoleModeChanged = false;
812#endif
814 wxString m_configFileName;
815 Dirstructure m_dirstruct;
816 static bool m_allWindowsInOneProcess;
817 std::unique_ptr<Configuration> m_configuration;
818};
819
820class MyDropTarget : public wxFileDropTarget
821{
822public:
823 explicit MyDropTarget(wxMaxima *wxmax)
824 { m_wxmax = wxmax; }
825
826 bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &files);
827
828private:
829 wxMaxima *m_wxmax = NULL;
830};
831
832#endif
833
834
835// cppcheck-suppress noConstructor
836
837#endif // WXMAXIMA_H
This file declares the class DirStructure.
The header file for the xml cell parser.
The menu/toolbar command handlers wxMaxima binds to the "insert a Maxima command" menu and button eve...
Drives the evaluation of the worksheet: it pulls cells off the evaluation queue, sends their commands...
Loads and saves worksheet files (.wxmx, .wxm, .mac/.out, .xml) for wxMaxima.
Appends Maxima's (and wxMaxima's own) output to the worksheet.
The wxMaxima-side owner of the Maxima process and its control socket.
The handlers that turn a chunk of data Maxima sent into a change to wxMaxima's state and worksheet.
Appearance
How wxMaxima chooses between the light and the dark style set.
Definition: Configuration.h:869
An object that represents the directory structure wxMaxima is installed in.
Definition: Dirstructure.h:58
Definition: FindReplacePane.h:50
This class handles parsing the xml representation of a cell tree.
Definition: MathParser.h:54
The menu-command handlers extracted from the wxMaxima god class.
Definition: MaximaCommandMenus.h:49
The evaluation-queue driver / command protocol extracted from wxMaxima.
Definition: MaximaEvaluator.h:49
The worksheet file loaders/savers extracted from the wxMaxima god class.
Definition: MaximaFileIO.h:49
Handles the "<ipc>" tag from Maxima.
Definition: MaximaIPC.h:41
void ReadInputData(const wxString &data)
Reads the interprocess communications tag, used in test scripts, etc.
Definition: MaximaIPC.cpp:90
Definition: MaximaOutputAppender.h:43
The Maxima process/socket lifecycle extracted from the wxMaxima god class.
Definition: MaximaProcessManager.h:55
The Maxima-response handlers extracted from the wxMaxima god class.
Definition: MaximaResponseReader.h:58
Interface to the Maxima process.
Definition: Maxima.h:63
Definition: test_ImgCell.cpp:71
void OpenHCaret(const wxString &txt={})
Place the cursor into a new cell where the horizontal cursor is.
Definition: Worksheet.h:1332
void QuestionAnswered()
Mark the current question from maxima as "answered"..
Definition: Worksheet.cpp:2463
The frame containing the menu and the sidebars.
Definition: wxMaximaFrame.h:66
A version number that can be compared using "<" and ">".
Definition: wxMaxima.h:180
Definition: wxMaxima.h:75
void OnIdle(wxIdleEvent &event)
The idle task that refreshes the gui (worksheet, menus, title line,...)
Definition: wxMaxima.cpp:1754
void StatusMsgDClick(wxMouseEvent &ev)
Issued on double click on the status message in the status bar.
Definition: wxMaxima.cpp:3191
int m_port
The port the actual maxima process (not its wrapper script) runs at.
Definition: wxMaxima.h:573
wxOutputStream * m_maximaStdin
The stdin of the maxima process. Normally unused (commands go over the socket), but sbcl's low-level ...
Definition: wxMaxima.h:567
bool m_dispReadOut
what is displayed in statusbar
Definition: wxMaxima.h:598
bool m_scheduleUpdateToc
True = schedule an update of the table of contents.
Definition: wxMaxima.h:588
void ShowTip(bool force)
Definition: wxMaxima.cpp:1563
static wxRegEx m_xmlOpeningTag
Looks if this opening tag is actually complete.
Definition: wxMaxima.h:290
bool IsInteractive() const
Is this an interactive session (as opposed to a batch run that will exit)?
Definition: wxMaxima.h:162
static wxString m_promptPrefix
The marker for the start of a input prompt.
Definition: wxMaxima.h:579
void OnMinimize(wxIconizeEvent &event)
Called when this window is minimized.
Definition: wxMaxima.cpp:3416
static const wxString Get_Maxima_Commandline_Filename()
The maxima command, if we use the –maxima=<str> command. If empty we use the configured path,...
Definition: wxMaxima.h:197
void ShowWxMaximaHelp()
Show the help for wxMaxima.
Definition: wxMaxima.cpp:1633
void ChangeCellStyle(wxCommandEvent &event)
Is triggered when the textstyle drop-down box's value is changed.
Definition: wxMaxima.cpp:3423
static wxString ExtraMaximaArgs()
Which additional maxima arguments did we get from the command line?
Definition: wxMaxima.h:121
bool m_isActive
Is this window active?
Definition: wxMaxima.h:305
void NetworkDClick(wxMouseEvent &ev)
Issued on double click on the network status.
Definition: wxMaxima.cpp:3183
void OnReplace(wxFindDialogEvent &event)
Is triggered when the "Replace" button in the search dialog is pressed.
Definition: wxMaxima.cpp:2552
int SaveDocumentP()
Tries or offers to save the document.
Definition: wxMaxima.cpp:3362
void AddDrawParameter(wxString cmd, int dimensionsOfNewDrawCommand=2)
Add a parameter to a draw command.
Definition: wxMaxima.cpp:2624
void ShowHelp(const wxString &keyword)
Try to determine if help is needed for maxima or wxMaxima and show this help.
Definition: wxMaxima.cpp:1714
static void ExtraMaximaArgs(const wxString &args)
Additional maxima arguments from the command line.
Definition: wxMaxima.h:119
void EvalOnStartup(bool eval)
Do we want to evaluate the document on startup?
Definition: wxMaxima.h:146
static void ExitOnError()
Exit if we encounter an error.
Definition: wxMaxima.h:85
void OnUpdateTOCEvent(wxCommandEvent &event)
Is called when something requests an update of the table of contents.
Definition: wxMaxima.cpp:2347
void UpdateMenus()
Enables and disables the Right menu buttons.
Definition: wxMaxima.cpp:2140
void LaunchHelpBrowser(wxString uri)
Launches the help browser on the uri passed as an argument.
Definition: wxMaxima.cpp:1579
wxInputStream * m_maximaStdout
The stdout of the maxima process.
Definition: wxMaxima.h:561
void VarReadEvent(wxCommandEvent &event)
Spawn the "configure" menu.
Definition: wxMaxima.cpp:2950
static bool GetEnableIPC()
Do we allow maxima to click buttons in wxMaxima?
Definition: wxMaxima.h:117
std::unique_ptr< wxSocketServer, ServerDeleter > m_server
The server maxima connects to as client.
Definition: wxMaxima.h:557
wxTimer m_maximaStdoutPollTimer
A timer that polls for output from the maxima process.
Definition: wxMaxima.h:142
void OnFollow(wxCommandEvent &event)
Called when the "Scroll to currently evaluated" button is pressed.
Definition: wxMaxima.cpp:3218
bool DocumentSaved()
Does this document need saving?
Definition: wxMaxima.h:171
void ExportWorksheetToTex(const wxString &filename, const wxString &documentclass, const wxString &documentclassOptions)
Export the current worksheet to a LaTeX file (driven by wxworksheettotex).
Definition: wxMaxima.cpp:2098
void CommandWiz(const wxString &title, const wxString &description, const wxString &description_tooltip, const wxString &commandRule, wxString label1, wxString defaultval1, wxString tooltip1={}, wxString label2={}, wxString defaultval2={}, wxString tooltip2={}, wxString label3={}, wxString defaultval3={}, wxString tooltip3={}, wxString label4={}, wxString defaultval4={}, wxString tooltip4={}, wxString label5={}, wxString defaultval5={}, wxString tooltip5={}, wxString label6={}, wxString defaultval6={}, wxString tooltip6={}, wxString label7={}, wxString defaultval7={}, wxString tooltip7={}, wxString label8={}, wxString defaultval8={}, wxString tooltip8={}, wxString label9={}, wxString defaultval9={}, wxString tooltip9={}, wxString label10={}, wxString defaultval10={}, wxString tooltip10={})
Invoke our standard wizard that generates maxima commands.
Definition: wxMaxima.cpp:2658
static void Set_Maxima_Commandline_Filename(const wxString &filename)
Use this maxima command (from a command line option) instead of the configured path.
Definition: wxMaxima.h:194
long long GetMaximaCpuTime()
How much CPU time has maxima used till now? Used by GetMaximaCPUPercentage.
Definition: wxMaxima.cpp:2391
void ReplaceSuggestion(wxCommandEvent &event)
Processes clicks on suggestions Make the menu item, toolbars and panes visible that should be visible...
Definition: wxMaxima.cpp:3062
void SetCWD(wxString file)
Set the current working directory file I/O from maxima is relative to.
Definition: wxMaxima.cpp:1408
static wxRegEx m_xmlOpeningTagName
Finds the name of an opening tag.
Definition: wxMaxima.h:288
void LoadImage(const wxString &file)
Load an image from a file into the worksheet.
Definition: wxMaxima.h:175
static void EnableIPC()
Allow maxima to click buttons in wxMaxima.
Definition: wxMaxima.h:115
void UpdateToolBar()
Enables and disables the Right toolbar buttons.
Definition: wxMaxima.cpp:2209
void ExportWorksheetToHtml(const wxString &filename, const wxString &flavor, bool embedWxmx)
Export the current worksheet to an HTML file (driven by wxworksheettohtml).
Definition: wxMaxima.cpp:2051
void HistoryDClick(wxCommandEvent &event)
Issued on double click on a history item.
Definition: wxMaxima.cpp:3195
void OnNewDemoFiles(wxCommandEvent &event)
Is called when we get a new list of demo files Is called when we get a new list of demo files.
Definition: wxMaxima.cpp:1085
wxString GetCommand(bool params=true)
returns the command to start maxima
Definition: wxMaxima.cpp:1509
static wxString m_mathPrefix1
A marker for the start of maths.
Definition: wxMaxima.h:575
void OnFind(wxFindDialogEvent &event)
Is triggered when the "Find" button in the search dialog is pressed.
Definition: wxMaxima.cpp:2523
void OnSymbolAdd(wxCommandEvent &event)
Sends a new char to the symbols sidebar.
Definition: wxMaxima.cpp:2609
wxInputStream * m_maximaStderr
The stderr of the maxima process.
Definition: wxMaxima.h:563
bool ExitOnErrorArmed() const
Is THIS worksheet still set to exit on a Maxima error?
Definition: wxMaxima.h:98
void VarAddAllEvent(wxCommandEvent &event)
Trigger adding all variables to the variables sidebar.
Definition: wxMaxima.cpp:2941
static bool GetExitOnError()
Do we exit if we encounter an error?
Definition: wxMaxima.h:87
void OnTimerEvent(wxTimerEvent &event)
Is triggered when a timer this class is responsible for requires.
Definition: wxMaxima.cpp:2484
void PassKeyboardFocus()
Forwards the keyboard focus to a text control that might need it.
Definition: wxMaxima.cpp:3404
double GetMaximaCPUPercentage()
How much CPU horsepower is maxima using currently?
Definition: wxMaxima.cpp:2456
bool m_closing
Did we tell maxima to close?
Definition: wxMaxima.h:609
void ResetTitle(bool saved, bool force=false)
Update the title.
Definition: wxMaxima.cpp:3074
void OnJumpToError(wxCommandEvent &event)
Called when the "Scroll to last error" button is pressed.
wxString m_maximaTempDir
The directory with maxima's temp files.
Definition: wxMaxima.h:611
void OnReplaceAll(wxFindDialogEvent &event)
Is triggered when the "Replace All" button in the search dialog is pressed.
Definition: wxMaxima.cpp:2585
void MaximaDClick(wxMouseEvent &ev)
Issued on double click on the Maxima status icon.
Definition: wxMaxima.cpp:3187
wxProcess * m_gnuplotProcess
The gnuplot process info.
Definition: wxMaxima.h:292
void OnFocus(wxFocusEvent &event)
Called when this window is focussed or defocussed.
Definition: wxMaxima.cpp:3398
TimerIDs
An enum of individual IDs for all timers this class handles.
Definition: wxMaxima.h:125
@ KEYBOARD_INACTIVITY_TIMER_ID
The keyboard was inactive long enough that we can attempt an auto-save.
Definition: wxMaxima.h:127
@ AUTO_SAVE_TIMER_ID
The time between two auto-saves has elapsed.
Definition: wxMaxima.h:129
@ MAXIMA_STDOUT_POLL_ID
We look if we got new data from maxima's stdout.
Definition: wxMaxima.h:131
void OnClose(wxCloseEvent &event)
close wxMaxima window
Definition: wxMaxima.cpp:2846
bool SaveNecessary()
Does this file contain anything worth saving?
Definition: wxMaxima.cpp:2925
wxProcess * m_gnuplotTerminalQueryProcess
Info about the gnuplot process we start for querying the terminals it supports.
Definition: wxMaxima.h:294
void StripLispComments(wxString &s)
Remove empty statements.
Definition: wxMaxima.cpp:1357
void MenuCommand(const wxString &cmd)
Inserts command cmd into the worksheet.
Definition: wxMaxima.cpp:2023
bool m_inLDB
True while sbcl is stopped in its low-level debugger (LDB). Set from the LDB banner on the process's ...
Definition: wxMaxima.h:571
static const wxString m_promptSuffix
The marker for the end of a input prompt.
Definition: wxMaxima.h:582
void ShowMaximaHelp(wxString={})
Show the help for Maxima.
Definition: wxMaxima.cpp:1721
wxString m_gnuplotProbedCommand
The gnuplot command whose terminal support we already probed.
Definition: wxMaxima.h:303
wxString GetCWD()
Get the current working directory file I/O from maxima is relative to.
Definition: wxMaxima.h:535
std::unique_ptr< GroupCell > CreateTreeFromXMLNode(wxXmlNode *xmlcells, const wxString &wxmxfilename={})
Loads a wxmx description.
Definition: wxMaxima.cpp:1466
void ShowPane(wxCommandEvent &event)
Toggle the visibility of a pane.
Definition: wxMaxima.cpp:3157
void ShowMaximaHelpWithoutAnchor()
Show the help for Maxima (without handling of anchors).
Definition: wxMaxima.cpp:1672
long long GetTotalCpuTime()
How much CPU time has been used by the system until now? Used by GetMaximaCPUPercentage.
Definition: wxMaxima.cpp:2356
void ExitAfterEval(bool exitaftereval)
Do we want to exit the program after evaluation?
Definition: wxMaxima.cpp:1482
wxString m_gnuplotcommand
Maxima's idea about gnuplot's location.
Definition: wxMaxima.h:616
static wxString m_mathPrefix2
A marker for the start of maths.
Definition: wxMaxima.h:577
void UpdateSlider()
Updates the slider to show the right frame.
Definition: wxMaxima.cpp:3129
void TableOfContentsSelection(wxListEvent &event)
Issued on double click on a table of contents item.
Definition: wxMaxima.cpp:3201
void ConfigChanged()
Is called on start and whenever the configuration changes.
Definition: wxMaxima.cpp:184
static wxString m_firstPrompt
The first prompt maxima will output.
Definition: wxMaxima.h:597
bool SaveOnClose()
Try to save the file before closing it - or return false.
Definition: wxMaxima.cpp:2803
void func()
function in group 1
Definition: group.cpp:13
The Right Way to delete a wxSocketServer.
Definition: wxMaxima.h:546
This file declares the class wxMaximaFrame.
void ApplyAppearanceToApp(Configuration::Appearance appearance)
Apply the chosen light/dark appearance to the native application chrome (menus, toolbars,...
Definition: wxMaxima.cpp:162