KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_change_symbols_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10
12
14
15DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_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 m_mainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* matchSizerMargins;
22 matchSizerMargins = new wxBoxSizer( wxVERTICAL );
23
24 m_matchSizer = new wxGridBagSizer( 3, 0 );
25 m_matchSizer->SetFlexibleDirection( wxBOTH );
26 m_matchSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
27
28 m_matchAll = new wxRadioButton( this, wxID_ANY, _("Update all symbols in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
29 m_matchSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
30
31 m_matchBySelection = new wxRadioButton( this, wxID_ANY, _("Update selected symbol(s)"), wxDefaultPosition, wxDefaultSize, 0 );
32 m_matchSizer->Add( m_matchBySelection, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
33
34 m_matchByReference = new wxRadioButton( this, wxID_ANY, _("Update symbols matching reference designator:"), wxDefaultPosition, wxDefaultSize, 0 );
35 m_matchSizer->Add( m_matchByReference, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 2 );
36
37 m_specifiedReference = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), wxTE_PROCESS_ENTER );
38 m_matchSizer->Add( m_specifiedReference, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 2 );
39
40 m_matchByValue = new wxRadioButton( this, wxID_ANY, _("Update symbols matching value:"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_matchSizer->Add( m_matchByValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
42
43 m_specifiedValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
44 m_matchSizer->Add( m_specifiedValue, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
45
46 m_matchById = new wxRadioButton( this, wxID_ANY, _("Update symbols matching library identifier:"), wxDefaultPosition, wxDefaultSize, 0 );
47 m_matchSizer->Add( m_matchById, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP, 6 );
48
49 m_specifiedId = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
50 m_matchSizer->Add( m_specifiedId, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
51
52 m_matchIdBrowserButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
53 m_matchSizer->Add( m_matchIdBrowserButton, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
54
55
56 m_matchSizer->AddGrowableCol( 1 );
57 m_matchSizer->AddGrowableRow( 1 );
58
59 matchSizerMargins->Add( m_matchSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
60
61
62 m_mainSizer->Add( matchSizerMargins, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
63
64
65 m_mainSizer->Add( 0, 8, 0, wxEXPAND, 5 );
66
67 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
68 m_mainSizer->Add( m_staticline1, 0, wxEXPAND|wxALL, 4 );
69
70 m_newIdSizer = new wxBoxSizer( wxVERTICAL );
71
72 wxStaticText* m_newIdLabel;
73 m_newIdLabel = new wxStaticText( this, wxID_ANY, _("New library identifier:"), wxDefaultPosition, wxDefaultSize, 0 );
74 m_newIdLabel->Wrap( -1 );
75 m_newIdSizer->Add( m_newIdLabel, 0, wxLEFT, 5 );
76
77 wxBoxSizer* bSizer1;
78 bSizer1 = new wxBoxSizer( wxHORIZONTAL );
79
80 m_newId = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
81 bSizer1->Add( m_newId, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
82
83 m_newIdBrowserButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
84 bSizer1->Add( m_newIdBrowserButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
85
86
87 m_newIdSizer->Add( bSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
88
89
90 m_mainSizer->Add( m_newIdSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
91
92 wxBoxSizer* bSizerUpdate;
93 bSizerUpdate = new wxBoxSizer( wxHORIZONTAL );
94
95 m_updateFieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update/reset Fields") ), wxVERTICAL );
96
97 wxArrayString m_fieldsBoxChoices;
98 m_fieldsBox = new wxCheckListBox( m_updateFieldsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fieldsBoxChoices, wxLB_NEEDED_SB );
99 m_fieldsBox->SetMinSize( wxSize( -1,120 ) );
100
101 m_updateFieldsSizer->Add( m_fieldsBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
102
103 wxBoxSizer* m_selBtnSizer;
104 m_selBtnSizer = new wxBoxSizer( wxHORIZONTAL );
105
106 m_selAllBtn = new wxButton( m_updateFieldsSizer->GetStaticBox(), wxID_ANY, _("Select All"), wxDefaultPosition, wxDefaultSize, 0 );
107 m_selBtnSizer->Add( m_selAllBtn, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
108
109 m_selNoneBtn = new wxButton( m_updateFieldsSizer->GetStaticBox(), wxID_ANY, _("Select None"), wxDefaultPosition, wxDefaultSize, 0 );
110 m_selBtnSizer->Add( m_selNoneBtn, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
111
112
113 m_updateFieldsSizer->Add( m_selBtnSizer, 0, wxEXPAND, 5 );
114
115
116 bSizerUpdate->Add( m_updateFieldsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
117
118 m_updateOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update Options") ), wxVERTICAL );
119
120 wxCheckBox* updateShapeAndPins;
121 updateShapeAndPins = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update symbol shape and pins"), wxDefaultPosition, wxDefaultSize, 0 );
122 updateShapeAndPins->SetValue(true);
123 updateShapeAndPins->Enable( false );
124
125 m_updateOptionsSizer->Add( updateShapeAndPins, 0, wxBOTTOM|wxRIGHT, 5 );
126
127 wxCheckBox* updateKeywordsAndFootprintFilters;
128 updateKeywordsAndFootprintFilters = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update keywords and footprint filters"), wxDefaultPosition, wxDefaultSize, 0 );
129 updateKeywordsAndFootprintFilters->SetValue(true);
130 updateKeywordsAndFootprintFilters->Enable( false );
131
132 m_updateOptionsSizer->Add( updateKeywordsAndFootprintFilters, 0, wxBOTTOM|wxRIGHT, 5 );
133
134
135 m_updateOptionsSizer->Add( 0, 10, 1, wxEXPAND, 5 );
136
137 m_removeExtraBox = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Remove fields if not in library symbol"), wxDefaultPosition, wxDefaultSize, 0 );
138 m_removeExtraBox->SetToolTip( _("Removes fields that do not occur in the original library symbols") );
139
140 m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 4 );
141
142 m_resetEmptyFields = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fields if empty in library symbol"), wxDefaultPosition, wxDefaultSize, 0 );
143 m_updateOptionsSizer->Add( m_resetEmptyFields, 0, wxBOTTOM|wxRIGHT, 4 );
144
145
146 m_updateOptionsSizer->Add( 0, 10, 0, wxEXPAND, 5 );
147
148 m_resetFieldText = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset field text"), wxDefaultPosition, wxDefaultSize, 0 );
149 m_updateOptionsSizer->Add( m_resetFieldText, 0, wxBOTTOM|wxRIGHT, 4 );
150
151 m_resetFieldVisibilities = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset field visibilities"), wxDefaultPosition, wxDefaultSize, 0 );
152 m_updateOptionsSizer->Add( m_resetFieldVisibilities, 0, wxBOTTOM|wxRIGHT, 4 );
153
154 m_resetFieldEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset field text sizes and styles"), wxDefaultPosition, wxDefaultSize, 0 );
155 m_updateOptionsSizer->Add( m_resetFieldEffects, 0, wxBOTTOM|wxRIGHT, 4 );
156
157 m_resetFieldPositions = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset field positions"), wxDefaultPosition, wxDefaultSize, 0 );
158 m_updateOptionsSizer->Add( m_resetFieldPositions, 0, wxBOTTOM|wxRIGHT, 4 );
159
160
161 m_updateOptionsSizer->Add( 0, 10, 1, wxEXPAND, 5 );
162
163 m_resetPinTextVisibility = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset visibility of pin names/numbers"), wxDefaultPosition, wxDefaultSize, 0 );
164 m_updateOptionsSizer->Add( m_resetPinTextVisibility, 0, wxBOTTOM|wxRIGHT, 5 );
165
166 m_resetAttributes = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset symbol attributes"), wxDefaultPosition, wxDefaultSize, 0 );
167 m_updateOptionsSizer->Add( m_resetAttributes, 0, wxBOTTOM|wxRIGHT, 5 );
168
169 m_resetCustomPower = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset custom power symbols"), wxDefaultPosition, wxDefaultSize, 0 );
170 m_updateOptionsSizer->Add( m_resetCustomPower, 0, wxBOTTOM|wxRIGHT, 5 );
171
172
173 bSizerUpdate->Add( m_updateOptionsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
174
175
176 m_mainSizer->Add( bSizerUpdate, 0, wxEXPAND, 5 );
177
178 wxBoxSizer* bSizer2;
179 bSizer2 = new wxBoxSizer( wxVERTICAL );
180
181 m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
182 m_messagePanel->SetMinSize( wxSize( -1,200 ) );
183
184 bSizer2->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 );
185
186
187 m_mainSizer->Add( bSizer2, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
188
189 m_sdbSizer = new wxStdDialogButtonSizer();
190 m_sdbSizerOK = new wxButton( this, wxID_OK );
191 m_sdbSizer->AddButton( m_sdbSizerOK );
192 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
193 m_sdbSizer->AddButton( m_sdbSizerCancel );
194 m_sdbSizer->Realize();
195
196 m_mainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
197
198
199 this->SetSizer( m_mainSizer );
200 this->Layout();
201 m_mainSizer->Fit( this );
202
203 this->Centre( wxBOTH );
204
205 // Connect Events
206 m_matchAll->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchByAll ), NULL, this );
207 m_matchBySelection->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchBySelected ), NULL, this );
208 m_matchByReference->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchByReference ), NULL, this );
209 m_specifiedReference->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchTextKillFocus ), NULL, this );
210 m_matchByValue->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchByValue ), NULL, this );
211 m_specifiedValue->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchTextKillFocus ), NULL, this );
212 m_specifiedValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::OnMatchText ), NULL, this );
213 m_matchById->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchById ), NULL, this );
214 m_specifiedId->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchIDKillFocus ), NULL, this );
215 m_matchIdBrowserButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::launchMatchIdSymbolBrowser ), NULL, this );
216 m_newId->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onNewLibIDKillFocus ), NULL, this );
217 m_newIdBrowserButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::launchNewIdSymbolBrowser ), NULL, this );
218 m_selAllBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onSelectAll ), NULL, this );
219 m_selNoneBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onSelectNone ), NULL, this );
220 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onOkButtonClicked ), NULL, this );
221}
222
224{
225 // Disconnect Events
226 m_matchAll->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchByAll ), NULL, this );
227 m_matchBySelection->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchBySelected ), NULL, this );
228 m_matchByReference->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchByReference ), NULL, this );
229 m_specifiedReference->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchTextKillFocus ), NULL, this );
230 m_matchByValue->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchByValue ), NULL, this );
231 m_specifiedValue->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchTextKillFocus ), NULL, this );
232 m_specifiedValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::OnMatchText ), NULL, this );
233 m_matchById->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchById ), NULL, this );
234 m_specifiedId->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onMatchIDKillFocus ), NULL, this );
235 m_matchIdBrowserButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::launchMatchIdSymbolBrowser ), NULL, this );
236 m_newId->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onNewLibIDKillFocus ), NULL, this );
237 m_newIdBrowserButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::launchNewIdSymbolBrowser ), NULL, this );
238 m_selAllBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onSelectAll ), NULL, this );
239 m_selNoneBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onSelectNone ), NULL, this );
240 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CHANGE_SYMBOLS_BASE::onOkButtonClicked ), NULL, this );
241
242}
virtual void onMatchByValue(wxCommandEvent &event)
DIALOG_CHANGE_SYMBOLS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Update Symbols from Library"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onOkButtonClicked(wxCommandEvent &event)
virtual void OnMatchText(wxCommandEvent &event)
virtual void onSelectAll(wxCommandEvent &event)
virtual void onMatchById(wxCommandEvent &event)
virtual void launchMatchIdSymbolBrowser(wxCommandEvent &event)
virtual void onSelectNone(wxCommandEvent &event)
virtual void onMatchByAll(wxCommandEvent &event)
virtual void onNewLibIDKillFocus(wxFocusEvent &event)
virtual void onMatchIDKillFocus(wxFocusEvent &event)
virtual void onMatchByReference(wxCommandEvent &event)
virtual void launchNewIdSymbolBrowser(wxCommandEvent &event)
WX_HTML_REPORT_PANEL * m_messagePanel
virtual void onMatchTextKillFocus(wxFocusEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
STD_BITMAP_BUTTON * m_matchIdBrowserButton
virtual void onMatchBySelected(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
A widget for browsing a rich text error/status report.
#define _(s)