Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
MathExpressionForm.h
1/*
2 * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef MATHEXPRESSIONFORM_H
19#define MATHEXPRESSIONFORM_H
20
21#include "ElementFormBase.h"
22#include <wx/msgdlg.h>
23
24class MathExpression;
25
26class MathExpressionForm : public MathExpressionFormBase
27{
28public:
29 MathExpressionForm(wxWindow* parent, MathExpression* mathExpr);
30 virtual ~MathExpressionForm();
31protected:
32 bool ValidateData();
33 void SetSintaxHighlights();
34 bool CheckMathExpression();
35 std::string GetVariablesToParse();
36 virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
37 virtual void OnCheckButtonClick(wxCommandEvent& event);
38 virtual void OnOKButtonClick(wxCommandEvent& event);
39 virtual void OnTextEnter(wxCommandEvent& event) {}
40 virtual void OnTextUpdate(wxCommandEvent& event);
41 virtual void OnLeftClickDown(wxMouseEvent& event);
42
43 std::vector<wxString> m_translatedErrorMsg;
44
45 wxWindow* m_parent;
46 MathExpression* m_mathExpr;
47};
48#endif // MATHEXPRESSIONFORM_H
A generic math expression block that can perform math and conditional operations with the inputs.