wxMaxima
Loading...
Searching...
No Matches
DrawWiz.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) 2004-2015 Andrej Vodopivec <andrej.vodopivec@gmail.com>
4// Copyright (C) 2017-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
27#ifndef DRAWWIZ_H
28#define DRAWWIZ_H
29
30#include "precomp.h"
31#include <wx/wx.h>
32#include <wx/statline.h>
33#include <wx/image.h>
34#include <wx/radiobut.h>
35#include <wx/persist.h>
36#include <wx/persist/toplevel.h>
37
38#include "BTextCtrl.h"
39#include "Configuration.h"
40#include "SvgPanel.h"
41
43// cppcheck-suppress ctuOneDefinitionRuleViolation
44class ExplicitWiz : public wxDialog
45{
46public:
49 ~ExplicitWiz() override { SendDestroyEvent(); }
50 ExplicitWiz(wxWindow *parent, Configuration *config, wxString expression, int dimensions = 2);
51 wxString GetValue();
52private:
53 int m_dimensions;
54 BTextCtrl *m_expression;
55 BTextCtrl *m_filledfunc = nullptr;
56 BTextCtrl *m_x;
57 BTextCtrl *m_xStart;
58 BTextCtrl *m_xEnd;
59 BTextCtrl *m_y = nullptr;
60 BTextCtrl *m_yStart = nullptr;
61 BTextCtrl *m_yEnd = nullptr;
62};
63
65// cppcheck-suppress ctuOneDefinitionRuleViolation
66class ParametricWiz : public wxDialog
67{
68public:
71 ~ParametricWiz() override { SendDestroyEvent(); }
72 ParametricWiz(wxWindow *parent, Configuration *config, int dimensions = 2);
73 wxString GetValue();
74private:
75 int m_dimensions;
76 BTextCtrl *m_expression_x;
77 BTextCtrl *m_expression_y;
78 BTextCtrl *m_expression_z = nullptr;
79 BTextCtrl *m_parameter;
80 BTextCtrl *m_parameterStart = nullptr;
81 BTextCtrl *m_parameterEnd;
82};
83
85// cppcheck-suppress ctuOneDefinitionRuleViolation
86class ImplicitWiz : public wxDialog
87{
88public:
91 ~ImplicitWiz() override { SendDestroyEvent(); }
92 ImplicitWiz(wxWindow *parent, Configuration *config, wxString expression, int dimensions = 2);
93 wxString GetValue();
94private:
95 int m_dimensions;
96 BTextCtrl *m_expression;
97 BTextCtrl *m_x;
98 BTextCtrl *m_xStart;
99 BTextCtrl *m_xEnd;
100 BTextCtrl *m_y;
101 BTextCtrl *m_yStart;
102 BTextCtrl *m_yEnd;
103 BTextCtrl *m_z = nullptr;
104 BTextCtrl *m_zStart = nullptr;
105 BTextCtrl *m_zEnd = nullptr;
106};
107
109// cppcheck-suppress ctuOneDefinitionRuleViolation
110class AxisWiz : public wxDialog
111{
112public:
115 ~AxisWiz() override { SendDestroyEvent(); }
116 AxisWiz(wxWindow *parent, Configuration *config, int dimensions = 2);
117 wxString GetValue();
118private:
119 int m_dimensions;
120 BTextCtrl *m_xLabel;
121 BTextCtrl *m_xStart;
122 BTextCtrl *m_xEnd;
123 BTextCtrl *m_yLabel;
124 BTextCtrl *m_yStart;
125 BTextCtrl *m_yEnd;
126 BTextCtrl *m_zLabel = nullptr;
127 BTextCtrl *m_zStart = nullptr;
128 BTextCtrl *m_zEnd = nullptr;
129 wxCheckBox *m_useSecondaryX;
130 wxCheckBox *m_useSecondaryY;
131 BTextCtrl *m_x2Label = nullptr;
132 BTextCtrl *m_x2Start = nullptr;
133 BTextCtrl *m_x2End = nullptr;
134 BTextCtrl *m_y2Label = nullptr;
135 BTextCtrl *m_y2Start = nullptr;
136 BTextCtrl *m_y2End = nullptr;
137};
138
139
141// cppcheck-suppress ctuOneDefinitionRuleViolation
142class DrawWiz : public wxDialog
143{
144public:
147 ~DrawWiz() override { SendDestroyEvent(); }
148 DrawWiz(wxWindow *parent, Configuration *config, int dimensions);
149 wxString GetValue();
150protected:
151 void OnParametricFocus(wxFocusEvent &event);
152private:
153 int m_dimensions;
154 wxRadioButton *m_singleFrame;
155 wxRadioButton *m_multipleFrames;
156 BTextCtrl *m_frameVar;
157 BTextCtrl *m_varStart;
158 BTextCtrl *m_varEnd;
159};
160
162// cppcheck-suppress ctuOneDefinitionRuleViolation
163class Wiz3D : public wxDialog
164{
165public:
168 ~Wiz3D() override { SendDestroyEvent(); }
169 Wiz3D(wxWindow *parent, Configuration *config);
170 wxString GetValue();
171private:
172 wxCheckBox *m_hidden3d;
173 wxCheckBox *m_enhanced3d;
174};
175
177// cppcheck-suppress ctuOneDefinitionRuleViolation
178class WizContour : public wxDialog
179{
180public:
183 ~WizContour() override { SendDestroyEvent(); }
184 WizContour(wxWindow *parent, Configuration *config);
185 wxString GetValue();
186protected:
187 void OnRadioButton(wxCommandEvent &dummy);
188private:
189 SvgPanel *m_image;
190 wxRadioButton *m_contourNone;
191 wxRadioButton *m_contourSurface;
192 wxRadioButton *m_contourBase;
193 wxRadioButton *m_contourBoth;
194 wxRadioButton *m_contourOnly;
195};
196
198// cppcheck-suppress ctuOneDefinitionRuleViolation
199class WizPoints : public wxDialog
200{
201public:
204 ~WizPoints() override { SendDestroyEvent(); }
205 WizPoints(wxWindow *parent, Configuration *config, int dimensions, wxString expr);
206 wxString GetValue();
207private:
208 BTextCtrl *m_data;
209 wxRadioButton *m_formatStd;
210 wxRadioButton *m_formatListOfLists;
211 wxRadioButton *m_transposedMatrix;
212 wxRadioButton *m_transposedListOfLists;
213 wxCheckBox *m_pointsJoined;
214 wxChoice *m_pointStyle;
215 int m_dimensions;
216};
217
219// cppcheck-suppress ctuOneDefinitionRuleViolation
220class WizDrawAccuracy : public wxDialog
221{
222public:
225 ~WizDrawAccuracy() override { SendDestroyEvent(); }
226 WizDrawAccuracy(wxWindow *parent, Configuration *config, int dimensions);
227 wxString GetValue();
228private:
229 int m_dimensions;
230 BTextCtrl *m_nticks;
231 BTextCtrl *m_adapt_depth;
232 BTextCtrl *m_xu_grid = nullptr;
233 BTextCtrl *m_yv_grid = nullptr;
234 BTextCtrl *m_ip_grid_x = nullptr;
235 BTextCtrl *m_ip_grid_y = nullptr;
236 BTextCtrl *m_ip_grid_in_x = nullptr;
237 BTextCtrl *m_ip_grid_in_y = nullptr;
238 BTextCtrl *m_x_voxel = nullptr;
239 BTextCtrl *m_y_voxel = nullptr;
240 BTextCtrl *m_z_voxel = nullptr;
241};
242
243#endif // DRAWWIZ_H
This file declares all the wizards the draw sidepane needs.
A wizard for axis setup for draw.
Definition: DrawWiz.h:111
~AxisWiz() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:115
A wxTextCtrl with parenthesis matching.
Definition: BTextCtrl.h:34
The configuration storage for the current worksheet.
Definition: Configuration.h:101
A wizard for explicit plots using draw.
Definition: DrawWiz.h:143
~DrawWiz() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:147
A wizard for explicit plots using draw.
Definition: DrawWiz.h:45
~ExplicitWiz() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:49
A wizard for implicit plots using draw.
Definition: DrawWiz.h:87
~ImplicitWiz() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:91
A wizard for parametric plots using draw.
Definition: DrawWiz.h:67
~ParametricWiz() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:71
A panel that shows an example image.
Definition: SvgPanel.h:40
A wizard for axis setup for draw.
Definition: DrawWiz.h:164
~Wiz3D() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:168
A wizard for contour plots.
Definition: DrawWiz.h:179
~WizContour() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:183
A wizard that sets the draw accuracy.
Definition: DrawWiz.h:221
~WizDrawAccuracy() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:225
A wizard for the points object for draw.
Definition: DrawWiz.h:200
~WizPoints() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: DrawWiz.h:204