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 Dec 30 2017)
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, wxSIMPLE_BORDER );
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_CENTRE, wxALIGN_CENTRE );
68 
69  // Rows
70  m_grid->EnableDragRowSize( true );
71  m_grid->SetRowLabelSize( 0 );
72  m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
73 
74  // Label Appearance
75 
76  // Cell Defaults
77  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
78  m_grid->SetMinSize( wxSize( -1,180 ) );
79 
80  sbSizer4->Add( m_grid, 0, wxTOP|wxBOTTOM|wxEXPAND, 5 );
81 
82  wxBoxSizer* bButtonSize;
83  bButtonSize = new wxBoxSizer( wxHORIZONTAL );
84 
85  m_bpAdd = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
86  m_bpAdd->SetMinSize( wxSize( 30,29 ) );
87 
88  bButtonSize->Add( m_bpAdd, 0, wxRIGHT, 5 );
89 
90  m_bpDelete = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
91  m_bpDelete->SetMinSize( wxSize( 30,29 ) );
92 
93  bButtonSize->Add( m_bpDelete, 0, wxRIGHT, 10 );
94 
95  m_bpMoveUp = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
96  m_bpMoveUp->SetMinSize( wxSize( 30,29 ) );
97 
98  bButtonSize->Add( m_bpMoveUp, 0, wxLEFT, 10 );
99 
100  m_bpMoveDown = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
101  m_bpMoveDown->SetMinSize( wxSize( 30,29 ) );
102 
103  bButtonSize->Add( m_bpMoveDown, 0, wxRIGHT|wxLEFT, 5 );
104 
105 
106  bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
107 
108 
109  sbSizer4->Add( bButtonSize, 1, wxEXPAND|wxBOTTOM, 5 );
110 
111 
112  bSizerBasicPanel->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
113 
114  wxBoxSizer* bSizerMidBasicPanel;
115  bSizerMidBasicPanel = new wxBoxSizer( wxVERTICAL );
116 
117  wxFlexGridSizer* fgSizerFPID;
118  fgSizerFPID = new wxFlexGridSizer( 4, 2, 3, 0 );
119  fgSizerFPID->AddGrowableCol( 1 );
120  fgSizerFPID->SetFlexibleDirection( wxBOTH );
121  fgSizerFPID->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
122 
123  wxStaticText* staticNameLabel;
124  staticNameLabel = new wxStaticText( m_PanelBasic, wxID_ANY, _("Symbol name:"), wxDefaultPosition, wxDefaultSize, 0 );
125  staticNameLabel->Wrap( -1 );
126  fgSizerFPID->Add( staticNameLabel, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
127 
128  m_SymbolNameCtrl = new wxTextCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
129  fgSizerFPID->Add( m_SymbolNameCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
130 
131  wxStaticText* staticDescriptionLabel;
132  staticDescriptionLabel = new wxStaticText( m_PanelBasic, wxID_ANY, _("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
133  staticDescriptionLabel->Wrap( -1 );
134  fgSizerFPID->Add( staticDescriptionLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
135 
136  m_DescCtrl = new wxTextCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
137  fgSizerFPID->Add( m_DescCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
138 
139  staticKeywordsLabel = new wxStaticText( m_PanelBasic, wxID_ANY, _("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
140  staticKeywordsLabel->Wrap( -1 );
141  fgSizerFPID->Add( staticKeywordsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
142 
143  m_KeywordCtrl = new wxTextCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
144  fgSizerFPID->Add( m_KeywordCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
145 
146 
147  bSizerMidBasicPanel->Add( fgSizerFPID, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
148 
149 
150  bSizerBasicPanel->Add( bSizerMidBasicPanel, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
151 
152  wxBoxSizer* bSizerLowerBasicPanel;
153  bSizerLowerBasicPanel = new wxBoxSizer( wxHORIZONTAL );
154 
155  wxBoxSizer* bSizerLeftCol;
156  bSizerLeftCol = new wxBoxSizer( wxVERTICAL );
157 
158  wxStaticBoxSizer* sbSizerSymbol;
159  sbSizerSymbol = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Symbol") ), wxVERTICAL );
160 
161  m_AsConvertButt = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Has alternate symbol (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 );
162  m_AsConvertButt->SetToolTip( _("Check this option if the symbol has an alternate body style (De Morgan)") );
163 
164  sbSizerSymbol->Add( m_AsConvertButt, 0, wxRIGHT|wxLEFT, 5 );
165 
166  m_OptionPower = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Define as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
167  m_OptionPower->SetToolTip( _("Check this option when the symbol is a power symbol") );
168 
169  sbSizerSymbol->Add( m_OptionPower, 0, wxALL, 5 );
170 
171  wxBoxSizer* bSizerUnitCount;
172  bSizerUnitCount = new wxBoxSizer( wxHORIZONTAL );
173 
174  m_staticTextNbUnits = new wxStaticText( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Number of Units:"), wxDefaultPosition, wxDefaultSize, 0 );
175  m_staticTextNbUnits->Wrap( -1 );
176  m_staticTextNbUnits->SetToolTip( _("Enter the number of units for a symbol that contains more than one unit") );
177 
178  bSizerUnitCount->Add( m_staticTextNbUnits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
179 
180  m_SelNumberOfUnits = new wxSpinCtrl( sbSizerSymbol->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 26, 1 );
181  bSizerUnitCount->Add( m_SelNumberOfUnits, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
182 
183 
184  sbSizerSymbol->Add( bSizerUnitCount, 1, wxEXPAND, 5 );
185 
186  m_OptionPartsLocked = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("All units are not interchangeable"), wxDefaultPosition, wxDefaultSize, 0 );
187  m_OptionPartsLocked->SetToolTip( _("Check this option when creating multiple unit symbols and all units are not interchangeable") );
188 
189  sbSizerSymbol->Add( m_OptionPartsLocked, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
190 
191 
192  bSizerLeftCol->Add( sbSizerSymbol, 0, wxEXPAND|wxALL, 5 );
193 
194 
195  bSizerLowerBasicPanel->Add( bSizerLeftCol, 1, wxEXPAND, 5 );
196 
197  wxBoxSizer* bSizerRightCol;
198  bSizerRightCol = new wxBoxSizer( wxVERTICAL );
199 
200  wxStaticBoxSizer* sbSizerAnnotations;
201  sbSizerAnnotations = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Annotations") ), wxVERTICAL );
202 
203  m_ShowPinNumButt = new wxCheckBox( sbSizerAnnotations->GetStaticBox(), wxID_ANY, _("Show pin number"), wxDefaultPosition, wxDefaultSize, 0 );
204  m_ShowPinNumButt->SetValue(true);
205  m_ShowPinNumButt->SetToolTip( _("Show or hide pin numbers") );
206 
207  sbSizerAnnotations->Add( m_ShowPinNumButt, 0, wxRIGHT|wxLEFT, 5 );
208 
209  m_ShowPinNameButt = new wxCheckBox( sbSizerAnnotations->GetStaticBox(), wxID_ANY, _("Show pin name"), wxDefaultPosition, wxDefaultSize, 0 );
210  m_ShowPinNameButt->SetValue(true);
211  m_ShowPinNameButt->SetToolTip( _("Show or hide pin names") );
212 
213  sbSizerAnnotations->Add( m_ShowPinNameButt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
214 
215 
216  sbSizerAnnotations->Add( 0, 0, 1, wxEXPAND, 5 );
217 
218  m_PinsNameInsideButt = new wxCheckBox( sbSizerAnnotations->GetStaticBox(), wxID_ANY, _("Place pin names inside"), wxDefaultPosition, wxDefaultSize, 0 );
219  m_PinsNameInsideButt->SetValue(true);
220  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.") );
221 
222  sbSizerAnnotations->Add( m_PinsNameInsideButt, 0, wxALL, 5 );
223 
224  wxBoxSizer* bSizerNameOffset;
225  bSizerNameOffset = new wxBoxSizer( wxHORIZONTAL );
226 
227  m_nameOffsetLabel = new wxStaticText( sbSizerAnnotations->GetStaticBox(), wxID_ANY, _("Position offset:"), wxDefaultPosition, wxDefaultSize, 0 );
228  m_nameOffsetLabel->Wrap( -1 );
229  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.") );
230 
231  bSizerNameOffset->Add( m_nameOffsetLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 30 );
232 
233  m_nameOffsetCtrl = new wxTextCtrl( sbSizerAnnotations->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
234  bSizerNameOffset->Add( m_nameOffsetCtrl, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
235 
236  m_nameOffsetUnits = new wxStaticText( sbSizerAnnotations->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
237  m_nameOffsetUnits->Wrap( -1 );
238  bSizerNameOffset->Add( m_nameOffsetUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
239 
240 
241  sbSizerAnnotations->Add( bSizerNameOffset, 0, wxEXPAND, 5 );
242 
243 
244  sbSizerAnnotations->Add( 0, 0, 1, wxEXPAND, 5 );
245 
246 
247  bSizerRightCol->Add( sbSizerAnnotations, 1, wxEXPAND|wxALL, 5 );
248 
249 
250  bSizerLowerBasicPanel->Add( bSizerRightCol, 1, wxEXPAND, 5 );
251 
252 
253  bSizerBasicPanel->Add( bSizerLowerBasicPanel, 0, wxEXPAND, 5 );
254 
255 
256  m_PanelBasic->SetSizer( bSizerBasicPanel );
257  m_PanelBasic->Layout();
258  bSizerBasicPanel->Fit( m_PanelBasic );
259  m_NoteBook->AddPage( m_PanelBasic, _("General"), true );
260  m_PanelAlias = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
261  wxBoxSizer* bSizerMainPanelAlias;
262  bSizerMainPanelAlias = new wxBoxSizer( wxHORIZONTAL );
263 
264  wxBoxSizer* bLeftBoxSizerPanelAlias;
265  bLeftBoxSizerPanelAlias = new wxBoxSizer( wxVERTICAL );
266 
267  wxStaticText* staticAliasesLabel;
268  staticAliasesLabel = new wxStaticText( m_PanelAlias, wxID_ANY, _("Aliases:"), wxDefaultPosition, wxDefaultSize, 0 );
269  staticAliasesLabel->Wrap( -1 );
270  bLeftBoxSizerPanelAlias->Add( staticAliasesLabel, 0, wxRIGHT|wxLEFT, 5 );
271 
272  m_aliasListBox = new wxListBox( m_PanelAlias, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
273  bLeftBoxSizerPanelAlias->Add( m_aliasListBox, 1, wxEXPAND|wxLEFT, 5 );
274 
275  wxBoxSizer* bSizerButtons;
276  bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
277 
278  m_addAliasButton = new wxBitmapButton( m_PanelAlias, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
279  m_addAliasButton->SetMinSize( wxSize( 30,29 ) );
280 
281  bSizerButtons->Add( m_addAliasButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
282 
283  m_deleteAliasButton = new wxBitmapButton( m_PanelAlias, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
284  m_deleteAliasButton->SetMinSize( wxSize( 30,29 ) );
285 
286  bSizerButtons->Add( m_deleteAliasButton, 0, wxBOTTOM|wxRIGHT, 5 );
287 
288 
289  bLeftBoxSizerPanelAlias->Add( bSizerButtons, 0, wxEXPAND, 5 );
290 
291 
292  bSizerMainPanelAlias->Add( bLeftBoxSizerPanelAlias, 2, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
293 
294  wxBoxSizer* bRightBoxSizerPanelAlias;
295  bRightBoxSizerPanelAlias = new wxBoxSizer( wxVERTICAL );
296 
297  m_staticText12 = new wxStaticText( m_PanelAlias, wxID_ANY, _("Alias field substitutions:"), wxDefaultPosition, wxDefaultSize, 0 );
298  m_staticText12->Wrap( -1 );
299  bRightBoxSizerPanelAlias->Add( m_staticText12, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
300 
301  m_aliasGrid = new WX_GRID( m_PanelAlias, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER );
302 
303  // Grid
304  m_aliasGrid->CreateGrid( 4, 2 );
305  m_aliasGrid->EnableEditing( true );
306  m_aliasGrid->EnableGridLines( true );
307  m_aliasGrid->EnableDragGridSize( false );
308  m_aliasGrid->SetMargins( 0, 0 );
309 
310  // Columns
311  m_aliasGrid->SetColSize( 0, 72 );
312  m_aliasGrid->SetColSize( 1, 420 );
313  m_aliasGrid->EnableDragColMove( false );
314  m_aliasGrid->EnableDragColSize( true );
315  m_aliasGrid->SetColLabelSize( 22 );
316  m_aliasGrid->SetColLabelValue( 0, _("Name") );
317  m_aliasGrid->SetColLabelValue( 1, _("Value") );
318  m_aliasGrid->SetColLabelValue( 2, _("Show") );
319  m_aliasGrid->SetColLabelValue( 3, _("H Align") );
320  m_aliasGrid->SetColLabelValue( 4, _("V Align") );
321  m_aliasGrid->SetColLabelValue( 5, _("Italic") );
322  m_aliasGrid->SetColLabelValue( 6, _("Bold") );
323  m_aliasGrid->SetColLabelValue( 7, _("Text Size") );
324  m_aliasGrid->SetColLabelValue( 8, _("Orientation") );
325  m_aliasGrid->SetColLabelValue( 9, _("X Position") );
326  m_aliasGrid->SetColLabelValue( 10, _("Y Position") );
327  m_aliasGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
328 
329  // Rows
330  m_aliasGrid->EnableDragRowSize( true );
331  m_aliasGrid->SetRowLabelSize( 0 );
332  m_aliasGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
333 
334  // Label Appearance
335 
336  // Cell Defaults
337  m_aliasGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
338  bRightBoxSizerPanelAlias->Add( m_aliasGrid, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
339 
340 
341  bRightBoxSizerPanelAlias->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
342 
343  wxFlexGridSizer* fgSizerFPID1;
344  fgSizerFPID1 = new wxFlexGridSizer( 6, 1, 0, 0 );
345  fgSizerFPID1->AddGrowableCol( 0 );
346  fgSizerFPID1->SetFlexibleDirection( wxBOTH );
347  fgSizerFPID1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
348 
349  wxStaticText* staticAliasNameLabel;
350  staticAliasNameLabel = new wxStaticText( m_PanelAlias, wxID_ANY, _("Alias name:"), wxDefaultPosition, wxDefaultSize, 0 );
351  staticAliasNameLabel->Wrap( -1 );
352  fgSizerFPID1->Add( staticAliasNameLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
353 
354  m_AliasNameCtrl = new wxTextCtrl( m_PanelAlias, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
355  fgSizerFPID1->Add( m_AliasNameCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
356 
357  wxStaticText* staticAliasDescLabel;
358  staticAliasDescLabel = new wxStaticText( m_PanelAlias, wxID_ANY, _("Alias description:"), wxDefaultPosition, wxDefaultSize, 0 );
359  staticAliasDescLabel->Wrap( -1 );
360  fgSizerFPID1->Add( staticAliasDescLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
361 
362  m_AliasDescCtrl = new wxTextCtrl( m_PanelAlias, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
363  fgSizerFPID1->Add( m_AliasDescCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
364 
365  staticAliasKeywordsLabel = new wxStaticText( m_PanelAlias, wxID_ANY, _("Alias keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
366  staticAliasKeywordsLabel->Wrap( -1 );
367  fgSizerFPID1->Add( staticAliasKeywordsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
368 
369  m_AliasKeywordsCtrl = new wxTextCtrl( m_PanelAlias, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
370  fgSizerFPID1->Add( m_AliasKeywordsCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
371 
372 
373  bRightBoxSizerPanelAlias->Add( fgSizerFPID1, 1, wxEXPAND, 5 );
374 
375 
376  bSizerMainPanelAlias->Add( bRightBoxSizerPanelAlias, 7, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT, 20 );
377 
378 
379  m_PanelAlias->SetSizer( bSizerMainPanelAlias );
380  m_PanelAlias->Layout();
381  bSizerMainPanelAlias->Fit( m_PanelAlias );
382  m_NoteBook->AddPage( m_PanelAlias, _("Aliases"), false );
383  m_PanelFootprintFilter = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
384  wxBoxSizer* bPanelFpFilterBoxSizer;
385  bPanelFpFilterBoxSizer = new wxBoxSizer( wxHORIZONTAL );
386 
387  wxBoxSizer* bFpFilterLeftBoxSizer;
388  bFpFilterLeftBoxSizer = new wxBoxSizer( wxVERTICAL );
389 
390  m_staticTextFootprints = new wxStaticText( m_PanelFootprintFilter, wxID_ANY, _("Footprint filters:"), wxDefaultPosition, wxDefaultSize, 0 );
391  m_staticTextFootprints->Wrap( -1 );
392  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.") );
393 
394  bFpFilterLeftBoxSizer->Add( m_staticTextFootprints, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
395 
396  m_FootprintFilterListBox = new wxListBox( m_PanelFootprintFilter, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
397  bFpFilterLeftBoxSizer->Add( m_FootprintFilterListBox, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
398 
399  wxBoxSizer* bFpFilterRightBoxSizer;
400  bFpFilterRightBoxSizer = new wxBoxSizer( wxHORIZONTAL );
401 
402  m_addFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
403  bFpFilterRightBoxSizer->Add( m_addFilterButton, 0, wxBOTTOM|wxLEFT, 5 );
404 
405  m_editFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
406  bFpFilterRightBoxSizer->Add( m_editFilterButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
407 
408 
409  bFpFilterRightBoxSizer->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
410 
411  m_deleteFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), wxBU_AUTODRAW );
412  bFpFilterRightBoxSizer->Add( m_deleteFilterButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
413 
414 
415  bFpFilterLeftBoxSizer->Add( bFpFilterRightBoxSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
416 
417 
418  bPanelFpFilterBoxSizer->Add( bFpFilterLeftBoxSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
419 
420 
421  m_PanelFootprintFilter->SetSizer( bPanelFpFilterBoxSizer );
422  m_PanelFootprintFilter->Layout();
423  bPanelFpFilterBoxSizer->Fit( m_PanelFootprintFilter );
424  m_NoteBook->AddPage( m_PanelFootprintFilter, _("Footprint Filters"), false );
425 
426  bUpperSizer->Add( m_NoteBook, 1, wxEXPAND, 5 );
427 
428 
429  bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
430 
431  m_stdSizerButton = new wxStdDialogButtonSizer();
432  m_stdSizerButtonOK = new wxButton( this, wxID_OK );
433  m_stdSizerButton->AddButton( m_stdSizerButtonOK );
434  m_stdSizerButtonCancel = new wxButton( this, wxID_CANCEL );
436  m_stdSizerButton->Realize();
437 
438  bMainSizer->Add( m_stdSizerButton, 0, wxEXPAND|wxALL, 5 );
439 
440 
441  this->SetSizer( bMainSizer );
442  this->Layout();
443  bMainSizer->Fit( this );
444 
445  // Connect Events
446  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnUpdateUI ) );
447  m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSizeGrid ), NULL, this );
448  m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddField ), NULL, this );
449  m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteField ), NULL, this );
450  m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveUp ), NULL, this );
451  m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveDown ), NULL, this );
452  m_aliasListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSelectAlias ), NULL, this );
453  m_addAliasButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddAlias ), NULL, this );
454  m_deleteAliasButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteAlias ), NULL, this );
455  m_aliasGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSizeAliasGrid ), NULL, this );
456  m_AliasNameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAliasNameKillFocus ), NULL, this );
457  m_AliasNameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAliasNameText ), NULL, this );
458  m_addFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddFootprintFilter ), NULL, this );
459  m_editFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditFootprintFilter ), NULL, this );
460  m_deleteFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteFootprintFilter ), NULL, this );
461 }
462 
464 {
465  // Disconnect Events
466  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnUpdateUI ) );
467  m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSizeGrid ), NULL, this );
468  m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddField ), NULL, this );
469  m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteField ), NULL, this );
470  m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveUp ), NULL, this );
471  m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnMoveDown ), NULL, this );
472  m_aliasListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSelectAlias ), NULL, this );
473  m_addAliasButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddAlias ), NULL, this );
474  m_deleteAliasButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteAlias ), NULL, this );
475  m_aliasGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnSizeAliasGrid ), NULL, this );
476  m_AliasNameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAliasNameKillFocus ), NULL, this );
477  m_AliasNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAliasNameText ), NULL, this );
478  m_addFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnAddFootprintFilter ), NULL, this );
479  m_editFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnEditFootprintFilter ), NULL, this );
480  m_deleteFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::OnDeleteFootprintFilter ), NULL, this );
481 
482 }
virtual void OnAddField(wxCommandEvent &event)
virtual void OnAliasNameKillFocus(wxFocusEvent &event)
virtual void OnDeleteField(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:53
virtual void OnSelectAlias(wxCommandEvent &event)
virtual void OnDeleteFootprintFilter(wxCommandEvent &event)
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 OnAliasNameText(wxCommandEvent &event)
virtual void OnDeleteAlias(wxCommandEvent &event)
virtual void OnEditFootprintFilter(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnAddFootprintFilter(wxCommandEvent &event)