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