KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_lib_symbol_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16{
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18
19 wxBoxSizer* bMainSizer;
20 bMainSizer = new wxBoxSizer( wxVERTICAL );
21
22 wxBoxSizer* bUpperSizer;
23 bUpperSizer = new wxBoxSizer( wxVERTICAL );
24
25 m_NoteBook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0|wxTAB_TRAVERSAL );
26 m_PanelBasic = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
27 wxBoxSizer* bSizerBasicPanel;
28 bSizerBasicPanel = new wxBoxSizer( wxVERTICAL );
29
30 wxStaticBoxSizer* sbSizer4;
31 sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Fields") ), wxVERTICAL );
32
33 m_grid = new WX_GRID( sbSizer4->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
34
35 // Grid
36 m_grid->CreateGrid( 4, 13 );
37 m_grid->EnableEditing( true );
38 m_grid->EnableGridLines( true );
39 m_grid->EnableDragGridSize( false );
40 m_grid->SetMargins( 0, 0 );
41
42 // Columns
43 m_grid->SetColSize( 0, 72 );
44 m_grid->SetColSize( 1, 15 );
45 m_grid->SetColSize( 2, 48 );
46 m_grid->SetColSize( 3, 84 );
47 m_grid->SetColSize( 4, 60 );
48 m_grid->SetColSize( 5, 60 );
49 m_grid->SetColSize( 6, 48 );
50 m_grid->SetColSize( 7, 48 );
51 m_grid->SetColSize( 8, 80 );
52 m_grid->SetColSize( 9, 84 );
53 m_grid->SetColSize( 10, 84 );
54 m_grid->SetColSize( 11, 84 );
55 m_grid->SetColSize( 12, 100 );
56 m_grid->EnableDragColMove( false );
57 m_grid->EnableDragColSize( true );
58 m_grid->SetColLabelValue( 0, _("Name") );
59 m_grid->SetColLabelValue( 1, _("Value") );
60 m_grid->SetColLabelValue( 2, _("Show") );
61 m_grid->SetColLabelValue( 3, _("Show Name") );
62 m_grid->SetColLabelValue( 4, _("H Align") );
63 m_grid->SetColLabelValue( 5, _("V Align") );
64 m_grid->SetColLabelValue( 6, _("Italic") );
65 m_grid->SetColLabelValue( 7, _("Bold") );
66 m_grid->SetColLabelValue( 8, _("Text Size") );
67 m_grid->SetColLabelValue( 9, _("Orientation") );
68 m_grid->SetColLabelValue( 10, _("X Position") );
69 m_grid->SetColLabelValue( 11, _("Y Position") );
70 m_grid->SetColLabelValue( 12, _("Font") );
71 m_grid->SetColLabelSize( 22 );
72 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
73
74 // Rows
75 m_grid->EnableDragRowSize( true );
76 m_grid->SetRowLabelSize( 0 );
77 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
78
79 // Label Appearance
80
81 // Cell Defaults
82 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
83 m_grid->SetMinSize( wxSize( -1,160 ) );
84
85 sbSizer4->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
86
87 bButtonSize = new wxBoxSizer( wxHORIZONTAL );
88
89 m_bpAdd = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
90 m_bpAdd->SetToolTip( _("Add field") );
91
92 bButtonSize->Add( m_bpAdd, 0, wxRIGHT|wxLEFT, 5 );
93
94 m_bpMoveUp = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
95 m_bpMoveUp->SetToolTip( _("Move up") );
96
97 bButtonSize->Add( m_bpMoveUp, 0, wxRIGHT, 5 );
98
99 m_bpMoveDown = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
100 m_bpMoveDown->SetToolTip( _("Move down") );
101
102 bButtonSize->Add( m_bpMoveDown, 0, wxRIGHT, 5 );
103
104
105 bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 );
106
107 m_bpDelete = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
108 m_bpDelete->SetToolTip( _("Delete field") );
109
110 bButtonSize->Add( m_bpDelete, 0, wxRIGHT|wxLEFT, 10 );
111
112
113 sbSizer4->Add( bButtonSize, 0, 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, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 8 );
131
132 m_SymbolNameCtrl = new wxTextCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
133 fgSizerFPID->Add( m_SymbolNameCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 8 );
134
135 staticKeywordsLabel = new wxStaticText( m_PanelBasic, wxID_ANY, _("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
136 staticKeywordsLabel->Wrap( -1 );
137 fgSizerFPID->Add( staticKeywordsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 8 );
138
139 m_KeywordCtrl = new wxTextCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
140 fgSizerFPID->Add( m_KeywordCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 8 );
141
142 m_inheritsStaticText = new wxStaticText( m_PanelBasic, wxID_ANY, _("Derive from symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
143 m_inheritsStaticText->Wrap( -1 );
144 fgSizerFPID->Add( m_inheritsStaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 8 );
145
146 m_inheritanceSelectCombo = new wxComboBox( m_PanelBasic, wxID_ANY, _("<None>"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
147 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.") );
148
149 fgSizerFPID->Add( m_inheritanceSelectCombo, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 7 );
150
151
152 bSizerMidBasicPanel->Add( fgSizerFPID, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
153
154
155 bSizerBasicPanel->Add( bSizerMidBasicPanel, 0, wxEXPAND, 5 );
156
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, _("General") ), wxVERTICAL );
164
165 m_OptionPower = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Define as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
166 m_OptionPower->SetToolTip( _("Power symbols define a global net with the value as a netname.\nThey will not be included in the BOM and cannot be assigned a footprint.") );
167
168 sbSizerSymbol->Add( m_OptionPower, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
169
170 wxBoxSizer* bSizer16;
171 bSizer16 = new wxBoxSizer( wxHORIZONTAL );
172
173
174 bSizer16->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
175
176 m_OptionLocalPower = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Define as local power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
177 m_OptionLocalPower->SetToolTip( _("Local power symbols create labels that are limited to the sheet in which they are used") );
178
179 bSizer16->Add( m_OptionLocalPower, 0, wxBOTTOM|wxLEFT|wxRIGHT, 4 );
180
181
182 sbSizerSymbol->Add( bSizer16, 1, wxEXPAND, 5 );
183
184
185 bSizerLeftCol->Add( sbSizerSymbol, 1, wxEXPAND|wxALL, 5 );
186
187
188 bSizerLowerBasicPanel->Add( bSizerLeftCol, 1, wxEXPAND, 5 );
189
190 wxBoxSizer* bSizerMiddleCol;
191 bSizerMiddleCol = new wxBoxSizer( wxVERTICAL );
192
193 wxStaticBoxSizer* sbSizerPinTextOpts;
194 sbSizerPinTextOpts = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Pin Text Options") ), wxVERTICAL );
195
196 m_ShowPinNumButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Show pin number"), wxDefaultPosition, wxDefaultSize, 0 );
197 m_ShowPinNumButt->SetValue(true);
198 m_ShowPinNumButt->SetToolTip( _("Show or hide pin numbers") );
199
200 sbSizerPinTextOpts->Add( m_ShowPinNumButt, 0, wxRIGHT, 5 );
201
202 m_ShowPinNameButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Show pin name"), wxDefaultPosition, wxDefaultSize, 0 );
203 m_ShowPinNameButt->SetValue(true);
204 m_ShowPinNameButt->SetToolTip( _("Show or hide pin names") );
205
206 sbSizerPinTextOpts->Add( m_ShowPinNameButt, 0, wxRIGHT|wxTOP, 5 );
207
208
209 sbSizerPinTextOpts->Add( 0, 12, 0, wxEXPAND, 5 );
210
211 m_PinsNameInsideButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Place pin names inside"), wxDefaultPosition, wxDefaultSize, 0 );
212 m_PinsNameInsideButt->SetValue(true);
213 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.") );
214
215 sbSizerPinTextOpts->Add( m_PinsNameInsideButt, 0, wxRIGHT|wxTOP, 5 );
216
217 wxBoxSizer* bSizerNameOffset;
218 bSizerNameOffset = new wxBoxSizer( wxHORIZONTAL );
219
220 m_nameOffsetLabel = new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Position offset:"), wxDefaultPosition, wxDefaultSize, 0 );
221 m_nameOffsetLabel->Wrap( -1 );
222 m_nameOffsetLabel->SetToolTip( _("Margin between the pin name position and the symbol body.") );
223
224 bSizerNameOffset->Add( m_nameOffsetLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 20 );
225
226 m_nameOffsetCtrl = new wxTextCtrl( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
227 bSizerNameOffset->Add( m_nameOffsetCtrl, 0, wxLEFT|wxRIGHT, 5 );
228
229 m_nameOffsetUnits = new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
230 m_nameOffsetUnits->Wrap( -1 );
231 bSizerNameOffset->Add( m_nameOffsetUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
232
233
234 sbSizerPinTextOpts->Add( bSizerNameOffset, 0, wxBOTTOM|wxEXPAND|wxTOP, 3 );
235
236
237 bSizerMiddleCol->Add( sbSizerPinTextOpts, 1, wxALL|wxEXPAND, 5 );
238
239
240 bSizerLowerBasicPanel->Add( bSizerMiddleCol, 1, wxEXPAND, 5 );
241
242 wxBoxSizer* bSizerRightCol;
243 bSizerRightCol = new wxBoxSizer( wxVERTICAL );
244
245 wxStaticBoxSizer* sbSizerAttributes;
246 sbSizerAttributes = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Attributes") ), wxVERTICAL );
247
248 m_excludeFromSimCheckBox = new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY, _("Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
249 sbSizerAttributes->Add( m_excludeFromSimCheckBox, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
250
251
252 sbSizerAttributes->Add( 0, 10, 0, wxEXPAND, 5 );
253
254 m_excludeFromBoardCheckBox = new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY, _("Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
255 sbSizerAttributes->Add( m_excludeFromBoardCheckBox, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
256
257 m_excludeFromBomCheckBox = new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY, _("Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
258 sbSizerAttributes->Add( m_excludeFromBomCheckBox, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
259
260 m_excludeFromPosFilesCheckBox = new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY, _("Exclude from position files"), wxDefaultPosition, wxDefaultSize, 0 );
261 sbSizerAttributes->Add( m_excludeFromPosFilesCheckBox, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
262
263
264 bSizerRightCol->Add( sbSizerAttributes, 1, wxEXPAND|wxALL, 5 );
265
266
267 bSizerLowerBasicPanel->Add( bSizerRightCol, 1, wxEXPAND, 5 );
268
269
270 bSizerBasicPanel->Add( bSizerLowerBasicPanel, 0, wxEXPAND, 5 );
271
272
273 m_PanelBasic->SetSizer( bSizerBasicPanel );
274 m_PanelBasic->Layout();
275 bSizerBasicPanel->Fit( m_PanelBasic );
276 m_NoteBook->AddPage( m_PanelBasic, _("General"), true );
277 m_PanelUnitsAndBodyStyles = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
278 wxBoxSizer* bSizerUnitsAndBodyStyles;
279 bSizerUnitsAndBodyStyles = new wxBoxSizer( wxHORIZONTAL );
280
281 wxStaticBoxSizer* sbSizerUnits;
282 sbSizerUnits = new wxStaticBoxSizer( new wxStaticBox( m_PanelUnitsAndBodyStyles, wxID_ANY, _("Symbol Units") ), wxVERTICAL );
283
284 wxBoxSizer* bSizerUnitCount;
285 bSizerUnitCount = new wxBoxSizer( wxHORIZONTAL );
286
287 m_staticTextNbUnits = new wxStaticText( sbSizerUnits->GetStaticBox(), wxID_ANY, _("Number of units:"), wxDefaultPosition, wxDefaultSize, 0 );
288 m_staticTextNbUnits->Wrap( -1 );
289 m_staticTextNbUnits->SetToolTip( _("Enter the number of units for a symbol that contains more than one unit") );
290
291 bSizerUnitCount->Add( m_staticTextNbUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
292
293 m_unitSpinCtrl = new wxSpinCtrl( sbSizerUnits->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 64, 1 );
294 bSizerUnitCount->Add( m_unitSpinCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
295
296
297 sbSizerUnits->Add( bSizerUnitCount, 0, wxEXPAND|wxBOTTOM|wxLEFT, 4 );
298
299
300 sbSizerUnits->Add( 0, 2, 0, wxEXPAND, 5 );
301
302 m_OptionPartsInterchangeable = new wxCheckBox( sbSizerUnits->GetStaticBox(), wxID_ANY, _("All units are interchangeable"), wxDefaultPosition, wxDefaultSize, 0 );
303 m_OptionPartsInterchangeable->SetToolTip( _("Check this option when all symbol units have the same function.\nFor instance, this should be checked for a quad NAND gate, while it should not be checked for a dual triode (where unit C is the filament).") );
304
305 sbSizerUnits->Add( m_OptionPartsInterchangeable, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
306
307
308 sbSizerUnits->Add( 0, 15, 0, wxEXPAND, 5 );
309
310 m_unitNamesLabel = new wxStaticText( sbSizerUnits->GetStaticBox(), wxID_ANY, _("Unit display names (optional):"), wxDefaultPosition, wxDefaultSize, 0 );
311 m_unitNamesLabel->Wrap( -1 );
312 sbSizerUnits->Add( m_unitNamesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
313
314 m_unitNamesGrid = new WX_GRID( sbSizerUnits->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
315
316 // Grid
317 m_unitNamesGrid->CreateGrid( 0, 2 );
318 m_unitNamesGrid->EnableEditing( true );
319 m_unitNamesGrid->EnableGridLines( true );
320 m_unitNamesGrid->EnableDragGridSize( false );
321 m_unitNamesGrid->SetMargins( 0, 0 );
322
323 // Columns
324 m_unitNamesGrid->SetColSize( 0, 36 );
325 m_unitNamesGrid->SetColSize( 1, 300 );
326 m_unitNamesGrid->EnableDragColMove( false );
327 m_unitNamesGrid->EnableDragColSize( false );
328 m_unitNamesGrid->SetColLabelSize( 0 );
329 m_unitNamesGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
330
331 // Rows
332 m_unitNamesGrid->EnableDragRowSize( false );
333 m_unitNamesGrid->SetRowLabelSize( 0 );
334 m_unitNamesGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
335
336 // Label Appearance
337
338 // Cell Defaults
339 m_unitNamesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
340 sbSizerUnits->Add( m_unitNamesGrid, 1, wxALL|wxEXPAND, 5 );
341
342
343 bSizerUnitsAndBodyStyles->Add( sbSizerUnits, 1, wxEXPAND|wxALL, 10 );
344
345 wxStaticBoxSizer* sbSizerBodyStyles;
346 sbSizerBodyStyles = new wxStaticBoxSizer( new wxStaticBox( m_PanelUnitsAndBodyStyles, wxID_ANY, _("Body Styles") ), wxVERTICAL );
347
348 m_radioSingle = new wxRadioButton( sbSizerBodyStyles->GetStaticBox(), wxID_ANY, _("Single body style"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
349 sbSizerBodyStyles->Add( m_radioSingle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
350
351
352 sbSizerBodyStyles->Add( 0, 3, 0, wxEXPAND, 5 );
353
354 m_radioDeMorgan = new wxRadioButton( sbSizerBodyStyles->GetStaticBox(), wxID_ANY, _("‘Standard’ and ‘Alternate’ De Morgan body styles"), wxDefaultPosition, wxDefaultSize, 0 );
355 sbSizerBodyStyles->Add( m_radioDeMorgan, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
356
357
358 sbSizerBodyStyles->Add( 0, 3, 0, wxEXPAND, 5 );
359
360 m_radioCustom = new wxRadioButton( sbSizerBodyStyles->GetStaticBox(), wxID_ANY, _("Custom body styles:"), wxDefaultPosition, wxDefaultSize, 0 );
361 sbSizerBodyStyles->Add( m_radioCustom, 0, wxALL, 5 );
362
363 wxBoxSizer* bSizerIndent;
364 bSizerIndent = new wxBoxSizer( wxVERTICAL );
365
366 m_bodyStyleNamesGrid = new WX_GRID( sbSizerBodyStyles->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
367
368 // Grid
369 m_bodyStyleNamesGrid->CreateGrid( 0, 1 );
370 m_bodyStyleNamesGrid->EnableEditing( true );
371 m_bodyStyleNamesGrid->EnableGridLines( true );
372 m_bodyStyleNamesGrid->EnableDragGridSize( false );
373 m_bodyStyleNamesGrid->SetMargins( 0, 0 );
374
375 // Columns
376 m_bodyStyleNamesGrid->SetColSize( 0, 320 );
377 m_bodyStyleNamesGrid->EnableDragColMove( false );
378 m_bodyStyleNamesGrid->EnableDragColSize( false );
379 m_bodyStyleNamesGrid->SetColLabelSize( 0 );
380 m_bodyStyleNamesGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
381
382 // Rows
383 m_bodyStyleNamesGrid->EnableDragRowSize( false );
384 m_bodyStyleNamesGrid->SetRowLabelSize( 0 );
385 m_bodyStyleNamesGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
386
387 // Label Appearance
388
389 // Cell Defaults
390 m_bodyStyleNamesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
391 bSizerIndent->Add( m_bodyStyleNamesGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
392
393 bButtonSize1 = new wxBoxSizer( wxHORIZONTAL );
394
395 m_bpAddBodyStyle = new STD_BITMAP_BUTTON( sbSizerBodyStyles->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
396 m_bpAddBodyStyle->SetToolTip( _("Add field") );
397
398 bButtonSize1->Add( m_bpAddBodyStyle, 0, wxRIGHT, 5 );
399
400 m_bpMoveUpBodyStyle = new STD_BITMAP_BUTTON( sbSizerBodyStyles->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
401 m_bpMoveUpBodyStyle->SetToolTip( _("Move up") );
402
403 bButtonSize1->Add( m_bpMoveUpBodyStyle, 0, wxRIGHT, 5 );
404
405 m_bpMoveDownBodyStyle = new STD_BITMAP_BUTTON( sbSizerBodyStyles->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
406 m_bpMoveDownBodyStyle->SetToolTip( _("Move down") );
407
408 bButtonSize1->Add( m_bpMoveDownBodyStyle, 0, wxRIGHT, 5 );
409
410
411 bButtonSize1->Add( 20, 0, 0, wxEXPAND, 5 );
412
413 m_bpDeleteBodyStyle = new STD_BITMAP_BUTTON( sbSizerBodyStyles->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
414 m_bpDeleteBodyStyle->SetToolTip( _("Delete field") );
415
416 bButtonSize1->Add( m_bpDeleteBodyStyle, 0, wxRIGHT|wxLEFT, 10 );
417
418
419 bSizerIndent->Add( bButtonSize1, 0, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
420
421
422 sbSizerBodyStyles->Add( bSizerIndent, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
423
424
425 bSizerUnitsAndBodyStyles->Add( sbSizerBodyStyles, 1, wxEXPAND|wxALL, 10 );
426
427
428 m_PanelUnitsAndBodyStyles->SetSizer( bSizerUnitsAndBodyStyles );
430 bSizerUnitsAndBodyStyles->Fit( m_PanelUnitsAndBodyStyles );
431 m_NoteBook->AddPage( m_PanelUnitsAndBodyStyles, _("Units && Body Styles"), false );
432 m_PanelPinConnections = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
433 wxBoxSizer* bSizerPinConnections;
434 bSizerPinConnections = new wxBoxSizer( wxVERTICAL );
435
436 wxBoxSizer* bMargins;
437 bMargins = new wxBoxSizer( wxVERTICAL );
438
439 m_cbDuplicatePinsAreJumpers = new wxCheckBox( m_PanelPinConnections, wxID_ANY, _("All pins with duplicate numbers are jumpers"), wxDefaultPosition, wxDefaultSize, 0 );
440 m_cbDuplicatePinsAreJumpers->SetToolTip( _("When enabled, this symbol can have more than one pin with the same number. Pins with the same number will be considered to be jumpered together internally.") );
441
442 bMargins->Add( m_cbDuplicatePinsAreJumpers, 0, wxLEFT, 5 );
443
444
445 bMargins->Add( 0, 5, 0, wxEXPAND, 5 );
446
447 m_jumperGroupsLabel = new wxStaticText( m_PanelPinConnections, wxID_ANY, _("Explicit jumper pin groups:"), wxDefaultPosition, wxDefaultSize, 0 );
448 m_jumperGroupsLabel->Wrap( -1 );
449 bMargins->Add( m_jumperGroupsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
450
451 m_jumperGroupsGrid = new WX_GRID( m_PanelPinConnections, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
452
453 // Grid
454 m_jumperGroupsGrid->CreateGrid( 0, 1 );
455 m_jumperGroupsGrid->EnableEditing( true );
456 m_jumperGroupsGrid->EnableGridLines( true );
457 m_jumperGroupsGrid->EnableDragGridSize( false );
458 m_jumperGroupsGrid->SetMargins( 0, 0 );
459
460 // Columns
461 m_jumperGroupsGrid->SetColSize( 0, 320 );
462 m_jumperGroupsGrid->EnableDragColMove( false );
463 m_jumperGroupsGrid->EnableDragColSize( true );
464 m_jumperGroupsGrid->SetColLabelSize( 0 );
465 m_jumperGroupsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
466
467 // Rows
468 m_jumperGroupsGrid->EnableDragRowSize( true );
469 m_jumperGroupsGrid->SetRowLabelSize( 0 );
470 m_jumperGroupsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
471
472 // Label Appearance
473
474 // Cell Defaults
475 m_jumperGroupsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
476 m_jumperGroupsGrid->SetMinSize( wxSize( -1,30 ) );
477
478 bMargins->Add( m_jumperGroupsGrid, 1, wxEXPAND|wxALL, 2 );
479
480 wxBoxSizer* bButtonSize21;
481 bButtonSize21 = new wxBoxSizer( wxHORIZONTAL );
482
483 m_bpAddJumperGroup = new STD_BITMAP_BUTTON( m_PanelPinConnections, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
484 bButtonSize21->Add( m_bpAddJumperGroup, 0, wxBOTTOM|wxRIGHT, 5 );
485
486
487 bButtonSize21->Add( 20, 0, 0, wxEXPAND, 5 );
488
489 m_bpRemoveJumperGroup = new STD_BITMAP_BUTTON( m_PanelPinConnections, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
490 bButtonSize21->Add( m_bpRemoveJumperGroup, 0, wxBOTTOM|wxRIGHT, 5 );
491
492
493 bMargins->Add( bButtonSize21, 0, wxEXPAND|wxTOP, 5 );
494
495
496 bSizerPinConnections->Add( bMargins, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
497
498
499 m_PanelPinConnections->SetSizer( bSizerPinConnections );
500 m_PanelPinConnections->Layout();
501 bSizerPinConnections->Fit( m_PanelPinConnections );
502 m_NoteBook->AddPage( m_PanelPinConnections, _("Pin Connections"), false );
503 m_pinMapPage = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
504 bPinMapPageSizer = new wxBoxSizer( wxVERTICAL );
505
506
507 m_pinMapPage->SetSizer( bPinMapPageSizer );
508 m_pinMapPage->Layout();
510 m_NoteBook->AddPage( m_pinMapPage, _("Pin Map"), false );
511
512 bUpperSizer->Add( m_NoteBook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
513
514
515 bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxBOTTOM, 5 );
516
517 wxBoxSizer* bSizer101;
518 bSizer101 = new wxBoxSizer( wxHORIZONTAL );
519
520
521 bSizer101->Add( 0, 0, 1, wxEXPAND, 5 );
522
523 m_spiceFieldsButton = new wxButton( this, wxID_ANY, _("Edit Simulation Model..."), wxDefaultPosition, wxDefaultSize, 0 );
524 bSizer101->Add( m_spiceFieldsButton, 0, wxEXPAND|wxALL, 5 );
525
526
527 bSizer101->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
528
529 m_stdSizerButton = new wxStdDialogButtonSizer();
530 m_stdSizerButtonOK = new wxButton( this, wxID_OK );
532 m_stdSizerButtonCancel = new wxButton( this, wxID_CANCEL );
534 m_stdSizerButton->Realize();
535
536 bSizer101->Add( m_stdSizerButton, 0, wxEXPAND|wxALL, 5 );
537
538
539 bMainSizer->Add( bSizer101, 0, wxEXPAND, 5 );
540
541
542 this->SetSizer( bMainSizer );
543 this->Layout();
544 bMainSizer->Fit( this );
545
546 // Connect Events
547 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUpdateUI ) );
548 m_NoteBook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnPageChanging ), NULL, this );
549 m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAddField ), NULL, this );
550 m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnMoveUp ), NULL, this );
551 m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnMoveDown ), NULL, this );
552 m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnDeleteField ), NULL, this );
553 m_SymbolNameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnSymbolNameKillFocus ), NULL, this );
554 m_SymbolNameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnSymbolNameText ), NULL, this );
555 m_KeywordCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnText ), NULL, this );
556 m_inheritanceSelectCombo->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCombobox ), NULL, this );
557 m_inheritanceSelectCombo->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnText ), NULL, this );
558 m_OptionPower->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::onPowerCheckBox ), NULL, this );
559 m_OptionLocalPower->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::onPowerCheckBox ), NULL, this );
560 m_ShowPinNumButt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
561 m_ShowPinNameButt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
562 m_PinsNameInsideButt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
563 m_nameOffsetCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnText ), NULL, this );
564 m_excludeFromSimCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
565 m_excludeFromBoardCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
566 m_excludeFromBomCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
567 m_excludeFromPosFilesCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
568 m_unitSpinCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUnitSpinCtrlKillFocus ), NULL, this );
569 m_unitSpinCtrl->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUnitSpinCtrl ), NULL, this );
570 m_unitSpinCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUnitSpinCtrlText ), NULL, this );
571 m_unitSpinCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUnitSpinCtrlEnter ), NULL, this );
572 m_OptionPartsInterchangeable->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
573 m_radioSingle->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyle ), NULL, this );
574 m_radioDeMorgan->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyle ), NULL, this );
575 m_radioCustom->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyle ), NULL, this );
576 m_bpAddBodyStyle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAddBodyStyle ), NULL, this );
577 m_bpMoveUpBodyStyle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyleMoveUp ), NULL, this );
578 m_bpMoveDownBodyStyle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyleMoveDown ), NULL, this );
579 m_bpDeleteBodyStyle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnDeleteBodyStyle ), NULL, this );
580 m_bpAddJumperGroup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAddJumperGroup ), NULL, this );
581 m_bpRemoveJumperGroup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnRemoveJumperGroup ), NULL, this );
582 m_spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnEditSpiceModel ), NULL, this );
583 m_stdSizerButtonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
584}
585
587{
588 // Disconnect Events
589 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUpdateUI ) );
590 m_NoteBook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnPageChanging ), NULL, this );
591 m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAddField ), NULL, this );
592 m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnMoveUp ), NULL, this );
593 m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnMoveDown ), NULL, this );
594 m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnDeleteField ), NULL, this );
595 m_SymbolNameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnSymbolNameKillFocus ), NULL, this );
596 m_SymbolNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnSymbolNameText ), NULL, this );
597 m_KeywordCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnText ), NULL, this );
598 m_inheritanceSelectCombo->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCombobox ), NULL, this );
599 m_inheritanceSelectCombo->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnText ), NULL, this );
600 m_OptionPower->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::onPowerCheckBox ), NULL, this );
601 m_OptionLocalPower->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::onPowerCheckBox ), NULL, this );
602 m_ShowPinNumButt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
603 m_ShowPinNameButt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
604 m_PinsNameInsideButt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
605 m_nameOffsetCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnText ), NULL, this );
606 m_excludeFromSimCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
607 m_excludeFromBoardCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
608 m_excludeFromBomCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
609 m_excludeFromPosFilesCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
610 m_unitSpinCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUnitSpinCtrlKillFocus ), NULL, this );
611 m_unitSpinCtrl->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUnitSpinCtrl ), NULL, this );
612 m_unitSpinCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUnitSpinCtrlText ), NULL, this );
613 m_unitSpinCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnUnitSpinCtrlEnter ), NULL, this );
614 m_OptionPartsInterchangeable->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
615 m_radioSingle->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyle ), NULL, this );
616 m_radioDeMorgan->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyle ), NULL, this );
617 m_radioCustom->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyle ), NULL, this );
618 m_bpAddBodyStyle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAddBodyStyle ), NULL, this );
619 m_bpMoveUpBodyStyle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyleMoveUp ), NULL, this );
620 m_bpMoveDownBodyStyle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBodyStyleMoveDown ), NULL, this );
621 m_bpDeleteBodyStyle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnDeleteBodyStyle ), NULL, this );
622 m_bpAddJumperGroup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAddJumperGroup ), NULL, this );
623 m_bpRemoveJumperGroup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnRemoveJumperGroup ), NULL, this );
624 m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnEditSpiceModel ), NULL, this );
625 m_stdSizerButtonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
626
627}
628
629PANEL_FOOTPRINT_FILTERS_BASE::PANEL_FOOTPRINT_FILTERS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
630{
631 wxBoxSizer* bSizerFPFilters;
632 bSizerFPFilters = new wxBoxSizer( wxHORIZONTAL );
633
634 wxBoxSizer* bFPFiltersMargins;
635 bFPFiltersMargins = new wxBoxSizer( wxVERTICAL );
636
637 m_staticTextFootprints = new wxStaticText( this, wxID_ANY, _("Footprint filters:"), wxDefaultPosition, wxDefaultSize, 0 );
638 m_staticTextFootprints->Wrap( -1 );
639 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.") );
640
641 bFPFiltersMargins->Add( m_staticTextFootprints, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
642
643 m_FootprintFilterListBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_MULTIPLE );
644 bFPFiltersMargins->Add( m_FootprintFilterListBox, 1, wxEXPAND, 5 );
645
646 wxBoxSizer* bFpFilterRightBoxSizer;
647 bFpFilterRightBoxSizer = new wxBoxSizer( wxHORIZONTAL );
648
649 m_addFilterButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
650 m_addFilterButton->SetToolTip( _("Add footprint filter") );
651
652 bFpFilterRightBoxSizer->Add( m_addFilterButton, 0, wxTOP|wxBOTTOM, 5 );
653
654 m_editFilterButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
655 m_editFilterButton->SetToolTip( _("Edit footprint filter") );
656
657 bFpFilterRightBoxSizer->Add( m_editFilterButton, 0, wxALL, 5 );
658
659
660 bFpFilterRightBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
661
662 m_deleteFilterButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
663 m_deleteFilterButton->SetToolTip( _("Delete footprint filter") );
664
665 bFpFilterRightBoxSizer->Add( m_deleteFilterButton, 0, wxALL, 5 );
666
667
668 bFPFiltersMargins->Add( bFpFilterRightBoxSizer, 0, 0, 5 );
669
670
671 bSizerFPFilters->Add( bFPFiltersMargins, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
672
673 wxBoxSizer* bSizer24;
674 bSizer24 = new wxBoxSizer( wxVERTICAL );
675
676 m_staticTextFootprints1 = new wxStaticText( this, wxID_ANY, _("Matching footprints:"), wxDefaultPosition, wxDefaultSize, 0 );
677 m_staticTextFootprints1->Wrap( -1 );
678 m_staticTextFootprints1->SetToolTip( _("Footprints from the available footprint libraries that match the selected filter.\nWhen no filter is selected, matches for all filters are shown.") );
679
680 bSizer24->Add( m_staticTextFootprints1, 0, wxALL|wxLEFT, 5 );
681
682 m_matchingFootprints = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL );
683 bSizer24->Add( m_matchingFootprints, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
684
685
686 bSizerFPFilters->Add( bSizer24, 1, wxEXPAND, 5 );
687
688
689 this->SetSizer( bSizerFPFilters );
690 this->Layout();
691
692 // Connect Events
693 m_FootprintFilterListBox->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( PANEL_FOOTPRINT_FILTERS_BASE::OnFpFilterDClick ), NULL, this );
694 m_FootprintFilterListBox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( PANEL_FOOTPRINT_FILTERS_BASE::OnEditFootprintFilter ), NULL, this );
695 m_addFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FOOTPRINT_FILTERS_BASE::OnAddFootprintFilter ), NULL, this );
696 m_editFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FOOTPRINT_FILTERS_BASE::OnEditFootprintFilter ), NULL, this );
697}
698
700{
701 // Disconnect Events
702 m_FootprintFilterListBox->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( PANEL_FOOTPRINT_FILTERS_BASE::OnFpFilterDClick ), NULL, this );
703 m_FootprintFilterListBox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( PANEL_FOOTPRINT_FILTERS_BASE::OnEditFootprintFilter ), NULL, this );
704 m_addFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FOOTPRINT_FILTERS_BASE::OnAddFootprintFilter ), NULL, this );
705 m_editFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FOOTPRINT_FILTERS_BASE::OnEditFootprintFilter ), NULL, this );
706
707}
const char * name
virtual void OnRemoveJumperGroup(wxCommandEvent &event)
virtual void OnBodyStyle(wxCommandEvent &event)
virtual void OnDeleteBodyStyle(wxCommandEvent &event)
virtual void OnUnitSpinCtrlEnter(wxCommandEvent &event)
DIALOG_LIB_SYMBOL_PROPERTIES_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 onPowerCheckBox(wxCommandEvent &event)
virtual void OnCheckBox(wxCommandEvent &event)
virtual void OnUnitSpinCtrlText(wxCommandEvent &event)
virtual void OnMoveDown(wxCommandEvent &event)
virtual void OnUnitSpinCtrlKillFocus(wxFocusEvent &event)
virtual void OnAddBodyStyle(wxCommandEvent &event)
virtual void OnPageChanging(wxNotebookEvent &event)
virtual void OnSymbolNameText(wxCommandEvent &event)
virtual void OnMoveUp(wxCommandEvent &event)
virtual void OnAddJumperGroup(wxCommandEvent &event)
virtual void OnBodyStyleMoveUp(wxCommandEvent &event)
virtual void OnDeleteField(wxCommandEvent &event)
virtual void OnCancelButtonClick(wxCommandEvent &event)
virtual void OnBodyStyleMoveDown(wxCommandEvent &event)
virtual void OnSymbolNameKillFocus(wxFocusEvent &event)
virtual void OnAddField(wxCommandEvent &event)
virtual void OnCombobox(wxCommandEvent &event)
virtual void OnEditSpiceModel(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
virtual void OnAddFootprintFilter(wxCommandEvent &event)
virtual void OnEditFootprintFilter(wxCommandEvent &event)
virtual void OnFpFilterDClick(wxMouseEvent &event)
PANEL_FOOTPRINT_FILTERS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)