14PANEL_TRACK_WIDTH_BASE::PANEL_TRACK_WIDTH_BASE( wxWindow* parent, wxWindowID
id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString&
name ) :
CALCULATOR_PANEL( parent, id, pos, size, style,
name )
16 wxBoxSizer* bSizerTrackWidth;
17 bSizerTrackWidth =
new wxBoxSizer( wxHORIZONTAL );
19 wxBoxSizer* bSizeLeft;
20 bSizeLeft =
new wxBoxSizer( wxVERTICAL );
22 wxStaticBoxSizer* sbSizerTW_Prms;
23 sbSizerTW_Prms =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Parameters") ), wxVERTICAL );
25 wxFlexGridSizer* fgSizerTWprms;
26 fgSizerTWprms =
new wxFlexGridSizer( 4, 3, 0, 0 );
27 fgSizerTWprms->AddGrowableCol( 1 );
28 fgSizerTWprms->SetFlexibleDirection( wxBOTH );
29 fgSizerTWprms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31 m_staticTextCurrent =
new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY,
_(
"Current (I):"), wxDefaultPosition, wxDefaultSize, 0 );
35 m_TrackCurrentValue =
new wxTextCtrl( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
38 m_staticText62 =
new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY,
_(
"A"), wxDefaultPosition, wxDefaultSize, 0 );
40 fgSizerTWprms->Add(
m_staticText62, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
42 m_staticText63 =
new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY,
_(
"Temperature rise:"), wxDefaultPosition, wxDefaultSize, 0 );
44 fgSizerTWprms->Add(
m_staticText63, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
46 m_TrackDeltaTValue =
new wxTextCtrl( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
49 m_trackTempUnits =
new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY,
_(
"deg C"), wxDefaultPosition, wxDefaultSize, 0 );
51 fgSizerTWprms->Add(
m_trackTempUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
53 m_staticText66 =
new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY,
_(
"Conductor length:"), wxDefaultPosition, wxDefaultSize, 0 );
56 fgSizerTWprms->Add(
m_staticText66, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
58 m_TrackLengthValue =
new wxTextCtrl( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
61 wxArrayString m_TW_CuLength_choiceUnitChoices;
66 m_staticText103 =
new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY,
_(
"Copper resistivity:"), wxDefaultPosition, wxDefaultSize, 0 );
70 m_TWResistivity =
new wxTextCtrl( sbSizerTW_Prms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
75 m_resistivityUnits =
new wxStaticText( sbSizerTW_Prms->GetStaticBox(), wxID_ANY,
_(
"ohm-meter"), wxDefaultPosition, wxDefaultSize, 0 );
80 sbSizerTW_Prms->Add( fgSizerTWprms, 0, wxALL|wxEXPAND, 5 );
83 bSizeLeft->Add( sbSizerTW_Prms, 0, wxALL|wxEXPAND, 5 );
89 bSizerTrackWidth->Add( bSizeLeft, 1, wxEXPAND|wxBOTTOM, 5 );
91 wxBoxSizer* bSizeRight;
92 bSizeRight =
new wxBoxSizer( wxVERTICAL );
94 wxStaticBoxSizer* sbSizerTW_Result;
95 sbSizerTW_Result =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"External Layer Traces") ), wxVERTICAL );
97 wxFlexGridSizer* fgSizerTW_Results;
98 fgSizerTW_Results =
new wxFlexGridSizer( 0, 3, 0, 0 );
99 fgSizerTW_Results->AddGrowableCol( 1 );
100 fgSizerTW_Results->SetFlexibleDirection( wxBOTH );
101 fgSizerTW_Results->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
103 m_staticTextExtWidth =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"Trace width (W):"), wxDefaultPosition, wxDefaultSize, 0 );
107 m_ExtTrackWidthValue =
new wxTextCtrl( sbSizerTW_Result->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
110 wxArrayString m_TW_ExtTrackWidth_choiceUnitChoices;
115 m_staticText65 =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"Trace thickness (H):"), wxDefaultPosition, wxDefaultSize, 0 );
117 fgSizerTW_Results->Add(
m_staticText65, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
119 m_ExtTrackThicknessValue =
new wxTextCtrl( sbSizerTW_Result->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
122 wxArrayString m_ExtTrackThicknessUnitChoices;
127 m_staticline3 =
new wxStaticLine( sbSizerTW_Result->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
128 fgSizerTW_Results->Add(
m_staticline3, 0, wxEXPAND|wxBOTTOM, 5 );
130 m_staticline4 =
new wxStaticLine( sbSizerTW_Result->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
131 fgSizerTW_Results->Add(
m_staticline4, 0, wxEXPAND|wxBOTTOM, 5 );
133 m_staticline5 =
new wxStaticLine( sbSizerTW_Result->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
134 fgSizerTW_Results->Add(
m_staticline5, 0, wxEXPAND|wxBOTTOM, 5 );
136 m_staticTextArea =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"Cross-section area:"), wxDefaultPosition, wxDefaultSize, 0 );
138 fgSizerTW_Results->Add(
m_staticTextArea, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
140 m_ExtTrackAreaValue =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"dummy"), wxDefaultPosition, wxDefaultSize, 0 );
142 fgSizerTW_Results->Add(
m_ExtTrackAreaValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
144 m_extTrackAreaUnitLabel =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"mm ^ 2"), wxDefaultPosition, wxDefaultSize, 0 );
148 m_staticText651 =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"Resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
150 fgSizerTW_Results->Add(
m_staticText651, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
152 m_ExtTrackResistValue =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"dummy"), wxDefaultPosition, wxDefaultSize, 0 );
154 fgSizerTW_Results->Add(
m_ExtTrackResistValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
156 m_extTrackResUnits =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"ohm"), wxDefaultPosition, wxDefaultSize, 0 );
158 fgSizerTW_Results->Add(
m_extTrackResUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
160 m_staticText661 =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 );
162 fgSizerTW_Results->Add(
m_staticText661, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
164 m_ExtTrackVDropValue =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"dummy"), wxDefaultPosition, wxDefaultSize, 0 );
166 fgSizerTW_Results->Add(
m_ExtTrackVDropValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
168 m_staticText83 =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"V"), wxDefaultPosition, wxDefaultSize, 0 );
170 fgSizerTW_Results->Add(
m_staticText83, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
172 m_staticText79 =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"Power loss:"), wxDefaultPosition, wxDefaultSize, 0 );
174 fgSizerTW_Results->Add(
m_staticText79, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
176 m_ExtTrackLossValue =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"dummy"), wxDefaultPosition, wxDefaultSize, 0 );
178 fgSizerTW_Results->Add(
m_ExtTrackLossValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
180 m_staticText791 =
new wxStaticText( sbSizerTW_Result->GetStaticBox(), wxID_ANY,
_(
"W"), wxDefaultPosition, wxDefaultSize, 0 );
182 fgSizerTW_Results->Add(
m_staticText791, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
185 sbSizerTW_Result->Add( fgSizerTW_Results, 0, wxALL|wxEXPAND, 5 );
188 bSizeRight->Add( sbSizerTW_Result, 1, wxEXPAND|wxALL, 5 );
190 wxStaticBoxSizer* sbSizerTW_Result1;
191 sbSizerTW_Result1 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Internal Layer Traces") ), wxVERTICAL );
193 wxFlexGridSizer* fgSizerTW_Results1;
194 fgSizerTW_Results1 =
new wxFlexGridSizer( 7, 3, 0, 0 );
195 fgSizerTW_Results1->AddGrowableCol( 1 );
196 fgSizerTW_Results1->SetFlexibleDirection( wxBOTH );
197 fgSizerTW_Results1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
199 m_staticTextIntWidth =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"Trace width (W):"), wxDefaultPosition, wxDefaultSize, 0 );
201 m_staticTextIntWidth->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxEmptyString ) );
205 m_IntTrackWidthValue =
new wxTextCtrl( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
208 wxArrayString m_TW_IntTrackWidth_choiceUnitChoices;
213 m_staticText652 =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"Trace thickness (H):"), wxDefaultPosition, wxDefaultSize, 0 );
215 fgSizerTW_Results1->Add(
m_staticText652, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
217 m_IntTrackThicknessValue =
new wxTextCtrl( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
220 wxArrayString m_IntTrackThicknessUnitChoices;
225 m_staticline8 =
new wxStaticLine( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
226 fgSizerTW_Results1->Add(
m_staticline8, 0, wxEXPAND|wxBOTTOM, 5 );
228 m_staticline9 =
new wxStaticLine( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
229 fgSizerTW_Results1->Add(
m_staticline9, 0, wxEXPAND|wxBOTTOM, 5 );
231 m_staticline10 =
new wxStaticLine( sbSizerTW_Result1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
232 fgSizerTW_Results1->Add(
m_staticline10, 0, wxEXPAND|wxBOTTOM, 5 );
234 m_staticTextArea1 =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"Cross-section area:"), wxDefaultPosition, wxDefaultSize, 0 );
236 fgSizerTW_Results1->Add(
m_staticTextArea1, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
238 m_IntTrackAreaValue =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"dummy"), wxDefaultPosition, wxDefaultSize, 0 );
240 fgSizerTW_Results1->Add(
m_IntTrackAreaValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
242 m_intTrackAreaUnitLabel =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"mm ^ 2"), wxDefaultPosition, wxDefaultSize, 0 );
246 m_staticText6511 =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"Resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
248 fgSizerTW_Results1->Add(
m_staticText6511, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
250 m_IntTrackResistValue =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"dummy"), wxDefaultPosition, wxDefaultSize, 0 );
252 fgSizerTW_Results1->Add(
m_IntTrackResistValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
254 m_intTrackResUnits =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"ohm"), wxDefaultPosition, wxDefaultSize, 0 );
256 fgSizerTW_Results1->Add(
m_intTrackResUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
258 m_staticText6611 =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 );
260 fgSizerTW_Results1->Add(
m_staticText6611, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
262 m_IntTrackVDropValue =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"dummy"), wxDefaultPosition, wxDefaultSize, 0 );
264 fgSizerTW_Results1->Add(
m_IntTrackVDropValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
266 m_staticText831 =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"V"), wxDefaultPosition, wxDefaultSize, 0 );
268 fgSizerTW_Results1->Add(
m_staticText831, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
270 m_staticText792 =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"Power loss:"), wxDefaultPosition, wxDefaultSize, 0 );
272 fgSizerTW_Results1->Add(
m_staticText792, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
274 m_IntTrackLossValue =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"dummy"), wxDefaultPosition, wxDefaultSize, 0 );
276 fgSizerTW_Results1->Add(
m_IntTrackLossValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
278 m_staticText7911 =
new wxStaticText( sbSizerTW_Result1->GetStaticBox(), wxID_ANY,
_(
"W"), wxDefaultPosition, wxDefaultSize, 0 );
280 fgSizerTW_Results1->Add(
m_staticText7911, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
283 sbSizerTW_Result1->Add( fgSizerTW_Results1, 0, wxALL|wxEXPAND, 5 );
286 bSizeRight->Add( sbSizerTW_Result1, 1, wxEXPAND|wxALL, 5 );
288 m_buttonTrackWidthReset =
new wxButton(
this, wxID_ANY,
_(
"Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
292 bSizerTrackWidth->Add( bSizeRight, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
295 this->SetSizer( bSizerTrackWidth );
297 bSizerTrackWidth->Fit(
this );
Add dark theme support to wxHtmlWindow.
wxTextCtrl * m_TrackLengthValue
wxStaticText * m_staticText831
wxStaticLine * m_staticline4
wxStaticText * m_staticText6611
virtual void OnTWCalculateFromCurrent(wxCommandEvent &event)
virtual void OnTWCalculateFromIntWidth(wxCommandEvent &event)
wxStaticLine * m_staticline5
wxTextCtrl * m_IntTrackThicknessValue
PANEL_TRACK_WIDTH_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)
wxTextCtrl * m_ExtTrackThicknessValue
wxStaticText * m_staticTextCurrent
wxStaticText * m_staticTextExtWidth
wxStaticText * m_ExtTrackLossValue
wxStaticText * m_staticText791
wxStaticText * m_staticText651
wxStaticText * m_IntTrackVDropValue
HTML_WINDOW * m_htmlWinFormulas
wxStaticText * m_staticText66
virtual void OnTWResetButtonClick(wxCommandEvent &event)
wxStaticText * m_extTrackResUnits
virtual void OnTWCalculateFromExtWidth(wxCommandEvent &event)
wxStaticText * m_staticText661
wxStaticText * m_staticTextArea
wxTextCtrl * m_IntTrackWidthValue
wxTextCtrl * m_TrackCurrentValue
wxStaticText * m_intTrackResUnits
wxStaticText * m_IntTrackResistValue
wxStaticText * m_staticText62
wxStaticText * m_staticTextIntWidth
wxStaticText * m_IntTrackLossValue
UNIT_SELECTOR_THICKNESS * m_IntTrackThicknessUnit
wxStaticText * m_ExtTrackAreaValue
UNIT_SELECTOR_LEN * m_TW_IntTrackWidth_choiceUnit
virtual void OnTWParametersChanged(wxCommandEvent &event)
wxStaticText * m_resistivityUnits
wxStaticText * m_ExtTrackVDropValue
wxStaticText * m_staticTextArea1
~PANEL_TRACK_WIDTH_BASE()
wxStaticText * m_IntTrackAreaValue
wxStaticText * m_staticText6511
UNIT_SELECTOR_THICKNESS * m_ExtTrackThicknessUnit
wxStaticText * m_staticText652
UNIT_SELECTOR_LEN * m_TW_ExtTrackWidth_choiceUnit
wxStaticText * m_staticText65
wxStaticText * m_staticText63
wxStaticText * m_staticText792
wxStaticText * m_staticText83
wxStaticText * m_staticText103
wxStaticText * m_staticText7911
wxStaticLine * m_staticline9
UNIT_SELECTOR_LEN * m_TW_CuLength_choiceUnit
wxStaticText * m_ExtTrackResistValue
wxTextCtrl * m_TrackDeltaTValue
wxStaticLine * m_staticline8
wxTextCtrl * m_ExtTrackWidthValue
wxStaticText * m_intTrackAreaUnitLabel
wxStaticLine * m_staticline10
wxStaticLine * m_staticline3
wxTextCtrl * m_TWResistivity
wxStaticText * m_staticText79
wxStaticText * m_extTrackAreaUnitLabel
wxStaticText * m_trackTempUnits
wxButton * m_buttonTrackWidthReset