KiCad PCB EDA Suite
dialog_symbol_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/wx_grid.h"
9
11
13
14DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_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 )
15{
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17
18 wxBoxSizer* mainSizer;
19 mainSizer = new wxBoxSizer( wxVERTICAL );
20
21 m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
22 generalPage = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
23 wxBoxSizer* generalPageSizer;
24 generalPageSizer = new wxBoxSizer( wxVERTICAL );
25
26 wxStaticBoxSizer* sbFields;
27 sbFields = new wxStaticBoxSizer( new wxStaticBox( generalPage, wxID_ANY, _("Fields") ), wxVERTICAL );
28
29 m_fieldsGrid = new WX_GRID( sbFields->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
30
31 // Grid
32 m_fieldsGrid->CreateGrid( 4, 13 );
33 m_fieldsGrid->EnableEditing( true );
34 m_fieldsGrid->EnableGridLines( true );
35 m_fieldsGrid->EnableDragGridSize( false );
36 m_fieldsGrid->SetMargins( 0, 0 );
37
38 // Columns
39 m_fieldsGrid->SetColSize( 0, 72 );
40 m_fieldsGrid->SetColSize( 1, 120 );
41 m_fieldsGrid->SetColSize( 2, 48 );
42 m_fieldsGrid->SetColSize( 3, 72 );
43 m_fieldsGrid->SetColSize( 4, 72 );
44 m_fieldsGrid->SetColSize( 5, 48 );
45 m_fieldsGrid->SetColSize( 6, 48 );
46 m_fieldsGrid->SetColSize( 7, 84 );
47 m_fieldsGrid->SetColSize( 8, 84 );
48 m_fieldsGrid->SetColSize( 9, 84 );
49 m_fieldsGrid->SetColSize( 10, 84 );
50 m_fieldsGrid->SetColSize( 11, 140 );
51 m_fieldsGrid->SetColSize( 12, 48 );
52 m_fieldsGrid->EnableDragColMove( false );
53 m_fieldsGrid->EnableDragColSize( true );
54 m_fieldsGrid->SetColLabelValue( 0, _("Name") );
55 m_fieldsGrid->SetColLabelValue( 1, _("Value") );
56 m_fieldsGrid->SetColLabelValue( 2, _("Show") );
57 m_fieldsGrid->SetColLabelValue( 3, _("H Align") );
58 m_fieldsGrid->SetColLabelValue( 4, _("V Align") );
59 m_fieldsGrid->SetColLabelValue( 5, _("Italic") );
60 m_fieldsGrid->SetColLabelValue( 6, _("Bold") );
61 m_fieldsGrid->SetColLabelValue( 7, _("Text Size") );
62 m_fieldsGrid->SetColLabelValue( 8, _("Orientation") );
63 m_fieldsGrid->SetColLabelValue( 9, _("X Position") );
64 m_fieldsGrid->SetColLabelValue( 10, _("Y Position") );
65 m_fieldsGrid->SetColLabelValue( 11, _("Font") );
66 m_fieldsGrid->SetColLabelValue( 12, _("Color") );
68 m_fieldsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
69
70 // Rows
71 m_fieldsGrid->EnableDragRowSize( true );
72 m_fieldsGrid->SetRowLabelSize( 0 );
73 m_fieldsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
74
75 // Label Appearance
76
77 // Cell Defaults
78 m_fieldsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
79 m_fieldsGrid->SetMinSize( wxSize( -1,180 ) );
80
81 sbFields->Add( m_fieldsGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
82
83 wxBoxSizer* bButtonSize;
84 bButtonSize = new wxBoxSizer( wxHORIZONTAL );
85
86 m_bpAdd = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
87 m_bpAdd->SetToolTip( _("Add field") );
88
89 bButtonSize->Add( m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
90
91 m_bpMoveUp = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
92 m_bpMoveUp->SetToolTip( _("Move up") );
93
94 bButtonSize->Add( m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
95
96 m_bpMoveDown = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
97 m_bpMoveDown->SetToolTip( _("Move down") );
98
99 bButtonSize->Add( m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
100
101
102 bButtonSize->Add( 20, 0, 0, wxEXPAND, 10 );
103
104 m_bpDelete = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
105 m_bpDelete->SetToolTip( _("Delete field") );
106
107 bButtonSize->Add( m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
108
109
110 bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
111
112
113 sbFields->Add( bButtonSize, 0, wxALL|wxEXPAND, 5 );
114
115
116 generalPageSizer->Add( sbFields, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
117
118 wxBoxSizer* bLowerSizer;
119 bLowerSizer = new wxBoxSizer( wxHORIZONTAL );
120
121 wxStaticBoxSizer* sbGeneralProps;
122 sbGeneralProps = new wxStaticBoxSizer( new wxStaticBox( generalPage, wxID_ANY, _("General") ), wxHORIZONTAL );
123
124 wxGridBagSizer* gbSizer1;
125 gbSizer1 = new wxGridBagSizer( 3, 3 );
126 gbSizer1->SetFlexibleDirection( wxBOTH );
127 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
128 gbSizer1->SetEmptyCellSize( wxSize( -1,10 ) );
129
130 m_unitLabel = new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Unit:"), wxDefaultPosition, wxDefaultSize, 0 );
131 m_unitLabel->Wrap( -1 );
132 gbSizer1->Add( m_unitLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
133
134 wxArrayString m_unitChoiceChoices;
135 m_unitChoice = new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitChoiceChoices, 0 );
136 m_unitChoice->SetSelection( 0 );
137 m_unitChoice->SetMinSize( wxSize( 100,-1 ) );
138
139 gbSizer1->Add( m_unitChoice, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT|wxRIGHT, 5 );
140
141 m_cbAlternateSymbol = new wxCheckBox( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Alternate symbol (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 );
142 m_cbAlternateSymbol->SetToolTip( _("Use the alternate shape of this symbol.\nFor gates, this is the \"De Morgan\" conversion") );
143
144 gbSizer1->Add( m_cbAlternateSymbol, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
145
146 m_cbMakeDefaultInstance = new wxCheckBox( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Default for all sheet instances"), wxDefaultPosition, wxDefaultSize, 0 );
147 m_cbMakeDefaultInstance->SetToolTip( _("Check to make the unit and reference, value, and\nfootprint fields the default for all sheet instances\nof this symbol") );
148
149 gbSizer1->Add( m_cbMakeDefaultInstance, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxLEFT|wxRIGHT, 5 );
150
151 m_orientationLabel = new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Angle:"), wxDefaultPosition, wxDefaultSize, 0 );
152 m_orientationLabel->Wrap( -1 );
153 gbSizer1->Add( m_orientationLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
154
155 wxString m_orientationCtrlChoices[] = { _("0"), _("+90"), _("-90"), _("180") };
156 int m_orientationCtrlNChoices = sizeof( m_orientationCtrlChoices ) / sizeof( wxString );
157 m_orientationCtrl = new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_orientationCtrlNChoices, m_orientationCtrlChoices, 0 );
158 m_orientationCtrl->SetSelection( 0 );
159 gbSizer1->Add( m_orientationCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxEXPAND, 5 );
160
161 m_mirrorLabel = new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Mirror:"), wxDefaultPosition, wxDefaultSize, 0 );
162 m_mirrorLabel->Wrap( -1 );
163 gbSizer1->Add( m_mirrorLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
164
165 wxString m_mirrorCtrlChoices[] = { _("Not mirrored"), _("Around X axis"), _("Around Y axis") };
166 int m_mirrorCtrlNChoices = sizeof( m_mirrorCtrlChoices ) / sizeof( wxString );
167 m_mirrorCtrl = new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_mirrorCtrlNChoices, m_mirrorCtrlChoices, 0 );
168 m_mirrorCtrl->SetSelection( 0 );
169 gbSizer1->Add( m_mirrorCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT|wxRIGHT, 5 );
170
171
172 gbSizer1->AddGrowableCol( 1 );
173
174 sbGeneralProps->Add( gbSizer1, 1, wxEXPAND, 5 );
175
176
177 bLowerSizer->Add( sbGeneralProps, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
178
179 wxBoxSizer* bMiddleCol;
180 bMiddleCol = new wxBoxSizer( wxVERTICAL );
181
182 wxStaticBoxSizer* sbSizerPinTextOpts;
183 sbSizerPinTextOpts = new wxStaticBoxSizer( new wxStaticBox( generalPage, wxID_ANY, _("Pin Text") ), wxVERTICAL );
184
185 m_ShowPinNumButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Show pin numbers"), wxDefaultPosition, wxDefaultSize, 0 );
186 m_ShowPinNumButt->SetValue(true);
187 m_ShowPinNumButt->SetToolTip( _("Show or hide pin numbers") );
188
189 sbSizerPinTextOpts->Add( m_ShowPinNumButt, 0, wxRIGHT|wxLEFT, 4 );
190
191 m_ShowPinNameButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Show pin names"), wxDefaultPosition, wxDefaultSize, 0 );
192 m_ShowPinNameButt->SetValue(true);
193 m_ShowPinNameButt->SetToolTip( _("Show or hide pin names") );
194
195 sbSizerPinTextOpts->Add( m_ShowPinNameButt, 0, wxALL, 4 );
196
197
198 bMiddleCol->Add( sbSizerPinTextOpts, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
199
200 wxStaticBoxSizer* sbAttributes;
201 sbAttributes = new wxStaticBoxSizer( new wxStaticBox( generalPage, wxID_ANY, _("Attributes") ), wxVERTICAL );
202
203 m_cbExcludeFromBom = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
204 m_cbExcludeFromBom->SetToolTip( _("This is useful for adding symbols for board footprints such as fiducials\nand logos that you do not want to appear in the bill of materials export") );
205
206 sbAttributes->Add( m_cbExcludeFromBom, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
207
208 m_cbExcludeFromBoard = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
209 m_cbExcludeFromBoard->SetToolTip( _("This is useful for adding symbols that only get exported to the bill of materials but\nnot required to layout the board such as mechanical fasteners and enclosures") );
210
211 sbAttributes->Add( m_cbExcludeFromBoard, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
212
213
214 bMiddleCol->Add( sbAttributes, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
215
216
217 bLowerSizer->Add( bMiddleCol, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
218
219 wxBoxSizer* buttonsSizer;
220 buttonsSizer = new wxBoxSizer( wxVERTICAL );
221
222 m_updateSymbolBtn = new wxButton( generalPage, wxID_ANY, _("Update Symbol from Library..."), wxDefaultPosition, wxDefaultSize, 0 );
223 buttonsSizer->Add( m_updateSymbolBtn, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
224
225 m_changeSymbolBtn = new wxButton( generalPage, wxID_ANY, _("Change Symbol..."), wxDefaultPosition, wxDefaultSize, 0 );
226 buttonsSizer->Add( m_changeSymbolBtn, 0, wxEXPAND|wxALL, 5 );
227
228 m_editSchematicSymbolBtn = new wxButton( generalPage, wxID_ANY, _("Edit Symbol..."), wxDefaultPosition, wxDefaultSize, 0 );
229 buttonsSizer->Add( m_editSchematicSymbolBtn, 0, wxEXPAND|wxALL, 5 );
230
231
232 buttonsSizer->Add( 0, 20, 0, wxEXPAND, 5 );
233
234 m_editLibrarySymbolBtn = new wxButton( generalPage, wxID_ANY, _("Edit Library Symbol..."), wxDefaultPosition, wxDefaultSize, 0 );
235 buttonsSizer->Add( m_editLibrarySymbolBtn, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
236
237
238 bLowerSizer->Add( buttonsSizer, 1, wxEXPAND|wxALL, 5 );
239
240
241 generalPageSizer->Add( bLowerSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
242
243
244 generalPage->SetSizer( generalPageSizer );
245 generalPage->Layout();
246 generalPageSizer->Fit( generalPage );
247 m_notebook1->AddPage( generalPage, _("General"), true );
248 m_pinTablePage = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
249 wxBoxSizer* pinTableSizer;
250 pinTableSizer = new wxBoxSizer( wxVERTICAL );
251
252 wxBoxSizer* bMargins;
253 bMargins = new wxBoxSizer( wxVERTICAL );
254
255 m_pinGrid = new WX_GRID( m_pinTablePage, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
256
257 // Grid
258 m_pinGrid->CreateGrid( 5, 5 );
259 m_pinGrid->EnableEditing( true );
260 m_pinGrid->EnableGridLines( true );
261 m_pinGrid->EnableDragGridSize( false );
262 m_pinGrid->SetMargins( 0, 0 );
263
264 // Columns
265 m_pinGrid->SetColSize( 0, 160 );
266 m_pinGrid->SetColSize( 1, 160 );
267 m_pinGrid->SetColSize( 2, 160 );
268 m_pinGrid->SetColSize( 3, 140 );
269 m_pinGrid->SetColSize( 4, 140 );
270 m_pinGrid->EnableDragColMove( false );
271 m_pinGrid->EnableDragColSize( true );
272 m_pinGrid->SetColLabelValue( 0, _("Pin Number") );
273 m_pinGrid->SetColLabelValue( 1, _("Base Pin Name") );
274 m_pinGrid->SetColLabelValue( 2, _("Alternate Assignment") );
275 m_pinGrid->SetColLabelValue( 3, _("Electrical Type") );
276 m_pinGrid->SetColLabelValue( 4, _("Graphic Style") );
278 m_pinGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
279
280 // Rows
281 m_pinGrid->EnableDragRowSize( false );
282 m_pinGrid->SetRowLabelSize( 0 );
283 m_pinGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
284
285 // Label Appearance
286
287 // Cell Defaults
288 m_pinGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
289 m_pinGrid->SetMinSize( wxSize( 512,320 ) );
290
291 bMargins->Add( m_pinGrid, 1, wxEXPAND|wxALL, 5 );
292
293
294 pinTableSizer->Add( bMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
295
296
297 m_pinTablePage->SetSizer( pinTableSizer );
298 m_pinTablePage->Layout();
299 pinTableSizer->Fit( m_pinTablePage );
300 m_notebook1->AddPage( m_pinTablePage, _("Alternate Pin Assignments"), false );
301
302 mainSizer->Add( m_notebook1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
303
304 wxBoxSizer* bSizerBottom;
305 bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
306
307 wxBoxSizer* bLibLink;
308 bLibLink = new wxBoxSizer( wxHORIZONTAL );
309
310 m_libraryIDLabel = new wxStaticText( this, wxID_ANY, _("Library link:"), wxDefaultPosition, wxDefaultSize, 0 );
311 m_libraryIDLabel->Wrap( -1 );
312 bLibLink->Add( m_libraryIDLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 2 );
313
314 m_tcLibraryID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE );
315 m_tcLibraryID->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
316
317 bLibLink->Add( m_tcLibraryID, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
318
319
320 bSizerBottom->Add( bLibLink, 1, wxLEFT|wxEXPAND, 12 );
321
322
323 bSizerBottom->Add( 5, 0, 0, 0, 5 );
324
325 m_spiceFieldsButton = new wxButton( this, wxID_ANY, _("Spice Model..."), wxDefaultPosition, wxDefaultSize, 0 );
326 bSizerBottom->Add( m_spiceFieldsButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 15 );
327
328 m_stdDialogButtonSizer = new wxStdDialogButtonSizer();
329 m_stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
331 m_stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
333 m_stdDialogButtonSizer->Realize();
334
335 bSizerBottom->Add( m_stdDialogButtonSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
336
337
338 mainSizer->Add( bSizerBottom, 0, wxEXPAND, 5 );
339
340
341 this->SetSizer( mainSizer );
342 this->Layout();
343 mainSizer->Fit( this );
344
345 // Connect Events
346 this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnInitDlg ) );
347 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUpdateUI ) );
348 m_fieldsGrid->Connect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnGridEditorHidden ), NULL, this );
349 m_fieldsGrid->Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnGridEditorShown ), NULL, this );
350 m_fieldsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnSizeFieldsGrid ), NULL, this );
351 m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnAddField ), NULL, this );
352 m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnMoveUp ), NULL, this );
353 m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnMoveDown ), NULL, this );
354 m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnDeleteField ), NULL, this );
355 m_unitChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUnitChoice ), NULL, this );
356 m_cbAlternateSymbol->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
357 m_orientationCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnChoice ), NULL, this );
358 m_mirrorCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnChoice ), NULL, this );
359 m_ShowPinNumButt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
360 m_ShowPinNameButt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
361 m_cbExcludeFromBom->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
362 m_cbExcludeFromBoard->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
363 m_updateSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUpdateSymbol ), NULL, this );
364 m_changeSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnExchangeSymbol ), NULL, this );
365 m_editSchematicSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditSymbol ), NULL, this );
366 m_editLibrarySymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditLibrarySymbol ), NULL, this );
367 m_pinGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnPinTableCellEdited ), NULL, this );
368 m_pinGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnSizePinsGrid ), NULL, this );
369 m_spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditSpiceModel ), NULL, this );
370 m_stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
371}
372
374{
375 // Disconnect Events
376 this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnInitDlg ) );
377 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUpdateUI ) );
378 m_fieldsGrid->Disconnect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnGridEditorHidden ), NULL, this );
379 m_fieldsGrid->Disconnect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnGridEditorShown ), NULL, this );
380 m_fieldsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnSizeFieldsGrid ), NULL, this );
381 m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnAddField ), NULL, this );
382 m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnMoveUp ), NULL, this );
383 m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnMoveDown ), NULL, this );
384 m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnDeleteField ), NULL, this );
385 m_unitChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUnitChoice ), NULL, this );
386 m_cbAlternateSymbol->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
387 m_orientationCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnChoice ), NULL, this );
388 m_mirrorCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnChoice ), NULL, this );
389 m_ShowPinNumButt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
390 m_ShowPinNameButt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
391 m_cbExcludeFromBom->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
392 m_cbExcludeFromBoard->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCheckBox ), NULL, this );
393 m_updateSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUpdateSymbol ), NULL, this );
394 m_changeSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnExchangeSymbol ), NULL, this );
395 m_editSchematicSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditSymbol ), NULL, this );
396 m_editLibrarySymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditLibrarySymbol ), NULL, this );
397 m_pinGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnPinTableCellEdited ), NULL, this );
398 m_pinGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnSizePinsGrid ), NULL, this );
399 m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditSpiceModel ), NULL, this );
400 m_stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
401
402}
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
virtual void OnChoice(wxCommandEvent &event)
virtual void OnEditSpiceModel(wxCommandEvent &event)
virtual void OnCheckBox(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
wxStdDialogButtonSizer * m_stdDialogButtonSizer
virtual void OnCancelButtonClick(wxCommandEvent &event)
virtual void OnEditLibrarySymbol(wxCommandEvent &event)
virtual void OnAddField(wxCommandEvent &event)
virtual void OnPinTableCellEdited(wxGridEvent &event)
virtual void OnSizePinsGrid(wxSizeEvent &event)
virtual void OnDeleteField(wxCommandEvent &event)
virtual void OnGridEditorHidden(wxGridEvent &event)
virtual void OnUnitChoice(wxCommandEvent &event)
virtual void OnUpdateSymbol(wxCommandEvent &event)
virtual void OnMoveUp(wxCommandEvent &event)
virtual void OnGridEditorShown(wxGridEvent &event)
virtual void OnExchangeSymbol(wxCommandEvent &event)
virtual void OnEditSymbol(wxCommandEvent &event)
DIALOG_SYMBOL_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Symbol Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU)
virtual void OnMoveDown(wxCommandEvent &event)
virtual void OnInitDlg(wxInitDialogEvent &event)
virtual void OnSizeFieldsGrid(wxSizeEvent &event)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:74
#define _(s)