wxMaxima
Loading...
Searching...
No Matches
Gen5Wiz.h
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
23#ifndef GEN5WIZ_H
24#define GEN5WIZ_H
25
26#include "precomp.h"
27#include <wx/wx.h>
28#include <wx/statline.h>
29
30#include "BTextCtrl.h"
31
32// cppcheck-suppress ctuOneDefinitionRuleViolation
33class Gen5Wiz : public wxDialog
34{
35public:
38 ~Gen5Wiz() override { SendDestroyEvent(); }
39 Gen5Wiz(wxString lab1, wxString lab2, wxString lab3, wxString lab4, wxString lab5,
40 const wxString &val1, const wxString &val2, const wxString &val3, const wxString &val4, const wxString &val5,
41 Configuration *cfg,
42 wxWindow *parent, int id, const wxString &title,
43 bool eq = false,
44 const wxString &warning = wxEmptyString,
45 const wxString &warningToolTip = wxEmptyString,
46 const wxPoint &pos = wxDefaultPosition,
47 const wxSize &size = wxDefaultSize,
48 long style = wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN);
49
50 void SetValue(const wxString &s)
51 {
52 text_ctrl_1->SetValue(s);
53 text_ctrl_1->SetSelection(-1, -1);
54 }
55
56 wxString GetValue1()
57 {
58 return text_ctrl_1->GetValue();
59 };
60
61 wxString GetValue2()
62 {
63 return text_ctrl_2->GetValue();
64 };
65
66 wxString GetValue3()
67 {
68 return text_ctrl_3->GetValue();
69 };
70
71 wxString GetValue4()
72 {
73 return text_ctrl_4->GetValue();
74 };
75
76 wxString GetValue5()
77 {
78 return text_ctrl_5->GetValue();
79 };
80 void SetLabel1ToolTip(wxString toolTip){label_2->SetToolTip(toolTip);}
81 void SetLabel2ToolTip(wxString toolTip){label_3->SetToolTip(toolTip);}
82 void SetLabel3ToolTip(wxString toolTip){label_4->SetToolTip(toolTip);}
83 void SetLabel4ToolTip(wxString toolTip){label_5->SetToolTip(toolTip);}
84 void SetLabel5ToolTip(wxString toolTip){label_6->SetToolTip(toolTip);}
85private:
86 void set_properties();
87
88 void do_layout();
89
90protected:
91 wxStaticText *label_2;
92 BTextCtrl *text_ctrl_1;
93 wxStaticText *label_3;
94 BTextCtrl *text_ctrl_2;
95 wxStaticText *label_4;
96 BTextCtrl *text_ctrl_3;
97 wxStaticText *label_5;
98 BTextCtrl *text_ctrl_4;
99 wxStaticText *label_6;
100 BTextCtrl *text_ctrl_5;
101 wxStaticLine *static_line_1;
102 wxButton *button_1;
103 wxButton *button_2;
104 wxStaticText *m_warning;
105 wxString m_warningText;
106};
107
108#endif // GEN5WIZ_H
A wxTextCtrl with parenthesis matching.
Definition: BTextCtrl.h:34
The configuration storage for the current worksheet.
Definition: Configuration.h:101
Definition: Gen5Wiz.h:34
~Gen5Wiz() override
Saves the geometry while this is still a whole dialog, see FindReplaceDialog::~FindReplaceDialog()
Definition: Gen5Wiz.h:38