KiCad PCB EDA Suite
dialog_edit_component_in_lib_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "widgets/wx_grid.h"
9 
11 
13 
14 DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15 {
16  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxBoxSizer* bUpperSizer;
22  bUpperSizer = new wxBoxSizer( wxVERTICAL );
23 
24  m_NoteBook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0|wxTAB_TRAVERSAL );
25  m_PanelBasic = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
26  wxBoxSizer* bSizerBasicPanel;
27  bSizerBasicPanel = new wxBoxSizer( wxVERTICAL );
28 
29  wxStaticBoxSizer* sbSizer4;
30  sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Fields") ), wxVERTICAL );
31 
32  m_grid = new WX_GRID( sbSizer4->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
33 
34  // Grid
35  m_grid->CreateGrid( 4, 11 );
36  m_grid->EnableEditing( true );
37  m_grid->EnableGridLines( true );
38  m_grid->EnableDragGridSize( false );
39  m_grid->SetMargins( 0, 0 );
40 
41  // Columns
42  m_grid->SetColSize( 0, 72 );
43  m_grid->SetColSize( 1, 120 );
44  m_grid->SetColSize( 2, 48 );
45  m_grid->SetColSize( 3, 72 );
46  m_grid->SetColSize( 4, 72 );
47  m_grid->SetColSize( 5, 48 );
48  m_grid->SetColSize( 6, 48 );
49  m_grid->SetColSize( 7, 84 );
50  m_grid->SetColSize( 8, 84 );
51  m_grid->SetColSize( 9, 84 );
52  m_grid->SetColSize( 10, 84 );
53  m_grid->EnableDragColMove( false );
54  m_grid->EnableDragColSize( true );
55  m_grid->SetColLabelSize( 22 );
56  m_grid->SetColLabelValue( 0, _("Name") );
57  m_grid->SetColLabelValue( 1, _("Value") );
58  m_grid->SetColLabelValue( 2, _("Show") );
59  m_grid->SetColLabelValue( 3, _("H Align") );
60  m_grid->SetColLabelValue( 4, _("V Align") );
61  m_grid->SetColLabelValue( 5, _("Italic") );
62  m_grid->SetColLabelValue( 6, _("Bold") );
63  m_grid->SetColLabelValue( 7, _("Text Size") );
64  m_grid->SetColLabelValue( 8, _("Orientation") );
65  m_grid->SetColLabelValue( 9, _("X Position") );
66  m_grid->SetColLabelValue( 10, _("Y Position") );
67  m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
68 
69  // Rows
70  m_grid->EnableDragRowSize( true );
71  m_grid->SetRowLabelSize( 0 );
72  m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
73 
74  // Label Appearance
75 
76  // Cell Defaults
77  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
78  m_grid->SetMinSize( wxSize( -1,160 ) );
79 
80  sbSizer4->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
81 
82  bButtonSize = new wxBoxSizer( wxHORIZONTAL );
83 
84  m_bpAdd = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
85  m_bpAdd->SetToolTip( _("Add field") );
86 
87  bButtonSize->Add( m_bpAdd, 0, wxRIGHT|wxLEFT, 5 );
88 
89  m_bpMoveUp = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
90  m_bpMoveUp->SetToolTip( _("Move up") );
91 
92  bButtonSize->Add( m_bpMoveUp, 0, wxRIGHT, 5 );
93 
94  m_bpMoveDown = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
95  m_bpMoveDown->SetToolTip( _("Move down") );
96 
97  bButtonSize->Add( m_bpMoveDown, 0, wxRIGHT, 5 );
98 
99 
100  bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 );
101 
102  m_bpDelete = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
103  m_bpDelete->SetToolTip( _("Delete field") );
104 
105  bButtonSize->Add( m_bpDelete, 0, wxRIGHT|wxLEFT, 10 );
106 
107 
108  sbSizer4->Add( bButtonSize, 0, wxEXPAND|wxBOTTOM, 5 );
109 
110 
111  bSizerBasicPanel->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
112 
113  wxBoxSizer* bSizerMidBasicPanel;
114  bSizerMidBasicPanel = new wxBoxSizer( wxVERTICAL );
115 
116  wxFlexGridSizer* fgSizerFPID;
117  fgSizerFPID = new wxFlexGridSizer( 4, 2, 3, 0 );
118  fgSizerFPID->AddGrowableCol( 1 );
119  fgSizerFPID->SetFlexibleDirection( wxBOTH );
120  fgSizerFPID->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
121 
122  wxStaticText* staticNameLabel;
123  staticNameLabel = new wxStaticText( m_PanelBasic, wxID_ANY, _("Symbol name:"), wxDefaultPosition, wxDefaultSize, 0 );
124  staticNameLabel->Wrap( -1 );
125  fgSizerFPID->Add( staticNameLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
126 
127  m_SymbolNameCtrl = new wxTextCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
128  fgSizerFPID->Add( m_SymbolNameCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
129 
130  wxStaticText* staticDescriptionLabel;
131  staticDescriptionLabel = new wxStaticText( m_PanelBasic, wxID_ANY, _("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
132  staticDescriptionLabel->Wrap( -1 );
133  fgSizerFPID->Add( staticDescriptionLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
134 
135  m_DescCtrl = new wxTextCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
136  fgSizerFPID->Add( m_DescCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
137 
138  staticKeywordsLabel = new wxStaticText( m_PanelBasic, wxID_ANY, _("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
139  staticKeywordsLabel->Wrap( -1 );
140  fgSizerFPID->Add( staticKeywordsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
141 
142  m_KeywordCtrl = new wxTextCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
143  fgSizerFPID->Add( m_KeywordCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
144 
145  m_inheritsStaticText = new wxStaticText( m_PanelBasic, wxID_ANY, _("Derive from symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
146  m_inheritsStaticText->Wrap( -1 );
147  fgSizerFPID->Add( m_inheritsStaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
148 
149  m_inheritanceSelectCombo = new wxComboBox( m_PanelBasic, wxID_ANY, _("<None>"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
150  m_inheritanceSelectCombo->SetToolTip( _("Select symbol to derive this symbol from or select\n<None> for root symbol.\n\nDerived symbols were formerly referred to as aliases.\nThis is no longer the case and all symbols are either\nderived from another symbols or they stand alone as\nroot symbols.") );
151 
152  fgSizerFPID->Add( m_inheritanceSelectCombo, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
153 
154 
155  bSizerMidBasicPanel->Add( fgSizerFPID, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
156 
157 
158  bSizerBasicPanel->Add( bSizerMidBasicPanel, 0, wxEXPAND, 5 );
159 
160  bSizerLowerBasicPanel = new wxBoxSizer( wxHORIZONTAL );
161 
162  wxBoxSizer* bSizerLeftCol;
163  bSizerLeftCol = new wxBoxSizer( wxVERTICAL );
164 
165  wxStaticBoxSizer* sbSizerSymbol;
166  sbSizerSymbol = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Symbol") ), wxVERTICAL );
167 
168  m_AsConvertButt = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Has alternate body style (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 );
169  m_AsConvertButt->SetToolTip( _("Check this option if the symbol has an alternate body style (De Morgan)") );
170 
171  sbSizerSymbol->Add( m_AsConvertButt, 0, wxRIGHT|wxLEFT, 5 );
172 
173  m_OptionPower = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Define as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
174  m_OptionPower->SetToolTip( _("Setting this option makes the symbol in question appear in the\n\"add power port\" dialog. It will lock the value text to protect it\nfrom editing in Eeschema. The symbol will not be included in\nthe BOM and cannot be assigned a footprint.") );
175 
176  sbSizerSymbol->Add( m_OptionPower, 0, wxALL, 5 );
177 
178  m_excludeFromBomCheckBox = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Exclude from schematic bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
179  sbSizerSymbol->Add( m_excludeFromBomCheckBox, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
180 
181  m_excludeFromBoardCheckBox = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
182  sbSizerSymbol->Add( m_excludeFromBoardCheckBox, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
183 
184  wxBoxSizer* bSizerUnitCount;
185  bSizerUnitCount = new wxBoxSizer( wxHORIZONTAL );
186 
187  m_staticTextNbUnits = new wxStaticText( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Number of Units:"), wxDefaultPosition, wxDefaultSize, 0 );
188  m_staticTextNbUnits->Wrap( -1 );
189  m_staticTextNbUnits->SetToolTip( _("Enter the number of units for a symbol that contains more than one unit") );
190 
191  bSizerUnitCount->Add( m_staticTextNbUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
192 
193  m_SelNumberOfUnits = new wxSpinCtrl( sbSizerSymbol->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 64, 1 );
194  bSizerUnitCount->Add( m_SelNumberOfUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
195 
196 
197  sbSizerSymbol->Add( bSizerUnitCount, 1, wxEXPAND|wxLEFT|wxTOP, 5 );
198 
199  m_OptionPartsLocked = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("All units are not interchangeable"), wxDefaultPosition, wxDefaultSize, 0 );
200  m_OptionPartsLocked->SetToolTip( _("Check this option when creating multiple unit symbols and all units are not interchangeable") );
201 
202  sbSizerSymbol->Add( m_OptionPartsLocked, 0, wxALL, 5 );
203 
204 
205  bSizerLeftCol->Add( sbSizerSymbol, 0, wxEXPAND|wxALL, 5 );
206 
207 
208  bSizerLowerBasicPanel->Add( bSizerLeftCol, 1, wxEXPAND, 5 );
209 
210  wxBoxSizer* bSizerRightCol;
211  bSizerRightCol = new wxBoxSizer( wxVERTICAL );
212 
213  wxStaticBoxSizer* sbSizerPinTextOpts;
214  sbSizerPinTextOpts = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Pin Text Options") ), wxVERTICAL );
215 
216  m_ShowPinNumButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Show pin number"), wxDefaultPosition, wxDefaultSize, 0 );
217  m_ShowPinNumButt->SetValue(true);
218  m_ShowPinNumButt->SetToolTip( _("Show or hide pin numbers") );
219 
220  sbSizerPinTextOpts->Add( m_ShowPinNumButt, 0, wxRIGHT|wxLEFT, 5 );
221 
222  m_ShowPinNameButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Show pin name"), wxDefaultPosition, wxDefaultSize, 0 );
223  m_ShowPinNameButt->SetValue(true);
224  m_ShowPinNameButt->SetToolTip( _("Show or hide pin names") );
225 
226  sbSizerPinTextOpts->Add( m_ShowPinNameButt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
227 
228 
229  sbSizerPinTextOpts->Add( 0, 0, 1, wxEXPAND, 5 );
230 
231  m_PinsNameInsideButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Place pin names inside"), wxDefaultPosition, wxDefaultSize, 0 );
232  m_PinsNameInsideButt->SetValue(true);
233  m_PinsNameInsideButt->SetToolTip( _("Check this option to have pin names inside the body and pin number outside.\nIf not checked pins names and pins numbers are outside.") );
234 
235  sbSizerPinTextOpts->Add( m_PinsNameInsideButt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
236 
237  wxBoxSizer* bSizerNameOffset;
238  bSizerNameOffset = new wxBoxSizer( wxHORIZONTAL );
239 
240  m_nameOffsetLabel = new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Position offset:"), wxDefaultPosition, wxDefaultSize, 0 );
241  m_nameOffsetLabel->Wrap( -1 );
242  m_nameOffsetLabel->SetToolTip( _("Margin (in 0.001 inches) between a pin name position and the component body.\nA value from 10 to 40 is usually good.") );
243 
244  bSizerNameOffset->Add( m_nameOffsetLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 24 );
245 
246  m_nameOffsetCtrl = new wxTextCtrl( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
247  bSizerNameOffset->Add( m_nameOffsetCtrl, 1, wxLEFT|wxRIGHT, 5 );
248 
249  m_nameOffsetUnits = new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
250  m_nameOffsetUnits->Wrap( -1 );
251  bSizerNameOffset->Add( m_nameOffsetUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
252 
253 
254  sbSizerPinTextOpts->Add( bSizerNameOffset, 0, wxEXPAND|wxTOP, 3 );
255 
256 
257  sbSizerPinTextOpts->Add( 0, 0, 0, wxEXPAND, 5 );
258 
259 
260  bSizerRightCol->Add( sbSizerPinTextOpts, 1, wxEXPAND|wxALL, 5 );
261 
262 
263  bSizerLowerBasicPanel->Add( bSizerRightCol, 1, wxEXPAND, 5 );
264 
265 
266  bSizerBasicPanel->Add( bSizerLowerBasicPanel, 0, wxEXPAND, 5 );
267 
268 
269  m_PanelBasic->SetSizer( bSizerBasicPanel );
270  m_PanelBasic->Layout();
271  bSizerBasicPanel->Fit( m_PanelBasic );
272  m_NoteBook->AddPage( m_PanelBasic, _("General"), true );
273  m_PanelFootprintFilter = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
274  wxBoxSizer* bPanelFpFilterBoxSizer;
275  bPanelFpFilterBoxSizer = new wxBoxSizer( wxHORIZONTAL );
276 
277  wxBoxSizer* bFpFilterLeftBoxSizer;
278  bFpFilterLeftBoxSizer = new wxBoxSizer( wxVERTICAL );
279 
280  m_staticTextFootprints = new wxStaticText( m_PanelFootprintFilter, wxID_ANY, _("Footprint filters:"), wxDefaultPosition, wxDefaultSize, 0 );
281  m_staticTextFootprints->Wrap( -1 );
282  m_staticTextFootprints->SetToolTip( _("A list of footprints names that can be used for this symbol.\nFootprints names can used wildcards like sm* to allow all footprints names starting by sm.") );
283 
284  bFpFilterLeftBoxSizer->Add( m_staticTextFootprints, 0, wxRIGHT|wxLEFT, 5 );
285 
286  m_FootprintFilterListBox = new wxListBox( m_PanelFootprintFilter, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
287  bFpFilterLeftBoxSizer->Add( m_FootprintFilterListBox, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
288 
289  wxBoxSizer* bFpFilterRightBoxSizer;
290  bFpFilterRightBoxSizer = new wxBoxSizer( wxHORIZONTAL );
291 
292  m_addFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
293  m_addFilterButton->SetToolTip( _("Add footprint filter") );
294 
295  bFpFilterRightBoxSizer->Add( m_addFilterButton, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
296 
297  m_editFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
298  m_editFilterButton->SetToolTip( _("Edit footprint filter") );
299 
300  bFpFilterRightBoxSizer->Add( m_editFilterButton, 0, wxALL, 5 );
301 
302 
303  bFpFilterRightBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
304 
305  m_deleteFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
306  m_deleteFilterButton->SetToolTip( _("Delete footprint filter") );
307 
308  bFpFilterRightBoxSizer->Add( m_deleteFilterButton, 0, wxALL, 5 );
309 
310 
311  bFpFilterLeftBoxSizer->Add( bFpFilterRightBoxSizer, 0, 0, 5 );
312 
313 
314  bPanelFpFilterBoxSizer->Add( bFpFilterLeftBoxSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
315 
316 
317  m_PanelFootprintFilter->SetSizer( bPanelFpFilterBoxSizer );
318  m_PanelFootprintFilter->Layout();
319  bPanelFpFilterBoxSizer->Fit( m_PanelFootprintFilter );
320  m_NoteBook->AddPage( m_PanelFootprintFilter, _("Footprint Filters"), false );
321 
322  bUpperSizer->Add( m_NoteBook, 1, wxEXPAND, 5 );
323 
324 
325  bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
326 
327  wxBoxSizer* bSizer101;
328  bSizer101 = new wxBoxSizer( wxHORIZONTAL );
329 
330 
331  bSizer101->Add( 0, 0, 1, wxEXPAND, 5 );
332 
333  m_spiceFieldsButton = new wxButton( this, wxID_ANY, _("Edit Spice Model..."), wxDefaultPosition, wxDefaultSize, 0 );
334  bSizer101->Add( m_spiceFieldsButton, 0, wxEXPAND|wxALL, 5 );
335 
336 
337  bSizer101->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
338 
339  m_stdSizerButton = new wxStdDialogButtonSizer();
340  m_stdSizerButtonOK = new wxButton( this, wxID_OK );
341  m_stdSizerButton->AddButton( m_stdSizerButtonOK );
342  m_stdSizerButtonCancel = new wxButton( this, wxID_CANCEL );
344  m_stdSizerButton->Realize();
345 
346  bSizer101->Add( m_stdSizerButton, 0, wxEXPAND|wxALL, 5 );
347 
348 
349  bMainSizer->Add( bSizer101, 0, wxEXPAND, 5 );
350 
351 
352  this->SetSizer( bMainSizer );
353  this->Layout();
354  bMainSizer->Fit( this );
355 
356  // Connect Events
357  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnUpdateUI ) );
358  m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSizeGrid ), NULL, this );
359  m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddField ), NULL, this );
360  m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveUp ), NULL, this );
361  m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveDown ), NULL, this );
362  m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteField ), NULL, this );
363  m_SymbolNameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSymbolNameKillFocus ), NULL, this );
364  m_SymbolNameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSymbolNameText ), NULL, this );
365  m_OptionPower->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::onPowerCheckBox ), NULL, this );
366  m_FootprintFilterListBox->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnFilterDClick ), NULL, this );
367  m_FootprintFilterListBox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditFootprintFilter ), NULL, this );
368  m_addFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddFootprintFilter ), NULL, this );
369  m_editFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditFootprintFilter ), NULL, this );
370  m_deleteFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteFootprintFilter ), NULL, this );
371  m_spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditSpiceModel ), NULL, this );
372  m_stdSizerButtonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnCancelButtonClick ), NULL, this );
373 }
374 
376 {
377  // Disconnect Events
378  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnUpdateUI ) );
379  m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSizeGrid ), NULL, this );
380  m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddField ), NULL, this );
381  m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveUp ), NULL, this );
382  m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveDown ), NULL, this );
383  m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteField ), NULL, this );
384  m_SymbolNameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSymbolNameKillFocus ), NULL, this );
385  m_SymbolNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSymbolNameText ), NULL, this );
386  m_OptionPower->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::onPowerCheckBox ), NULL, this );
387  m_FootprintFilterListBox->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnFilterDClick ), NULL, this );
388  m_FootprintFilterListBox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditFootprintFilter ), NULL, this );
389  m_addFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddFootprintFilter ), NULL, this );
390  m_editFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditFootprintFilter ), NULL, this );
391  m_deleteFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteFootprintFilter ), NULL, this );
392  m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditSpiceModel ), NULL, this );
393  m_stdSizerButtonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnCancelButtonClick ), NULL, this );
394 
395 }
virtual void OnAddField(wxCommandEvent &event)
virtual void OnDeleteField(wxCommandEvent &event)
virtual void onPowerCheckBox(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
virtual void OnDeleteFootprintFilter(wxCommandEvent &event)
#define NULL
virtual void OnMoveDown(wxCommandEvent &event)
DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE(wxWindow *parent, wxWindowID id=ID_LIBEDIT_NOTEBOOK, const wxString &title=_("Library Symbol Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnCancelButtonClick(wxCommandEvent &event)
virtual void OnSymbolNameKillFocus(wxFocusEvent &event)
virtual void OnEditFootprintFilter(wxCommandEvent &event)
#define _(s)
Definition: 3d_actions.cpp:33
virtual void OnSymbolNameText(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnEditSpiceModel(wxCommandEvent &event)
virtual void OnAddFootprintFilter(wxCommandEvent &event)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:49