KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_regulator_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12PANEL_REGULATOR_BASE::PANEL_REGULATOR_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* bSizerMainReg;
15 bSizerMainReg = new wxBoxSizer( wxVERTICAL );
16
17 wxBoxSizer* bSizerColBalancer;
18 bSizerColBalancer = new wxBoxSizer( wxHORIZONTAL );
19
20 wxBoxSizer* bSizeLeftpReg;
21 bSizeLeftpReg = new wxBoxSizer( wxVERTICAL );
22
23 bSizeLeftpReg->SetMinSize( wxSize( 400,-1 ) );
24 wxBoxSizer* bSizerType;
25 bSizerType = new wxBoxSizer( wxHORIZONTAL );
26
27 m_staticTextRegType = new wxStaticText( this, wxID_ANY, _("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
28 m_staticTextRegType->Wrap( -1 );
29 m_staticTextRegType->SetToolTip( _("Type of the regulator.\nThere are 2 types:\n- regulators which have a dedicated sense pin for the voltage regulation.\n- 3 terminal pins.") );
30
31 bSizerType->Add( m_staticTextRegType, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
32
33 wxString m_choiceRegTypeChoices[] = { _("Standard Type"), _("3 Terminal Type") };
34 int m_choiceRegTypeNChoices = sizeof( m_choiceRegTypeChoices ) / sizeof( wxString );
35 m_choiceRegType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRegTypeNChoices, m_choiceRegTypeChoices, 0 );
36 m_choiceRegType->SetSelection( 0 );
37 bSizerType->Add( m_choiceRegType, 1, wxLEFT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
38
39
40 bSizeLeftpReg->Add( bSizerType, 0, wxEXPAND|wxALL, 5 );
41
42
43 bSizeLeftpReg->Add( 0, 10, 0, wxEXPAND, 5 );
44
45 m_bitmapRegul4pins = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
46 bSizeLeftpReg->Add( m_bitmapRegul4pins, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 10 );
47
48 m_bitmapRegul3pins = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
49 bSizeLeftpReg->Add( m_bitmapRegul3pins, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10 );
50
51
52 bSizeLeftpReg->Add( 0, 10, 0, wxEXPAND, 5 );
53
54 wxStaticBoxSizer* sbSizerRegFormula;
55 sbSizerRegFormula = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Formula") ), wxVERTICAL );
56
57 m_RegulFormula = new wxStaticText( sbSizerRegFormula->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
58 m_RegulFormula->Wrap( -1 );
59 m_RegulFormula->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
60
61 sbSizerRegFormula->Add( m_RegulFormula, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
62
63
64 bSizeLeftpReg->Add( sbSizerRegFormula, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
65
66
67 bSizerColBalancer->Add( bSizeLeftpReg, 0, wxTOP|wxRIGHT|wxEXPAND, 6 );
68
69
70 bSizerColBalancer->Add( 10, 0, 0, wxEXPAND, 5 );
71
72 wxBoxSizer* bSizerRegulRight;
73 bSizerRegulRight = new wxBoxSizer( wxVERTICAL );
74
75 wxBoxSizer* bSizer9;
76 bSizer9 = new wxBoxSizer( wxVERTICAL );
77
78 wxStaticBoxSizer* sbSizerRegulatorsChooser;
79 sbSizerRegulatorsChooser = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Regulator") ), wxVERTICAL );
80
81 wxArrayString m_choiceRegulatorSelectorChoices;
82 m_choiceRegulatorSelector = new wxChoice( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRegulatorSelectorChoices, 0 );
83 m_choiceRegulatorSelector->SetSelection( 0 );
84 sbSizerRegulatorsChooser->Add( m_choiceRegulatorSelector, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
85
86 m_staticTextRegFile = new wxStaticText( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Regulators data file:"), wxDefaultPosition, wxDefaultSize, 0 );
87 m_staticTextRegFile->Wrap( -1 );
88 m_staticTextRegFile->SetToolTip( _("The name of the data file which stores known regulators parameters.") );
89
90 sbSizerRegulatorsChooser->Add( m_staticTextRegFile, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
91
92 wxBoxSizer* bSizerDataFile;
93 bSizerDataFile = new wxBoxSizer( wxHORIZONTAL );
94
95 m_regulators_fileNameCtrl = new wxTextCtrl( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
96 bSizerDataFile->Add( m_regulators_fileNameCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
97
98 m_buttonDataFile = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
99 bSizerDataFile->Add( m_buttonDataFile, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
100
101
102 sbSizerRegulatorsChooser->Add( bSizerDataFile, 1, wxEXPAND, 5 );
103
104 wxBoxSizer* bSizerReulBtn;
105 bSizerReulBtn = new wxBoxSizer( wxHORIZONTAL );
106
107 m_buttonEditItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Edit Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
108 m_buttonEditItem->SetToolTip( _("Edit the current selected regulator.") );
109
110 bSizerReulBtn->Add( m_buttonEditItem, 1, wxALL, 5 );
111
112 m_buttonAddItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Add Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
113 m_buttonAddItem->SetToolTip( _("Enter a new item to the current list of available regulators") );
114
115 bSizerReulBtn->Add( m_buttonAddItem, 1, wxALL, 5 );
116
117 m_buttonRemoveItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Remove Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
118 m_buttonRemoveItem->SetToolTip( _("Remove an item from the current list of available regulators") );
119
120 bSizerReulBtn->Add( m_buttonRemoveItem, 1, wxALL, 5 );
121
122
123 sbSizerRegulatorsChooser->Add( bSizerReulBtn, 1, wxEXPAND, 5 );
124
125
126 bSizer9->Add( sbSizerRegulatorsChooser, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
127
128
129 bSizer9->Add( 0, 10, 1, wxEXPAND, 5 );
130
131 wxFlexGridSizer* fgSizerRegParams;
132 fgSizerRegParams = new wxFlexGridSizer( 7, 6, 4, 0 );
133 fgSizerRegParams->AddGrowableCol( 1 );
134 fgSizerRegParams->SetFlexibleDirection( wxBOTH );
135 fgSizerRegParams->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
136
137
138 fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
139
140
141 fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
142
143 m_labelValMin = new wxStaticText( this, wxID_ANY, _("min"), wxDefaultPosition, wxDefaultSize, 0 );
144 m_labelValMin->Wrap( -1 );
145 fgSizerRegParams->Add( m_labelValMin, 0, wxALIGN_CENTER|wxALL, 5 );
146
147 m_labelValTyp = new wxStaticText( this, wxID_ANY, _("typ"), wxDefaultPosition, wxDefaultSize, 0 );
148 m_labelValTyp->Wrap( -1 );
149 fgSizerRegParams->Add( m_labelValTyp, 0, wxALIGN_CENTER|wxALL, 5 );
150
151 m_labelValMax = new wxStaticText( this, wxID_ANY, _("max"), wxDefaultPosition, wxDefaultSize, 0 );
152 m_labelValMax->Wrap( -1 );
153 fgSizerRegParams->Add( m_labelValMax, 0, wxALIGN_CENTER|wxALL, 5 );
154
155
156 fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
157
158 m_rbRegulR1 = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
159 fgSizerRegParams->Add( m_rbRegulR1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
160
161 m_labelRegultR1 = new wxStaticText( this, wxID_ANY, _("R1:"), wxDefaultPosition, wxDefaultSize, 0 );
162 m_labelRegultR1->Wrap( -1 );
163 fgSizerRegParams->Add( m_labelRegultR1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
164
165 m_r1MinVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
166 m_r1MinVal->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
167
168 fgSizerRegParams->Add( m_r1MinVal, 0, wxALL|wxEXPAND, 5 );
169
170 m_r1TypVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
171 fgSizerRegParams->Add( m_r1TypVal, 0, wxALL|wxEXPAND, 5 );
172
173 m_r1MaxVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
174 m_r1MaxVal->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
175
176 fgSizerRegParams->Add( m_r1MaxVal, 0, wxALL|wxEXPAND, 5 );
177
178 m_labelUnitsR1 = new wxStaticText( this, wxID_ANY, _("kΩ"), wxDefaultPosition, wxDefaultSize, 0 );
179 m_labelUnitsR1->Wrap( -1 );
180 fgSizerRegParams->Add( m_labelUnitsR1, 0, wxALIGN_CENTER_VERTICAL, 5 );
181
182 m_rbRegulR2 = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
183 m_rbRegulR2->SetValue( true );
184 fgSizerRegParams->Add( m_rbRegulR2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
185
186 m_labelRegultR2 = new wxStaticText( this, wxID_ANY, _("R2:"), wxDefaultPosition, wxDefaultSize, 0 );
187 m_labelRegultR2->Wrap( -1 );
188 fgSizerRegParams->Add( m_labelRegultR2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
189
190 m_r2MinVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
191 m_r2MinVal->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
192
193 fgSizerRegParams->Add( m_r2MinVal, 0, wxALL|wxEXPAND, 5 );
194
195 m_r2TypVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
196 fgSizerRegParams->Add( m_r2TypVal, 0, wxALL|wxEXPAND, 5 );
197
198 m_r2MaxVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
199 m_r2MaxVal->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
200
201 fgSizerRegParams->Add( m_r2MaxVal, 0, wxALL|wxEXPAND, 5 );
202
203 m_labelUnitsR2 = new wxStaticText( this, wxID_ANY, _("kΩ"), wxDefaultPosition, wxDefaultSize, 0 );
204 m_labelUnitsR2->Wrap( -1 );
205 fgSizerRegParams->Add( m_labelUnitsR2, 0, wxALIGN_CENTER_VERTICAL, 5 );
206
207 m_rbRegulVout = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
208 fgSizerRegParams->Add( m_rbRegulVout, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
209
210 m_labelVout = new wxStaticText( this, wxID_ANY, _("Vout:"), wxDefaultPosition, wxDefaultSize, 0 );
211 m_labelVout->Wrap( -1 );
212 fgSizerRegParams->Add( m_labelVout, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
213
214 m_voutMinVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
215 m_voutMinVal->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
216
217 fgSizerRegParams->Add( m_voutMinVal, 0, wxALL|wxEXPAND, 5 );
218
219 m_voutTypVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
220 fgSizerRegParams->Add( m_voutTypVal, 0, wxALL|wxEXPAND, 5 );
221
222 m_voutMaxVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
223 m_voutMaxVal->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
224
225 fgSizerRegParams->Add( m_voutMaxVal, 0, wxALL|wxEXPAND, 5 );
226
227 m_labelUnitsVout = new wxStaticText( this, wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 );
228 m_labelUnitsVout->Wrap( -1 );
229 fgSizerRegParams->Add( m_labelUnitsVout, 0, wxALIGN_CENTER_VERTICAL, 5 );
230
231
232 fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
233
234 m_labelVRef = new wxStaticText( this, wxID_ANY, _("Vref:"), wxDefaultPosition, wxDefaultSize, 0 );
235 m_labelVRef->Wrap( -1 );
236 m_labelVRef->SetToolTip( _("The internal reference voltage of the regulator.\nShould not be 0.") );
237
238 fgSizerRegParams->Add( m_labelVRef, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
239
240 m_vrefMinVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
241 fgSizerRegParams->Add( m_vrefMinVal, 0, wxALL|wxEXPAND, 5 );
242
243 m_vrefTypVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
244 fgSizerRegParams->Add( m_vrefTypVal, 0, wxALL|wxEXPAND, 5 );
245
246 m_vrefMaxVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
247 fgSizerRegParams->Add( m_vrefMaxVal, 0, wxALL|wxEXPAND, 5 );
248
249 m_labelUnitsVref = new wxStaticText( this, wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 );
250 m_labelUnitsVref->Wrap( -1 );
251 fgSizerRegParams->Add( m_labelUnitsVref, 0, wxALIGN_CENTER_VERTICAL, 5 );
252
253
254 fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
255
256 m_RegulIadjTitle = new wxStaticText( this, wxID_ANY, _("Iadj:"), wxDefaultPosition, wxDefaultSize, 0 );
257 m_RegulIadjTitle->Wrap( -1 );
258 m_RegulIadjTitle->SetToolTip( _("For 3 terminal regulators only, the Adjust pin current.") );
259
260 fgSizerRegParams->Add( m_RegulIadjTitle, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
261
262
263 fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
264
265 m_iadjTypVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
266 fgSizerRegParams->Add( m_iadjTypVal, 0, wxALL|wxEXPAND, 5 );
267
268 m_iadjMaxVal = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
269 fgSizerRegParams->Add( m_iadjMaxVal, 0, wxALL|wxEXPAND, 5 );
270
271 m_labelUnitsIadj = new wxStaticText( this, wxID_ANY, _("uA"), wxDefaultPosition, wxDefaultSize, 0 );
272 m_labelUnitsIadj->Wrap( -1 );
273 fgSizerRegParams->Add( m_labelUnitsIadj, 0, wxALIGN_CENTER_VERTICAL, 5 );
274
275
276 fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
277
278 m_labelTolSumary = new wxStaticText( this, wxID_ANY, _("Overall tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
279 m_labelTolSumary->Wrap( -1 );
280 fgSizerRegParams->Add( m_labelTolSumary, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
281
282 m_tolTotalMin = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
283 m_tolTotalMin->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
284
285 fgSizerRegParams->Add( m_tolTotalMin, 0, wxALL, 5 );
286
287
288 fgSizerRegParams->Add( 0, 0, 1, wxEXPAND, 5 );
289
290 m_TolTotalMax = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
291 m_TolTotalMax->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
292
293 fgSizerRegParams->Add( m_TolTotalMax, 0, wxALL, 5 );
294
295 m_labelTotalPercent = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
296 m_labelTotalPercent->Wrap( -1 );
297 fgSizerRegParams->Add( m_labelTotalPercent, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
298
299
300 bSizer9->Add( fgSizerRegParams, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 );
301
302 wxBoxSizer* bSizerResTol;
303 bSizerResTol = new wxBoxSizer( wxHORIZONTAL );
304
305 m_labelResTol = new wxStaticText( this, wxID_ANY, _("Resistor tolerance:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
306 m_labelResTol->Wrap( -1 );
307 bSizerResTol->Add( m_labelResTol, 0, wxALIGN_CENTER|wxALL, 5 );
308
309
310 bSizerResTol->Add( 0, 0, 1, 0, 5 );
311
312 m_resTolVal = new wxTextCtrl( this, wxID_ANY, _("1"), wxDefaultPosition, wxSize( 45,-1 ), 0 );
313 bSizerResTol->Add( m_resTolVal, 0, wxALIGN_CENTER|wxALL, 5 );
314
315 m_labelResTolUnit = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
316 m_labelResTolUnit->Wrap( -1 );
317 bSizerResTol->Add( m_labelResTolUnit, 0, wxALIGN_CENTER|wxALL, 5 );
318
319
320 bSizer9->Add( bSizerResTol, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
321
322 wxBoxSizer* bSizerComment;
323 bSizerComment = new wxBoxSizer( wxHORIZONTAL );
324
325 m_labelKicadComment = new wxStaticText( this, wxID_ANY, _("Power Comment:"), wxDefaultPosition, wxDefaultSize, 0 );
326 m_labelKicadComment->Wrap( -1 );
327 bSizerComment->Add( m_labelKicadComment, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
328
329 m_textPowerComment = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), wxTE_CENTER|wxTE_READONLY );
330 m_textPowerComment->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
331
332 bSizerComment->Add( m_textPowerComment, 0, wxALL, 5 );
333
334
335 bSizerComment->Add( 0, 0, 1, wxEXPAND, 5 );
336
337 m_btCopyCB = new wxButton( this, wxID_ANY, _("Copy to Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
338 bSizerComment->Add( m_btCopyCB, 0, wxALL, 5 );
339
340
341 bSizer9->Add( bSizerComment, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
342
343
344 bSizerRegulRight->Add( bSizer9, 0, 0, 5 );
345
346 m_RegulMessage = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
347 m_RegulMessage->Wrap( -1 );
348 bSizerRegulRight->Add( m_RegulMessage, 0, wxALL|wxEXPAND, 10 );
349
350 wxBoxSizer* bSizerRegulButtonCalcReset;
351 bSizerRegulButtonCalcReset = new wxBoxSizer( wxHORIZONTAL );
352
353 m_buttonCalculate = new wxButton( this, wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
354 m_buttonCalculate->SetMinSize( wxSize( 120,-1 ) );
355
356 bSizerRegulButtonCalcReset->Add( m_buttonCalculate, 0, wxALL|wxTOP, 5 );
357
358
359 bSizerRegulButtonCalcReset->Add( 0, 0, 1, wxEXPAND, 5 );
360
361
362 bSizerRegulRight->Add( bSizerRegulButtonCalcReset, 0, wxEXPAND|wxLEFT, 5 );
363
364
365 bSizerRegulRight->Add( 0, 0, 1, wxEXPAND, 5 );
366
367 m_buttonRegulReset = new wxButton( this, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
368 bSizerRegulRight->Add( m_buttonRegulReset, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxRIGHT, 10 );
369
370
371 bSizerColBalancer->Add( bSizerRegulRight, 1, wxEXPAND|wxLEFT, 10 );
372
373
374 bSizerMainReg->Add( bSizerColBalancer, 1, wxEXPAND, 5 );
375
376
377 this->SetSizer( bSizerMainReg );
378 this->Layout();
379 bSizerMainReg->Fit( this );
380
381 // Connect Events
382 m_choiceRegType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulTypeSelection ), NULL, this );
383 m_choiceRegulatorSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorSelection ), NULL, this );
384 m_buttonDataFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnDataFileSelection ), NULL, this );
385 m_buttonEditItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnEditRegulator ), NULL, this );
386 m_buttonAddItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnAddRegulator ), NULL, this );
387 m_buttonRemoveItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRemoveRegulator ), NULL, this );
388 m_btCopyCB->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnCopyCB ), NULL, this );
389 m_buttonCalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorCalcButtonClick ), NULL, this );
390 m_buttonRegulReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorResetButtonClick ), NULL, this );
391}
392
394{
395 // Disconnect Events
396 m_choiceRegType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulTypeSelection ), NULL, this );
397 m_choiceRegulatorSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorSelection ), NULL, this );
398 m_buttonDataFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnDataFileSelection ), NULL, this );
399 m_buttonEditItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnEditRegulator ), NULL, this );
400 m_buttonAddItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnAddRegulator ), NULL, this );
401 m_buttonRemoveItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRemoveRegulator ), NULL, this );
402 m_btCopyCB->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnCopyCB ), NULL, this );
403 m_buttonCalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorCalcButtonClick ), NULL, this );
404 m_buttonRegulReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorResetButtonClick ), NULL, this );
405
406}
const char * name
Definition: DXF_plotter.cpp:57
wxStaticText * m_RegulFormula
wxStaticText * m_labelValMin
virtual void OnRegulatorSelection(wxCommandEvent &event)
wxStaticText * m_labelUnitsVref
virtual void OnRemoveRegulator(wxCommandEvent &event)
wxStaticText * m_labelResTolUnit
wxStaticText * m_labelValMax
wxStaticText * m_labelUnitsR1
virtual void OnRegulTypeSelection(wxCommandEvent &event)
wxStaticText * m_RegulMessage
wxStaticText * m_labelValTyp
wxStaticText * m_labelRegultR1
wxStaticText * m_labelTotalPercent
wxStaticText * m_staticTextRegType
wxStaticText * m_labelUnitsVout
wxStaticText * m_staticTextRegFile
wxStaticText * m_RegulIadjTitle
virtual void OnCopyCB(wxCommandEvent &event)
wxStaticText * m_labelResTol
wxTextCtrl * m_regulators_fileNameCtrl
wxStaticText * m_labelKicadComment
wxRadioButton * m_rbRegulVout
wxStaticBitmap * m_bitmapRegul4pins
wxChoice * m_choiceRegulatorSelector
wxStaticBitmap * m_bitmapRegul3pins
wxStaticText * m_labelRegultR2
virtual void OnEditRegulator(wxCommandEvent &event)
wxStaticText * m_labelUnitsR2
virtual void OnAddRegulator(wxCommandEvent &event)
wxStaticText * m_labelUnitsIadj
virtual void OnRegulatorCalcButtonClick(wxCommandEvent &event)
virtual void OnRegulatorResetButtonClick(wxCommandEvent &event)
virtual void OnDataFileSelection(wxCommandEvent &event)
wxRadioButton * m_rbRegulR2
wxRadioButton * m_rbRegulR1
wxStaticText * m_labelTolSumary
PANEL_REGULATOR_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)
#define _(s)