32extern unsigned int view_refresh_svg_gz_len;
33extern unsigned char view_refresh_svg_gz[];
40#include <wx/hashmap.h>
41#include <wx/clrpicker.h>
43#include <wx/propdlg.h>
44#include <wx/generic/propdlg.h>
45#include <wx/spinctrl.h>
46#include <wx/notebook.h>
48#include <wx/imaglist.h>
49#include <wx/bookctrl.h>
50#include <wx/artprov.h>
51#include <unordered_map>
53#include <wx/hyperlink.h>
55#ifndef CONFIGDIALOGUE_H
56#define CONFIGDIALOGUE_H
58#include "BuildConfig.h"
62#include "../Configuration.h"
63#ifdef WXM_USE_AI_TOOLS
75 checkbox_strikethrough,
120 const int mMinPanelWidth = 500;
121 const int mMinPanelHeight = 500;
137 GCL_MULTIPROCESS_MEMORY_POOL,
142 std::unique_ptr<
struct wxm_NSVGrasterizer, decltype(std::free)*> m_svgRast{
nullptr, std::free};
144 std::unique_ptr<Configuration> m_configuration;
147 typedef std::unordered_map <wxString, wxString, wxStringHash> StringHash;
148 typedef std::unordered_map <wxString, long, wxStringHash> Languages;
150 Languages m_languages;
155 class ExamplePanel :
public wxPanel
159 ExamplePanel(wxWindow *parent,
int id, wxPoint pos, wxSize size) : wxPanel(parent, id, pos, size)
160 { Bind(wxEVT_PAINT, &ConfigDialogue::ExamplePanel::OnPaint,
this); };
163 void SetStyle(
const Style &style)
174 void OnPaint(wxPaintEvent &event);
185 void SetCheckboxValues();
191 wxWindow *CreateClipboardPanel();
192#ifdef WXM_USE_AI_TOOLS
193 wxWindow *CreateAiChatPanel();
197 wxWindow *CreatePrintPanel();
200 wxWindow *CreateRevertToDefaultsPanel();
202#if wxUSE_ACCESSIBILITY
204 wxWindow *CreateAccessibilityPanel();
207 wxCheckBox *m_screenReaderMathML;
210 wxCheckBox *m_copyBitmap, *m_copyMathML, *m_copyMathMLHTML, *m_copyRTF, *m_copySVG;
211#if wxUSE_ENH_METAFILE
212 wxCheckBox *m_copyEMF;
216 wxWindow *CreateWorksheetPanel();
219 wxWindow *CreateOptionsPanel();
222 wxWindow *CreateExportPanel();
225 wxWindow *CreateStylePanel();
228 wxWindow *CreateMaximaPanel();
231 wxWindow *CreateStartupPanel();
234 wxGrid *m_maximaEnvVariables;
235 void OnImport(wxCommandEvent& event);
236 static void CopyConfig(wxConfigBase *src, wxConfigBase *dst, wxString dir = wxS(
"/"));
237 void OnReloadAll(wxCommandEvent& event);
238 void OnReloadStyles(wxCommandEvent& event);
239 void OnResetAllToDefaults(wxCommandEvent& event);
240 void OnExportAll(wxCommandEvent& event);
241 void OnResetStyles(wxCommandEvent& event);
242 void OnChangeMaximaEnvVar(wxGridEvent& event);
243 void OnMaximaEnvRightClick(wxGridEvent& event);
244 void OnMouseMotion_MaximaEnv(wxMouseEvent &event);
245 void OnNewEnvMenu(wxCommandEvent &event);
246 void OnClickMaximaEnvVal(
int row);
247 void OnChangeMaximaCellClick(wxGridEvent& event);
255 StringHash m_maximaEnvDoc;
260 wxRadioButton *m_autodetectHelpBrowser;
261 wxRadioButton *m_noAutodetectHelpBrowser;
262 wxRadioButton *m_internalHelpBrowser;
263 wxCheckBox *m_singlePageManual;
264 wxRadioButton *m_maximaUsesInternalHelp;
265 wxRadioButton *m_maximaUsesHtmlHelp;
266 wxRadioButton *m_maximaUsesWxmaximaHelp;
271 wxRadioButton *m_useGnuplot;
272 wxRadioButton *m_useWgnuplot;
288 wxTextCtrl *m_documentclass;
289 wxTextCtrl *m_documentclassOptions;
290 wxTextCtrl *m_texPreamble;
291 wxCheckBox *m_autoSave;
292 wxButton *m_wxMathMLBrowse;
293 wxTextCtrl *m_additionalParameters;
294 wxTextCtrl *m_mathJaxURL;
295 wxChoice *m_language;
296 wxTextCtrl *m_symbolPaneAdditionalChars;
297 wxCheckBox *m_abortOnError;
298 wxCheckBox *m_offerKnownAnswers;
299 wxCheckBox *m_restartOnReEvaluation;
300 wxCheckBox *m_wrapLatexMath;
301 wxCheckBox *m_usesvg;
302 wxCheckBox *m_antialiasLines;
303 wxSpinCtrlDouble *m_defaultFramerate;
304 wxSpinCtrl *m_defaultPlotWidth;
305 wxSpinCtrl *m_defaultPlotHeight;
306 wxSpinCtrl *m_displayedDigits;
307 wxSpinCtrl *m_printMargin_Top;
308 wxSpinCtrl *m_printMargin_Bot;
309 wxSpinCtrl *m_printMargin_Left;
310 wxSpinCtrl *m_printMargin_Right;
311 wxRadioButton *m_displayNDigits;
312 wxRadioButton *m_displayAllDigits;
313 wxRadioButton *m_linebreaksInLongNums;
314 wxSpinCtrl *m_maxClipbrdBitmapMegabytes;
321 wxCheckBox *m_printBrackets;
322 wxChoice *m_exportWithMathJAX;
323 wxCheckBox *m_matchParens;
324 wxCheckBox *m_showMatchingParens;
325 wxChoice *m_showLength;
326 wxChoice *m_autosubscript;
327 wxRadioBox *m_layoutStrategy;
328 wxRadioButton *m_enterEvaluates;
329 wxRadioButton *m_ctrlEnterEvaluates;
330 wxCheckBox *m_numpadEnterEvaluates;
331 wxCheckBox *m_saveImgFileName;
332 wxCheckBox *m_saveUntitled;
333 wxCheckBox *m_openHCaret;
334 wxCheckBox *m_insertAns;
335 wxCheckBox *m_autoIndent;
336 wxCheckBox *m_cursorJump;
337 wxCheckBox *m_hideBrackets;
341 wxCheckBox *m_overlayScrollbars;
343 wxCheckBox *m_indentMaths;
344 wxChoice *m_autoWrap;
345 wxSpinCtrl *m_labelWidth;
346 wxSpinCtrl *m_recentItems;
347 wxSpinCtrl *m_bitmapScale;
348 wxSpinCtrlDouble *m_printScale;
349 wxCheckBox *m_fixReorderedIndices;
350 wxCheckBox *m_incrementalSearch;
351 wxCheckBox *m_notifyIfIdle;
352 wxCheckBox *m_findDialogDockable;
353 wxCheckBox *m_mcpServerEnabled;
354 wxSpinCtrl *m_mcpServerPort;
355#ifdef WXM_USE_AI_TOOLS
360 struct AiProviderUiRecord {
367 wxString displayName;
375 std::vector<AiProviderUiRecord> m_aiProviderRecords;
380 int m_aiActiveProviderRecordIndex = -1;
381 wxChoice *m_aiChatProviderChoice;
385 wxStaticBoxSizer *m_aiProviderDetailBox;
386 wxStaticText *m_aiBaseUrlLabel;
389 wxTextCtrl *m_aiBaseUrlCtrl;
390 wxStaticText *m_aiShapeLabel;
391 wxChoice *m_aiShapeChoice;
392 wxTextCtrl *m_aiKeyCtrl;
393 wxTextCtrl *m_aiModelCtrl;
394 wxHyperlinkCtrl *m_aiApiKeyLink;
395 wxHyperlinkCtrl *m_aiModelListLink;
398 wxButton *m_aiRemoveCustomProviderButton;
399 void OnAiProviderChoice(wxCommandEvent &event);
400 void OnAiRemoveCustomProvider(wxCommandEvent &event);
404 void StashAiProviderUiIntoRecord();
408 void LoadAiProviderRecordIntoUi(
int index);
413 bool AddCustomAiProviderDialog();
417 void RebuildAiProviderChoice(
int selectIndex);
419 wxChoice *m_showUserDefinedLabels;
420 wxButton *m_getStyleFont;
423 wxListBox *m_styleFor;
426 wxCheckBox *m_boldCB;
427 wxCheckBox *m_italicCB;
428 wxCheckBox *m_slantedCB;
429 wxCheckBox *m_strikethroughCB;
430 wxCheckBox *m_underlinedCB;
431 wxCheckBox *m_fixedFontInTC;
432 wxCheckBox *m_unixCopy;
433 wxCheckBox *m_changeAsterisk;
434 wxCheckBox *m_hidemultiplicationSign;
435 wxCheckBox *m_latin2Greek;
436 wxCheckBox *m_useUnicodeMaths;
437 wxCheckBox *m_keepPercentWithSpecials;
438 wxBookCtrlBase *m_notebook;
439 wxButton *m_saveStyle, *m_loadStyle;
440 wxSpinCtrl *m_defaultPort;
441 ExamplePanel *m_examplePanel;
442 wxSpinCtrl *m_maxGnuplotMegabytes;
443 wxSpinCtrl *m_autosaveMinutes;
444 wxSpinCtrl *m_maxLayoutTime;
445 wxTextCtrl *m_autoMathJaxURL;
446 int m_maximaEmvRightClickRow = 0;
452 void OnClose(wxCloseEvent &event);
454 void OnwxMathMLBrowse(wxCommandEvent &event);
456 void OnIdle(wxIdleEvent &event);
474 void LoadSave(wxCommandEvent &event);
485#if wxCHECK_VERSION(3, 1, 6)
Talks to one of a handful of external AI chat APIs for the AI chat sidebar (AiChatSidebar).
AiProviderShape
Which request/response wire format a provider uses. The four built-in AiProviderKinds each hardcode o...
Definition: AiProvider.h:82
AiProviderKind
Which AI service to talk to. Persisted as a plain int in Configuration; keep existing values stable a...
Definition: AiProvider.h:67
This file declares all the wizards the draw sidepane needs.
This file declares everything needed for the text style system used to style all the elements on the ...
TextStyle
All text styles known to wxMaxima.
Definition: TextStyle.h:235
This file defines the class Worksheet.
A dialog that shows the program's license.
Definition: BinaryNameCtrl.h:40
The configuration dialog.
Definition: ConfigDialogue.h:92
int m_mathFontSize
The size of the maths font.
Definition: ConfigDialogue.h:482
void OnCheckbox(wxCommandEvent &event)
Called if one of the checkboxes for bold, italic or underlined is toggled.
Definition: ConfigDialogue.cpp:3139
wxRadioButton * m_noAutodetectMathJaX
The radio button that is set if m_autodetectMathJaX is unset.
Definition: ConfigDialogue.h:270
wxCheckBox * m_exportContainsWXMX
A checkbox that asks if all newlines in text cells have to be passed to HTML.
Definition: ConfigDialogue.h:320
std::unique_ptr< wxImageList > m_imageList
A list containing the pictograms for the tabs.
Definition: ConfigDialogue.h:488
void OnStyleToEditChanged(wxCommandEvent &event)
Called if the user changes the style that is to be edited.
Definition: ConfigDialogue.cpp:2699
wxRadioButton * m_autodetectMathJaX
Autodetect the mathJaX location?
Definition: ConfigDialogue.h:268
wxRadioButton * m_autodetectMaxima
Autodetect the maxima location?
Definition: ConfigDialogue.h:257
void OnChangeWarning(wxCommandEvent &event)
A message dialog that appears if a change cannot be applied now.
Definition: ConfigDialogue.cpp:3156
void UpdateExample()
Sets the style example's style on style changes.
Definition: ConfigDialogue.cpp:3162
int m_fontSize
The size of the text font.
Definition: ConfigDialogue.h:480
wxCheckBox * m_usePartialForDiff
A checkbox that asks if TeX should use the \partial symbol for representing diff()
Definition: ConfigDialogue.h:318
void WriteSettings()
Stores the settings from the configuration dialog.
Definition: ConfigDialogue.cpp:2727
wxStaticText * m_mp
The text "Maxima Program" that can change color.
Definition: ConfigDialogue.h:254
wxColourPickerCtrl * m_styleColor
An example rectangle with the font color.
Definition: ConfigDialogue.h:425
wxChoice * m_appearanceChoice
Light / Dark / Follow-system selector (also picks which set the editor edits).
Definition: ConfigDialogue.h:422
void OnClose(wxCloseEvent &event)
Is called when the configuration dialog is closed.
Definition: ConfigDialogue.cpp:2716
wxString m_wxStartupFileName
The name of wxMaxima's startup file.
Definition: ConfigDialogue.h:252
wxTextCtrl * m_startupCommands
A textbox containing maxima's startup commands.
Definition: ConfigDialogue.h:283
void OnChangeStyle(wxCommandEvent &event)
Called if a new item type that is to be styled is selected.
Definition: ConfigDialogue.cpp:3003
TextStyle GetSelectedStyle() const
Get the style currently selected in the m_styleFor control.
Definition: ConfigDialogue.cpp:2528
void UsesvgChanged(wxCommandEvent &event)
Is called when the path to the maxima binary was changed.
Definition: ConfigDialogue.cpp:361
wxString m_startupFileName
The name of maxima's startup file.
Definition: ConfigDialogue.h:250
wxRadioButton * m_noAutodetectMaxima
The radio button that is set if m_autodetectMaxima is unset.
Definition: ConfigDialogue.h:259
wxTextCtrl * m_wxStartupCommands
A textbox containing wxMaxima's startup commands.
Definition: ConfigDialogue.h:285
htmlExportFormats
The export formats we support for HTML equations.
Definition: ConfigDialogue.h:102
~ConfigDialogue()
The destructor.
Definition: ConfigDialogue.cpp:349
void OnChangeFontFamily(wxCommandEvent &event)
Called if the font family is changed.
Definition: ConfigDialogue.cpp:2977
wxCheckBox * m_TeXExponentsAfterSubscript
A checkbox that asks if TeX should put the exponents above or after the subscripts.
Definition: ConfigDialogue.h:316
void OnAppearanceChanged(wxCommandEvent &event)
Light / Dark / Follow-system appearance changed: re-point the style editor.
Definition: ConfigDialogue.cpp:2705
void OnTabChange(wxBookCtrlEvent &event)
Called if the currently active dialogue sheet is changed.
Definition: ConfigDialogue.cpp:3182
void OnChangeColor(wxColourPickerEvent &event)
Called if the color of an item has been changed.
Definition: ConfigDialogue.cpp:2995
void LoadSave(wxCommandEvent &event)
A "export the configuration" dialog.
Definition: ConfigDialogue.cpp:3188
Text Style Definition.
Definition: TextStyle.h:67
The canvas that contains the spreadsheet the whole program is about.
Definition: Worksheet.h:116