36#include "WXMXformat.h"
42#include <wx/process.h>
45#include <wx/txtstrm.h>
46#include <wx/sckstrm.h>
49#include <wx/debugrpt.h>
54#include <unordered_map>
57#define MAXIMAPOLLMSECS 2000
67 wxMaxima(wxWindow *parent,
int id,
const wxString &title,
68 const wxString &filename = wxEmptyString,
69 const wxString &initialWorksheetContents = wxEmptyString,
70 const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize);
73 wxString EscapeFilenameForShell(wxString name);
101#ifdef wxHAS_POWER_EVENTS
102 void OnPowerEvent(wxPowerEvent &event);
115 m_evalOnStartup = eval;
121 m_exitAfterEval = exitaftereval;
129 void SendMaxima(wxString s,
bool addToHistory =
false);
132 bool OpenFile(
const wxString &file,
const wxString &command ={});
136 {
return m_fileSaved; }
140 { GetWorksheet()->
OpenHCaret(file, GC_TYPE_IMAGE); }
150 long Major()
const {
return m_major;}
151 long Minor()
const {
return m_minor;}
152 long Patchlevel()
const {
return m_patchlevel;}
158 long m_patchlevel = -1;
163 {maxima_command_line_filename = filename;}
167 static int GetExitCode(){
return m_exitCode;}
171 static wxString maxima_command_line_filename;
173 bool m_maximaAuthenticated =
false;
175 bool m_discardAllData =
false;
177 wxString m_maximaAuthString;
181 static bool m_exitOnError;
183 static wxString m_extraMaximaArgs;
185 std::vector<wxString> m_varNamesToQuery;
188 bool m_openInitialFileError =
false;
190 wxString EscapeForLisp(wxString str);
192 long long m_maximaJiffies_old = 0;
194 long long m_cpuTotalJiffies_old = 0;
197 wxString m_configCommands;
199 static wxRegEx m_gnuplotErrorRegex;
203 wxString m_oldFindString;
205 int m_oldFindFlags = 0;
207 bool m_hasEvaluatedCells =
false;
209 long m_outputCellsFromCurrentCommand = 0;
211 long m_maxOutputCellsPerCommand = 0;
218 int m_unsuccessfulConnectionAttempts = 11;
222 bool m_evalOnStartup =
false;
224 bool m_exitAfterEval =
false;
226 bool m_ready =
false;
232 wxString GetUnmatchedParenthesisState(wxString text, std::size_t &index);
234 wxMemoryBuffer m_uncompletedChars;
239 const wxString &description,
const wxString &description_tooltip,
240 const wxString &commandRule,
241 wxString label1, wxString defaultval1, wxString tooltip1 = {},
242 wxString label2 = {}, wxString defaultval2 = {}, wxString tooltip2 = {},
243 wxString label3 = {}, wxString defaultval3 = {}, wxString tooltip3 = {},
244 wxString label4 = {}, wxString defaultval4 = {}, wxString tooltip4 = {},
245 wxString label5 = {}, wxString defaultval5 = {}, wxString tooltip5 = {},
246 wxString label6 = {}, wxString defaultval6 = {}, wxString tooltip6 = {},
247 wxString label7 = {}, wxString defaultval7 = {}, wxString tooltip7 = {},
248 wxString label8 = {}, wxString defaultval8 = {}, wxString tooltip8 = {},
249 wxString label9 = {}, wxString defaultval9 = {}, wxString tooltip9 = {}
265 void OnFocus(wxFocusEvent &event);
278 void OnFollow(wxCommandEvent &event);
279 void OnWizardAbort(wxCommandEvent &event);
280 void OnWizardOK(wxCommandEvent &event);
281 void OnWizardInsert(wxCommandEvent &event);
282 void OnWizardHelpButton(wxCommandEvent &event);
294 void ShowHelp(
const wxString &keyword);
296 void CheckForUpdates(
bool reportUpToDate =
false);
298 void OnRecentDocument(wxCommandEvent &event);
299 void OnRecentPackage (wxCommandEvent &event);
300 void OnUnsavedDocument(wxCommandEvent &event);
302 void OnChar(wxKeyEvent &event);
303 void OnKeyDown(wxKeyEvent &event);
331 void OnIdle(wxIdleEvent &event);
332 bool m_dataFromMaximaIs =
false;
335 void FileMenu(wxCommandEvent &event);
342 void PlotMenu(wxCommandEvent &event);
343 void ListMenu(wxCommandEvent &event);
344 void DrawMenu(wxCommandEvent &event);
346 void HelpMenu(wxCommandEvent &event);
347 void EditMenu(wxCommandEvent &event);
357 void ShowPane(wxCommandEvent &event);
358 void OnMaximaClose(wxProcessEvent &event);
359 void OnMaximaClose();
360 void OnGnuplotClose(wxProcessEvent &event);
361 void OnGnuplotQueryTerminals(wxProcessEvent &event);
362 void PopupMenu(wxCommandEvent &event);
363 void StatsMenu(wxCommandEvent &event);
369 void OnFind(wxFindDialogEvent &event);
372 void OnReplace(wxFindDialogEvent &event);
403 enum AppendOpt { NewLine = 1, BigSkip = 2, PromptToolTip = 4, DefaultOpt = NewLine|BigSkip };
404 void DoConsoleAppend(wxString s,
CellType type, AppendOpt opts = AppendOpt::DefaultOpt,
405 const wxString &userLabel = {});
423 void InsertMenu(wxCommandEvent &event);
426 void SliderEvent(wxScrollEvent &event);
441 void OnInspectorEvent(wxCommandEvent &ev);
443 void DumpProcessOutput();
448 void TryUpdateInspector();
450 bool UpdateDrawPane();
452 wxString ExtractFirstExpression(
const wxString &entry);
454 wxString GetDefaultEntry();
468 void OnClose(wxCloseEvent &event);
519 void ReadMath(
const wxXmlDocument &xml);
527 void ReadLoadSymbols(
const wxXmlDocument &data);
603 wxString m_maximaVariable_wxSubscripts;
604 wxString m_maximaVariable_lmxchar;
605 wxString m_maximaVariable_display2d;
606 wxString m_maximaVariable_altdisplay2d;
607 wxString m_maximaVariable_engineeringFormat;
608 bool m_readMaximaVariables =
false;
609 bool m_updateAutocompletion =
true;
650 void ResetTitle(
bool saved,
bool force =
false);
671 std::unique_ptr<GroupCell>
CreateTreeFromXMLNode(wxXmlNode *xmlcells,
const wxString &wxmxfilename = {});
678 bool SaveFile(
bool forceSave =
false);
698 void SetCWD(wxString file);
706 std::unique_ptr<Maxima> m_client;
713 void operator()(wxSocketServer* server)
const {
723 std::unique_ptr<wxSocketServer, ServerDeleter>
m_server;
725 wxProcess *m_maximaProcess = NULL;
747 void QuestionAnswered(){
if(GetWorksheet()) GetWorksheet()->
QuestionAnswered();}
757 void OnSize(wxSizeEvent &event);
758 void OnMove(wxMoveEvent &event);
759 void OnMaximize(wxCommandEvent &event);
766 wxWindowIDRef m_gnuplot_process_id;
767 wxWindowIDRef m_maxima_process_id;
768 wxString m_lastPrompt;
770 std::unique_ptr<wxPrintData> m_printData;
778 wxString m_maximaHtmlDir;
779 bool m_fileSaved =
true;
780 static int m_exitCode;
788 wxString m_gnuplotcommand_commandline;
790 long m_commandIndex = -1;
792 static wxRegEx m_funRegEx;
793 static wxRegEx m_varRegEx;
794 static wxRegEx m_blankStatementRegEx;
795 static wxRegEx m_sbclCompilationRegEx;
797 bool m_maximaBusy =
true;
799 bool m_fourierLoaded =
false;
801 wxString m_logexpand;
803 typedef void (
wxMaxima::*VarReadFunction)(
const wxString &value);
804 typedef void (
wxMaxima::*VarUndefinedFunction)();
805 typedef std::unordered_map <wxString, VarReadFunction, wxStringHash> VarReadFunctionHash;
806 typedef std::unordered_map <wxString, VarUndefinedFunction,
807 wxStringHash> VarUndefinedFunctionHash;
809 static VarReadFunctionHash m_variableReadActions;
811 static VarUndefinedFunctionHash m_variableUndefinedActions;
813#if wxUSE_DRAG_AND_DROP
815 friend class MyDropTarget;
830 wxTimer m_autoSaveTimer;
837 wxTimer m_fastResponseTimer;
840 void StartAutoSaveTimer();
843#if wxUSE_DRAG_AND_DROP
846class MyApp :
public wxApp
849 virtual bool OnInit();
851 virtual int OnExit();
852#if wxUSE_ON_FATAL_EXCEPTION && wxUSE_CRASHREPORT
853 void OnFatalException ()
override;
868 static void NewWindow(
const wxString &file = {},
bool evalOnStartup =
false,
bool exitAfterEval =
false,
unsigned char *wxmData = NULL, std::size_t wxmLen = 0);
870 void OnFileMenu(wxCommandEvent &ev);
872 virtual void MacNewFile();
874 virtual void MacOpenFile(
const wxString &file);
877 static std::vector<wxProcess *> m_wxMaximaProcesses;
878#if wxUSE_ON_FATAL_EXCEPTION && wxUSE_CRASHREPORT
879 void GenerateDebugReport(wxDebugReport::Context ctx);
881 std::unique_ptr<wxLocale> m_locale;
882 std::unique_ptr<wxTranslations> m_translations;
884 wxString m_configFileName;
886 static bool m_allWindowsInOneProcess;
889class MyDropTarget :
public wxFileDropTarget
892 explicit MyDropTarget(
wxMaxima *wxmax)
895 bool OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString &files);
CellType
The supported types of math cells.
Definition: Cell.h:64
This file declares the class DirStructure.
The header file for the xml cell parser.
An object that represents the directory structure wxMaxima is installed in.
Definition: Dirstructure.h:58
Definition: FindReplacePane.h:48
This class handles parsing the xml representation of a cell tree.
Definition: MathParser.h:53
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
Interface to the Maxima process.
Definition: Maxima.h:63
Definition: test_ImgCell.cpp:70
A Text cell.
Definition: TextCell.h:38
The canvas that contains the spreadsheet the whole program is about.
Definition: Worksheet.h:95
void OpenHCaret(const wxString &txt={})
Place the cursor into a new cell where the horizontal cursor is.
Definition: Worksheet.h:1284
void QuestionAnswered()
Mark the current question from maxima as "answered"..
Definition: Worksheet.cpp:3334
The frame containing the menu and the sidebars.
Definition: wxMaximaFrame.h:65
A version number that can be compared using "<" and ">".
Definition: wxMaxima.h:147
Definition: wxMaxima.h:65
void PlotMenu(wxCommandEvent &event)
Processes "Plot menu" cloicks.
Definition: wxMaxima.cpp:9089
void OnIdle(wxIdleEvent &event)
The idle task that refreshes the gui (worksheet, menus, title line,...)
Definition: wxMaxima.cpp:5076
void VariableActionAutoconfVersion(const wxString &value)
Called if maxima tells us the maxima version as defined by autoconf.
Definition: wxMaxima.cpp:3496
int m_port
The port the actual maxima process (not its wrapper script) runs at.
Definition: wxMaxima.h:731
bool AutoSave()
Save the project in a temp file.
Definition: wxMaxima.cpp:6030
bool m_dispReadOut
what is displayed in statusbar
Definition: wxMaxima.h:765
void FileMenu(wxCommandEvent &event)
Processes "file menu" clicks.
Definition: wxMaxima.cpp:6075
bool m_scheduleUpdateToc
True = schedule an update of the table of contents.
Definition: wxMaxima.h:746
void VariableActionGentranlang(const wxString &value)
Called if maxima tells us the value of the maxima variable gentranlang.
Definition: wxMaxima.cpp:3437
bool SaveFile(bool forceSave=false)
Saves the current file.
Definition: wxMaxima.cpp:5684
void VariableActionDisplay2d_Unicode(const wxString &value)
Called if maxima tells us the value of the maxima variable display2d_unicode.
Definition: wxMaxima.cpp:3430
void ShowTip(bool force)
Definition: wxMaxima.cpp:4897
void VariableActionUserDir(const wxString &value)
Called if maxima tells us where the user files are located.
Definition: wxMaxima.cpp:3424
void ReadMiscText(const wxString &data)
Reads text that isn't enclosed between xml tags.
Definition: wxMaxima.cpp:3152
void ReadMath(const wxXmlDocument &xml)
Reads the math cell's contents from Maxima.
Definition: wxMaxima.cpp:3298
static wxRegEx m_xmlOpeningTag
Looks if this opening tag is actually complete.
Definition: wxMaxima.h:257
void EquationsMenu(wxCommandEvent &event)
Processes "equations menu" clicks.
Definition: wxMaxima.cpp:7727
void VariableActionDomain(const wxString &value)
Called if maxima tells us the value of the maxima variable domain
Definition: wxMaxima.cpp:3835
static wxString m_promptPrefix
The marker for the start of a input prompt.
Definition: wxMaxima.h:737
void OnMinimize(wxIconizeEvent &event)
Called when this window is minimized.
Definition: wxMaxima.cpp:11237
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:165
void VariableActionAltDisplay2D(const wxString &value)
Called if maxima tells us if it currently outputs XML.
Definition: wxMaxima.cpp:3867
void ShowWxMaximaHelp()
Show the help for wxMaxima.
Definition: wxMaxima.cpp:4955
TextCell * ConsoleAppend(wxString s, CellType type)
append maxima output to console
Definition: wxMaxima.cpp:2028
void ChangeCellStyle(wxCommandEvent &event)
Is triggered when the textstyle drop-down box's value is changed.
Definition: wxMaxima.cpp:11244
static wxString ExtraMaximaArgs()
Which additional maxima arguments did we get from the command line?
Definition: wxMaxima.h:88
bool m_isActive
Is this window active?
Definition: wxMaxima.h:263
void VariableActionOpSubst(const wxString &value)
Called if maxima tells us the value of the maxima variable opsubst.
Definition: wxMaxima.cpp:3446
void MaximaEvent(wxThreadEvent &event)
Maxima sends or receives data, or disconnects.
Definition: wxMaxima.cpp:2375
wxString ReadPotentiallyUnclosedTag(wxStringTokenizer &lines, wxString firstLine)
Reads a potentially unclosed XML tag and closes it.
Definition: wxMaxima.cpp:4303
void OnReplace(wxFindDialogEvent &event)
Is triggered when the "Replace" button in the search dialog is pressed.
Definition: wxMaxima.cpp:6702
int SaveDocumentP()
Tries or offers to save the document.
Definition: wxMaxima.cpp:11183
void VariableActionDisplay2D(const wxString &value)
Called if maxima tells us the value of the maxima variable display2d
Definition: wxMaxima.cpp:3844
void ReadMaximaIPC(const wxString &data)
Reads autocompletion templates we get on definition of a function or variable.
Definition: wxMaxima.h:526
void AddDrawParameter(wxString cmd, int dimensionsOfNewDrawCommand=2)
Add a parameter to a draw command.
Definition: wxMaxima.cpp:8244
void ShowHelp(const wxString &keyword)
Try to determine if help is needed for maxima or wxMaxima and show this help.
Definition: wxMaxima.cpp:5036
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={})
Invoke our standard wizard that generates maxima commands.
Definition: wxMaxima.cpp:9391
void MaximaMenu(wxCommandEvent &event)
Processes "maxima menu" clicks.
Definition: wxMaxima.cpp:6884
static void ExtraMaximaArgs(const wxString &args)
Additional maxima arguments from the command line.
Definition: wxMaxima.h:86
void EvalOnStartup(bool eval)
Do we want to evaluate the document on startup?
Definition: wxMaxima.h:113
static void ExitOnError()
Exit if we encounter an error.
Definition: wxMaxima.h:75
void PrintMenu(wxCommandEvent &event)
Definition: wxMaxima.cpp:5304
void OnUpdateTOCEvent(wxCommandEvent &event)
Is called when something requests an update of the table of contents.
Definition: wxMaxima.cpp:5678
void UpdateMenus()
Enables and disables the Right menu buttons.
Definition: wxMaxima.cpp:5343
void LaunchHelpBrowser(wxString uri)
Launches the help browser on the uri passed as an argument.
Definition: wxMaxima.cpp:4913
wxInputStream * m_maximaStdout
The stdout of the maxima process.
Definition: wxMaxima.h:727
void VarReadEvent(wxCommandEvent &event)
Trigger reading all variables from Maxima that are shown in the Variables sidebar.
Definition: wxMaxima.cpp:10331
void GnuplotCommandName(wxString gnuplot)
Sets gnuplot's command name and tries to determine gnuplot's path.
Definition: wxMaxima.cpp:3526
void VariableActionAutoconfHost(const wxString &value)
Called if maxima tells us the maxima build host as defined by autoconf.
Definition: wxMaxima.cpp:3501
static bool GetEnableIPC()
Do we allow maxima to click buttons in wxMaxima?
Definition: wxMaxima.h:84
void ReadSuppressedOutput(const wxString &data)
Read (and discard) suppressed output.
Definition: wxMaxima.cpp:3314
std::unique_ptr< wxSocketServer, ServerDeleter > m_server
The server maxima connects to as client.
Definition: wxMaxima.h:723
void OnMaximaConnect()
Is called if maxima connects to wxMaxima.
Definition: wxMaxima.cpp:2472
wxTimer m_maximaStdoutPollTimer
A timer that polls for output from the maxima process.
Definition: wxMaxima.h:109
void VariableActionWxLoadFileName(const wxString &value)
Called if maxima tells us the name of a package that was loaded.
Definition: wxMaxima.cpp:3723
void OnFollow(wxCommandEvent &event)
Called when the "Scroll to currently evaluated" button is pressed.
Definition: wxMaxima.cpp:11064
void NetworkDClick(wxCommandEvent &ev)
Issued on double click on the network status.
Definition: wxMaxima.cpp:11028
bool DocumentSaved()
Does this document need saving?
Definition: wxMaxima.h:135
void EditMenu(wxCommandEvent &event)
Processes "Edit menu" clicks.
Definition: wxMaxima.cpp:6265
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:162
TextCell * DoRawConsoleAppend(wxString s, CellType type, AppendOpt opts={})
Append one or more lines of ordinary unicode text to the console.
Definition: wxMaxima.cpp:2152
long long GetMaximaCpuTime()
How much CPU time has maxima used till now? Used by GetMaximaCPUPercentage.
Definition: wxMaxima.cpp:5917
void ReplaceSuggestion(wxCommandEvent &event)
Processes clicks on suggestions.
Definition: wxMaxima.cpp:10669
void SetCWD(wxString file)
Set the current working directory file I/O from maxima is relative to.
Definition: wxMaxima.cpp:4132
static wxRegEx m_xmlOpeningTagName
Finds the name of an opening tag.
Definition: wxMaxima.h:255
void EditInputMenu(wxCommandEvent &event)
Spawn the "configure" menu.
Definition: wxMaxima.cpp:10308
void LoadImage(const wxString &file)
Load an image from a file into the worksheet.
Definition: wxMaxima.h:139
static void EnableIPC()
Allow maxima to click buttons in wxMaxima.
Definition: wxMaxima.h:82
void UpdateToolBar()
Enables and disables the Right toolbar buttons.
Definition: wxMaxima.cpp:5411
void HistoryDClick(wxCommandEvent &event)
Issued on double click on a history item.
Definition: wxMaxima.cpp:11044
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:1781
void VariableActionTempDir(const wxString &value)
Called if maxima tells us where the temp files are located.
Definition: wxMaxima.cpp:3471
wxString GetCommand(bool params=true)
returns the command to start maxima
Definition: wxMaxima.cpp:4848
static wxString m_mathPrefix1
A marker for the start of maths.
Definition: wxMaxima.h:733
void VariableActionNumer(const wxString &value)
Called if maxima tells us the value of the maxima variable numer.
Definition: wxMaxima.cpp:3767
bool OpenFile(const wxString &file, const wxString &command={})
Open a file.
Definition: wxMaxima.cpp:5545
void OnFind(wxFindDialogEvent &event)
Is triggered when the "Find" button in the search dialog is pressed.
Definition: wxMaxima.cpp:6677
void OnSymbolAdd(wxCommandEvent &event)
Sends a new char to the symbols sidebar.
Definition: wxMaxima.cpp:6751
void VariableActionDebugmode(const wxString &value)
Called if maxima tells us the value of the maxima variable debugmode.
Definition: wxMaxima.cpp:3481
wxInputStream * m_maximaStderr
The stderr of the maxima process.
Definition: wxMaxima.h:729
void VariableActionStringdisp(const wxString &value)
Called if maxima tells us the value of the maxima variable stringdisp
Definition: wxMaxima.cpp:3757
bool OpenMACFile(const wxString &file, Worksheet *document, bool clearDocument=true)
Opens a .mac file or a .out file from Xmaxima.
Definition: wxMaxima.cpp:4178
bool OpenWXMXFile(const wxString &file, Worksheet *document, bool clearDocument=true)
Opens a wxmx file.
Definition: wxMaxima.cpp:4337
void KillMaxima(bool logMessage=true)
kills the maxima process
Definition: wxMaxima.cpp:2810
void VarAddAllEvent(wxCommandEvent &event)
Trigger adding all variables to the variables sidebar.
Definition: wxMaxima.cpp:10322
void VariableActionSinnpiflag(const wxString &value)
Called if maxima tells us the value of the maxima variable sinnpiflag.
Definition: wxMaxima.cpp:3418
void ListMenu(wxCommandEvent &event)
Processes "list menu" clicks.
Definition: wxMaxima.cpp:8437
void ReadStdErr()
Polls the stderr and stdout of maxima for input.
Definition: wxMaxima.cpp:5783
void ReadAddVariables(const wxXmlDocument &xmldoc)
Reads the "add variable to watch list" tag maxima can send us.
Definition: wxMaxima.cpp:3937
static bool GetExitOnError()
Do we exit if we encounter an error?
Definition: wxMaxima.h:77
void PropertiesMenu(wxCommandEvent &event)
Processes "Variable/Function props menu" clicks.
Definition: wxMaxima.cpp:6761
void VariableActionMaximaDemodir(const wxString &value)
Called if maxima tells us the maxima demo dir.
Definition: wxMaxima.cpp:3707
void VariableActionLogexpand(const wxString &value)
Called if maxima tells us the value of the maxima variable logexpand.
Definition: wxMaxima.cpp:3453
void VariableActionAlgebraic(const wxString &value)
Called if maxima tells us the value of the maxima variable algebraic
Definition: wxMaxima.cpp:3777
void VariableActionMaximaSharedir(const wxString &value)
Called if maxima tells us the maxima share dir.
Definition: wxMaxima.cpp:3696
void TriggerEvaluation()
Try to evaluate the next command for maxima that is in the evaluation queue.
Definition: wxMaxima.cpp:10501
void OnTimerEvent(wxTimerEvent &event)
Is triggered when a timer this class is responsible for requires.
Definition: wxMaxima.cpp:5997
void PassKeyboardFocus()
Forwards the keyboard focus to a text control that might need it.
Definition: wxMaxima.cpp:11225
void ReadPrompt(const wxString &data)
Reads the input prompt from Maxima.
Definition: wxMaxima.cpp:4008
double GetMaximaCPUPercentage()
How much CPU horsepower is maxima using currently?
Definition: wxMaxima.cpp:5969
void NumericalMenu(wxCommandEvent &event)
Processes "Numerical menu" clicks.
Definition: wxMaxima.cpp:9151
bool m_closing
Did we tell maxima to close?
Definition: wxMaxima.h:775
void SendMaxima(wxString s, bool addToHistory=false)
Definition: wxMaxima.cpp:2284
void ResetTitle(bool saved, bool force=false)
Update the title.
Definition: wxMaxima.cpp:10914
void ReadVariables(const wxXmlDocument &xmldoc)
Reads the variable values maxima advertises to us.
Definition: wxMaxima.cpp:3348
void OnJumpToError(wxCommandEvent &event)
Called when the "Scroll to last error" button is pressed.
void VariableActionMaximaInfodir(const wxString &value)
Called if maxima tells us the maxima info dir.
Definition: wxMaxima.cpp:3505
wxString m_maximaTempDir
The directory with maxima's temp files.
Definition: wxMaxima.h:777
void OnReplaceAll(wxFindDialogEvent &event)
Is triggered when the "Replace All" button in the search dialog is pressed.
Definition: wxMaxima.cpp:6731
void DrawMenu(wxCommandEvent &event)
Processes "draw menu" clicks.
Definition: wxMaxima.cpp:8271
void VariableActionEngineeringFormat(const wxString &value)
Called if maxima tells us the value of the maxima variable engineering_format_floats
Definition: wxMaxima.cpp:3795
void VariableActionLispVersion(const wxString &value)
Called if maxima tells us the lisp version.
Definition: wxMaxima.cpp:3719
bool OpenXML(const wxString &file, Worksheet *document)
Opens a content.xml file that has been extracted from a broken .wxmx file.
Definition: wxMaxima.cpp:4648
void SimplifyMenu(wxCommandEvent &event)
Processes "Simplify menu" clicks.
Definition: wxMaxima.cpp:8637
void Interrupt(wxCommandEvent &event)
Interrupt button and hotkey presses Make the menu item, toolbars and panes visible that should be vis...
Definition: wxMaxima.cpp:2682
wxProcess * m_gnuplotProcess
The gnuplot process info.
Definition: wxMaxima.h:259
void OnFocus(wxFocusEvent &event)
Called when this window is focussed or defocussed.
Definition: wxMaxima.cpp:11219
void VariableActionMaximaHtmldir(const wxString &value)
Called if maxima tells us the maxima html dir.
Definition: wxMaxima.cpp:3512
void ReadManualTopicNames(const wxXmlDocument &xmldoc)
Read a manual topic name so we can jump to the right documentation page.
Definition: wxMaxima.cpp:3248
TimerIDs
An enum of individual IDs for all timers this class handles.
Definition: wxMaxima.h:92
@ KEYBOARD_INACTIVITY_TIMER_ID
The keyboard was inactive long enough that we can attempt an auto-save.
Definition: wxMaxima.h:94
@ AUTO_SAVE_TIMER_ID
The time between two auto-saves has elapsed.
Definition: wxMaxima.h:96
@ MAXIMA_STDOUT_POLL_ID
We look if we got new data from maxima's stdout.
Definition: wxMaxima.h:98
bool StartServer()
starts the server
Definition: wxMaxima.cpp:2505
void VariableActionSinnpiflagUndefined()
Called if maxima tells us that the maxima variable sinnpiflag is undefined.
Definition: wxMaxima.cpp:3422
bool CheckWXMXVersion(const wxString &docversion)
Complains if the version string from the XML file indicates too low a maxima version.
Definition: wxMaxima.cpp:4626
void OnClose(wxCloseEvent &event)
close wxMaxima window
Definition: wxMaxima.cpp:9722
void VariableActionHtmlHelp(const wxString &value)
Called if maxima tells us the value of the maxima variable output_format_for_help.
Definition: wxMaxima.cpp:3805
void VariableActionOperators(const wxString &value)
Called if maxima sends us the list of known operators.
Definition: wxMaxima.cpp:3890
void VariableActionLmxChar(const wxString &value)
Called if maxima tells us the value of the maxima variable lmxchar
Definition: wxMaxima.cpp:3741
void MaximaDClick(wxCommandEvent &ev)
Issued on double click on the Maxima status icon.
Definition: wxMaxima.cpp:11034
bool SaveNecessary()
Does this file contain anything worth saving?
Definition: wxMaxima.cpp:10293
wxProcess * m_gnuplotTerminalQueryProcess
Info about the gnuplot process we start for querying the terminals it supports.
Definition: wxMaxima.h:261
void StripLispComments(wxString &s)
Remove empty statements.
Definition: wxMaxima.cpp:2269
void MenuCommand(const wxString &cmd)
Inserts command cmd into the worksheet.
Definition: wxMaxima.cpp:5288
void ReadStatusBar(const wxXmlDocument &xmldoc)
Reads the output of wxstatusbar() commands.
Definition: wxMaxima.cpp:3227
static const wxString m_promptSuffix
The marker for the end of a input prompt.
Definition: wxMaxima.h:740
bool OpenWXMFile(const wxString &file, Worksheet *document, bool clearDocument=true)
Opens a wxm file.
Definition: wxMaxima.cpp:4239
bool QueryVariableValue()
Query the value of a new maxima variable.
Definition: wxMaxima.cpp:3969
void StatusMsgDClick(wxCommandEvent &ev)
Issued on double click on the status message in the status bar.
Definition: wxMaxima.cpp:11038
void ShowMaximaHelp(wxString={})
Show the help for Maxima.
Definition: wxMaxima.cpp:5043
void HelpMenu(wxCommandEvent &event)
Processes "Help menu" clicks.
Definition: wxMaxima.cpp:9440
wxString GetCWD()
Get the current working directory file I/O from maxima is relative to.
Definition: wxMaxima.h:701
std::unique_ptr< GroupCell > CreateTreeFromXMLNode(wxXmlNode *xmlcells, const wxString &wxmxfilename={})
Loads a wxmx description.
Definition: wxMaxima.cpp:4713
void VariableActionShowtime(const wxString &value)
Called if maxima tells us the value of the maxima variable showtime
Definition: wxMaxima.cpp:3786
void ShowPane(wxCommandEvent &event)
Toggle the visibility of a pane.
Definition: wxMaxima.cpp:11002
void ShowMaximaHelpWithoutAnchor()
Show the help for Maxima (without handling of anchors).
Definition: wxMaxima.cpp:4994
void ReadFirstPrompt(const wxString &data)
Determines the process id of maxima from its initial output.
Definition: wxMaxima.cpp:3090
long long GetTotalCpuTime()
How much CPU time has been used by the system until now? Used by GetMaximaCPUPercentage.
Definition: wxMaxima.cpp:5882
bool StartMaxima(bool force=false)
starts maxima (uses getCommand) or restarts it if needed
Definition: wxMaxima.cpp:2562
void ExitAfterEval(bool exitaftereval)
Do we want to exit the program after evaluation?
Definition: wxMaxima.h:119
void VariableActionAutoplay(const wxString &value)
Called if maxima tells us the value of the maxima variable wxanimate_autoplay
Definition: wxMaxima.cpp:3826
void VariableActionWxSubscripts(const wxString &value)
Called if maxima tells us the value of the maxima variable wxsubscripts
Definition: wxMaxima.cpp:3730
wxString m_gnuplotcommand
Maxima's idea about gnuplot's location.
Definition: wxMaxima.h:782
void ServerEvent(wxSocketEvent &event)
Server event: Maxima connects.
Definition: wxMaxima.cpp:2460
static wxString m_mathPrefix2
A marker for the start of maths.
Definition: wxMaxima.h:735
void MatrixMenu(wxCommandEvent &event)
Processes "algebra menu" clicks.
Definition: wxMaxima.cpp:7947
void SetupVariables()
Setup maxima's variables.
Definition: wxMaxima.cpp:4747
void OnDemoFileMenu(wxCommandEvent &ev)
Is called when a demo file menu is clicked.
Definition: wxMaxima.cpp:1834
void UpdateSlider()
Updates the slider to show the right frame.
Definition: wxMaxima.cpp:10974
void TableOfContentsSelection(wxListEvent &event)
Issued on double click on a table of contents item.
Definition: wxMaxima.cpp:11050
void VariableActionLispName(const wxString &value)
Called if maxima tells us the lisp name.
Definition: wxMaxima.cpp:3715
void ConfigChanged()
Is called on start and whenever the configuration changes.
Definition: wxMaxima.cpp:138
void EvaluateEvent(wxCommandEvent &event)
Handle the evaluation event.
Definition: wxMaxima.cpp:10343
static wxString m_firstPrompt
The first prompt maxima will output.
Definition: wxMaxima.h:764
void CalculusMenu(wxCommandEvent &event)
event handling for menus
Definition: wxMaxima.cpp:8896
bool SaveOnClose()
Try to save the file before closing it - or return false.
Definition: wxMaxima.cpp:9679
void VariableActionGnuplotCommand(const wxString &value)
Called if maxima tells us the value of the maxima variable gnuplot
Definition: wxMaxima.cpp:3648
The Right Way to delete a wxSocketServer.
Definition: wxMaxima.h:712
This file declares the class wxMaximaFrame.