12PANEL_R_CALCULATOR_BASE::PANEL_R_CALCULATOR_BASE( wxWindow* parent, wxWindowID
id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString&
name ) :
CALCULATOR_PANEL( parent, id, pos, size, style,
name )
14 wxBoxSizer* bSizerESeries;
15 bSizerESeries =
new wxBoxSizer( wxVERTICAL );
17 wxBoxSizer* bMiddleSizerESeries;
18 bMiddleSizerESeries =
new wxBoxSizer( wxHORIZONTAL );
20 wxStaticBoxSizer* sbSizerESeriesInput;
21 sbSizerESeriesInput =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Inputs") ), wxVERTICAL );
23 wxFlexGridSizer* fgSizerAttPrms1;
24 fgSizerAttPrms1 =
new wxFlexGridSizer( 4, 3, 3, 0 );
25 fgSizerAttPrms1->AddGrowableCol( 1 );
26 fgSizerAttPrms1->SetFlexibleDirection( wxHORIZONTAL );
27 fgSizerAttPrms1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
29 m_ESrequired =
new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"Required resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
31 fgSizerAttPrms1->Add(
m_ESrequired, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
33 m_ResRequired =
new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
34 fgSizerAttPrms1->Add(
m_ResRequired, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
36 m_reqResUnits =
new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
38 fgSizerAttPrms1->Add(
m_reqResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
40 m_ESrequired1 =
new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"Exclude value 1:"), wxDefaultPosition, wxDefaultSize, 0 );
42 fgSizerAttPrms1->Add(
m_ESrequired1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
44 m_ResExclude1 =
new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
45 fgSizerAttPrms1->Add(
m_ResExclude1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
47 m_exclude1Units =
new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
49 fgSizerAttPrms1->Add(
m_exclude1Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
51 m_ESrequired11 =
new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"Exclude value 2:"), wxDefaultPosition, wxDefaultSize, 0 );
53 fgSizerAttPrms1->Add(
m_ESrequired11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
55 m_ResExclude2 =
new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
56 fgSizerAttPrms1->Add(
m_ResExclude2, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
58 m_exclude2Units =
new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
60 fgSizerAttPrms1->Add(
m_exclude2Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
63 sbSizerESeriesInput->Add( fgSizerAttPrms1, 0, wxEXPAND|wxBOTTOM, 5 );
65 m_staticline6 =
new wxStaticLine( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
66 sbSizerESeriesInput->Add(
m_staticline6, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
69 bSizer40 =
new wxBoxSizer( wxHORIZONTAL );
71 m_e1 =
new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"E1"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
72 bSizer40->Add(
m_e1, 1, wxALL, 5 );
74 m_e3 =
new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"E3"), wxDefaultPosition, wxDefaultSize, 0 );
75 bSizer40->Add(
m_e3, 1, wxALL, 5 );
77 m_e6 =
new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"E6"), wxDefaultPosition, wxDefaultSize, 0 );
78 m_e6->SetValue(
true );
79 bSizer40->Add(
m_e6, 1, wxALL, 5 );
81 m_e12 =
new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"E12"), wxDefaultPosition, wxDefaultSize, 0 );
82 bSizer40->Add(
m_e12, 1, wxALL, 5 );
84 m_e24 =
new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY,
_(
"E24"), wxDefaultPosition, wxDefaultSize, 0 );
85 bSizer40->Add(
m_e24, 0, wxALL, 5 );
88 sbSizerESeriesInput->Add( bSizer40, 1, wxEXPAND, 5 );
91 bMiddleSizerESeries->Add( sbSizerESeriesInput, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 );
93 wxStaticBoxSizer* sbSizerESeriesSolutions;
94 sbSizerESeriesSolutions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Solutions") ), wxVERTICAL );
96 wxFlexGridSizer* fgSizerESeriesResults;
97 fgSizerESeriesResults =
new wxFlexGridSizer( 6, 5, 3, 0 );
98 fgSizerESeriesResults->AddGrowableCol( 1 );
99 fgSizerESeriesResults->SetFlexibleDirection( wxBOTH );
100 fgSizerESeriesResults->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
102 m_ESeriesSimpleSolution =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"Simple solution:"), wxDefaultPosition, wxDefaultSize, 0 );
106 m_ESeries_Sol2R =
new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
109 fgSizerESeriesResults->Add(
m_ESeries_Sol2R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
111 m_ESeriesSimpleErr =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"Approximation:"), wxDefaultPosition, wxDefaultSize, 0 );
113 fgSizerESeriesResults->Add(
m_ESeriesSimpleErr, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
115 m_ESeriesError2R =
new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
116 fgSizerESeriesResults->Add(
m_ESeriesError2R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
118 m_ESeriesSimplePercent =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"%"), wxDefaultPosition, wxDefaultSize, 0 );
122 m_ESeries3RSolution1 =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"3R solution:"), wxDefaultPosition, wxDefaultSize, 0 );
126 m_ESeries_Sol3R =
new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
129 fgSizerESeriesResults->Add(
m_ESeries_Sol3R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
131 m_ESeriesAltErr =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"Approximation:"), wxDefaultPosition, wxDefaultSize, 0 );
133 fgSizerESeriesResults->Add(
m_ESeriesAltErr, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
135 m_ESeriesError3R =
new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
136 fgSizerESeriesResults->Add(
m_ESeriesError3R, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 3 );
138 m_ESeriesAltPercent =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"%"), wxDefaultPosition, wxDefaultSize, 0 );
142 m_ESeries4RSolution =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"4R solution:"), wxDefaultPosition, wxDefaultSize, 0 );
146 m_ESeries_Sol4R =
new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
149 fgSizerESeriesResults->Add(
m_ESeries_Sol4R, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxEXPAND, 5 );
151 m_ESeriesAltErr1 =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"Approximation:"), wxDefaultPosition, wxDefaultSize, 0 );
153 fgSizerESeriesResults->Add(
m_ESeriesAltErr1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
155 m_ESeriesError4R =
new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
156 fgSizerESeriesResults->Add(
m_ESeriesError4R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
158 m_ESeriesAltPercent1 =
new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"%"), wxDefaultPosition, wxDefaultSize, 0 );
163 sbSizerESeriesSolutions->Add( fgSizerESeriesResults, 0, wxBOTTOM|wxEXPAND, 5 );
165 m_staticline7 =
new wxStaticLine( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
166 sbSizerESeriesSolutions->Add(
m_staticline7, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
168 m_buttonEScalculate =
new wxButton( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY,
_(
"Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
172 bMiddleSizerESeries->Add( sbSizerESeriesSolutions, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
174 wxBoxSizer* bSizer47;
175 bSizer47 =
new wxBoxSizer( wxVERTICAL );
178 bMiddleSizerESeries->Add( bSizer47, 1, wxALIGN_BOTTOM, 5 );
181 bSizerESeries->Add( bMiddleSizerESeries, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
183 wxBoxSizer* bLowerESeries;
184 bLowerESeries =
new wxBoxSizer( wxHORIZONTAL );
186 wxStaticBoxSizer* sbLowerSizerEseriesHelp;
187 sbLowerSizerEseriesHelp =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Help") ), wxVERTICAL );
189 m_panelESeriesHelp =
new HTML_WINDOW( sbLowerSizerEseriesHelp->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
192 sbLowerSizerEseriesHelp->Add(
m_panelESeriesHelp, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
195 bLowerESeries->Add( sbLowerSizerEseriesHelp, 1, wxEXPAND|wxALL, 5 );
198 bSizerESeries->Add( bLowerESeries, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
201 this->SetSizer( bSizerESeries );
203 bSizerESeries->Fit(
this );
Add dark theme support to wxHtmlWindow.
wxStaticText * m_ESeriesSimplePercent
wxStaticText * m_ESeriesSimpleSolution
wxTextCtrl * m_ResRequired
wxTextCtrl * m_ESeriesError4R
wxTextCtrl * m_ESeries_Sol3R
wxStaticText * m_ESeries3RSolution1
wxStaticText * m_reqResUnits
wxStaticText * m_ESrequired
wxStaticText * m_ESeries4RSolution
wxTextCtrl * m_ResExclude2
wxStaticText * m_ESeriesSimpleErr
wxTextCtrl * m_ESeriesError3R
wxTextCtrl * m_ESeries_Sol4R
PANEL_R_CALCULATOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
wxStaticText * m_ESrequired1
wxTextCtrl * m_ESeriesError2R
wxStaticLine * m_staticline6
wxStaticLine * m_staticline7
wxStaticText * m_ESeriesAltErr
wxStaticText * m_ESrequired11
wxStaticText * m_exclude2Units
wxStaticText * m_ESeriesAltPercent1
wxStaticText * m_ESeriesAltErr1
wxStaticText * m_exclude1Units
wxButton * m_buttonEScalculate
wxTextCtrl * m_ESeries_Sol2R
wxTextCtrl * m_ResExclude1
~PANEL_R_CALCULATOR_BASE()
HTML_WINDOW * m_panelESeriesHelp
virtual void OnCalculateESeries(wxCommandEvent &event)
virtual void OnESeriesSelection(wxCommandEvent &event)
wxStaticText * m_ESeriesAltPercent