KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_global_edit_tracks_and_vias_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6-dirty)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
14DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_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* bSizerTop;
22 bSizerTop = new wxBoxSizer( wxHORIZONTAL );
23
24 wxStaticBoxSizer* sbScope;
25 sbScope = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scope") ), wxVERTICAL );
26
27 m_tracks = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Tracks"), wxDefaultPosition, wxDefaultSize, 0 );
28 m_tracks->SetValue(true);
29 sbScope->Add( m_tracks, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
30
31 m_vias = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 );
32 m_vias->SetValue(true);
33 sbScope->Add( m_vias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
34
35
36 bSizerTop->Add( sbScope, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
37
38 wxStaticBoxSizer* sbFilters;
39 sbFilters = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Filter Items") ), wxVERTICAL );
40
41 wxFlexGridSizer* fgSizer3;
42 fgSizer3 = new wxFlexGridSizer( 0, 2, 3, 0 );
43 fgSizer3->AddGrowableCol( 1 );
44 fgSizer3->AddGrowableRow( 0 );
45 fgSizer3->AddGrowableRow( 1 );
46 fgSizer3->AddGrowableRow( 2 );
47 fgSizer3->AddGrowableRow( 3 );
48 fgSizer3->SetFlexibleDirection( wxBOTH );
49 fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
50
51 m_netFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by net:"), wxDefaultPosition, wxDefaultSize, 0 );
52 fgSizer3->Add( m_netFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
53
54 m_netFilter = new NET_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
55 fgSizer3->Add( m_netFilter, 1, wxEXPAND|wxRIGHT, 5 );
56
57 m_netclassFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by net class:"), wxDefaultPosition, wxDefaultSize, 0 );
58 fgSizer3->Add( m_netclassFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
59
60 wxArrayString m_netclassFilterChoices;
61 m_netclassFilter = new wxChoice( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_netclassFilterChoices, 0 );
62 m_netclassFilter->SetSelection( 0 );
63 fgSizer3->Add( m_netclassFilter, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
64
65
66 fgSizer3->Add( 0, 7, 1, wxEXPAND, 5 );
67
68
69 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
70
71 m_layerFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by layer:"), wxDefaultPosition, wxDefaultSize, 0 );
72 fgSizer3->Add( m_layerFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
73
74 m_layerFilter = new PCB_LAYER_BOX_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
75 fgSizer3->Add( m_layerFilter, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
76
77
78 fgSizer3->Add( 0, 7, 1, wxEXPAND, 5 );
79
80
81 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
82
83 m_filterByTrackWidth = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter tracks by width:"), wxDefaultPosition, wxDefaultSize, 0 );
84 fgSizer3->Add( m_filterByTrackWidth, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
85
86 wxBoxSizer* bSizer3;
87 bSizer3 = new wxBoxSizer( wxHORIZONTAL );
88
89 m_trackWidthFilterCtrl = new wxTextCtrl( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
90 bSizer3->Add( m_trackWidthFilterCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
91
92 m_trackWidthFilterUnits = new wxStaticText( sbFilters->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
93 m_trackWidthFilterUnits->Wrap( -1 );
94 bSizer3->Add( m_trackWidthFilterUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
95
96
97 fgSizer3->Add( bSizer3, 1, wxEXPAND, 5 );
98
99 m_filterByViaSize = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter vias by size:"), wxDefaultPosition, wxDefaultSize, 0 );
100 fgSizer3->Add( m_filterByViaSize, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
101
102 wxBoxSizer* bSizer31;
103 bSizer31 = new wxBoxSizer( wxHORIZONTAL );
104
105 m_viaSizeFilterCtrl = new wxTextCtrl( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
106 bSizer31->Add( m_viaSizeFilterCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
107
108 m_viaSizeFilterUnits = new wxStaticText( sbFilters->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
109 m_viaSizeFilterUnits->Wrap( -1 );
110 bSizer31->Add( m_viaSizeFilterUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
111
112
113 fgSizer3->Add( bSizer31, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
114
115
116 sbFilters->Add( fgSizer3, 1, wxEXPAND|wxBOTTOM, 5 );
117
118
119 sbFilters->Add( 0, 5, 0, 0, 5 );
120
121 m_selectedItemsFilter = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Selected items only"), wxDefaultPosition, wxDefaultSize, 0 );
122 sbFilters->Add( m_selectedItemsFilter, 0, wxALL, 5 );
123
124
125 bSizerTop->Add( sbFilters, 2, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
126
127
128 bMainSizer->Add( bSizerTop, 0, wxEXPAND, 5 );
129
130 wxStaticBoxSizer* sbAction;
131 sbAction = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Action") ), wxVERTICAL );
132
133 m_setToSpecifiedValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_SPECIFIED_VALUES, _("Set to specified values:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
134 m_setToSpecifiedValues->SetValue( true );
135 sbAction->Add( m_setToSpecifiedValues, 0, 0, 5 );
136
137 wxFlexGridSizer* fgSizerTrackViaPopups;
138 fgSizerTrackViaPopups = new wxFlexGridSizer( 3, 4, 0, 0 );
139 fgSizerTrackViaPopups->AddGrowableCol( 0 );
140 fgSizerTrackViaPopups->AddGrowableCol( 1 );
141 fgSizerTrackViaPopups->AddGrowableCol( 2 );
142 fgSizerTrackViaPopups->AddGrowableRow( 0 );
143 fgSizerTrackViaPopups->AddGrowableRow( 1 );
144 fgSizerTrackViaPopups->SetFlexibleDirection( wxBOTH );
145 fgSizerTrackViaPopups->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
146
147 m_layerLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
148 m_layerLabel->Wrap( -1 );
149 fgSizerTrackViaPopups->Add( m_layerLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
150
151 m_layerCtrl = new PCB_LAYER_BOX_SELECTOR( sbAction->GetStaticBox(), wxID_ANY, _("-- leave unchanged -- "), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
152 fgSizerTrackViaPopups->Add( m_layerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
153
154
155 fgSizerTrackViaPopups->Add( 0, 0, 1, wxEXPAND, 5 );
156
157
158 fgSizerTrackViaPopups->Add( 0, 0, 1, wxEXPAND, 5 );
159
160 m_trackWidthLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Track width:"), wxDefaultPosition, wxDefaultSize, 0 );
161 m_trackWidthLabel->Wrap( -1 );
162 fgSizerTrackViaPopups->Add( m_trackWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
163
164 wxArrayString m_trackWidthCtrlChoices;
165 m_trackWidthCtrl = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackWidthCtrlChoices, 0 );
166 m_trackWidthCtrl->SetSelection( 0 );
167 fgSizerTrackViaPopups->Add( m_trackWidthCtrl, 4, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
168
169
170 fgSizerTrackViaPopups->Add( 0, 0, 1, wxEXPAND, 5 );
171
172
173 fgSizerTrackViaPopups->Add( 0, 0, 1, wxEXPAND, 5 );
174
175 m_viaSizeLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Via size:"), wxDefaultPosition, wxDefaultSize, 0 );
176 m_viaSizeLabel->Wrap( -1 );
177 fgSizerTrackViaPopups->Add( m_viaSizeLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
178
179 wxArrayString m_viaSizesCtrlChoices;
180 m_viaSizesCtrl = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_viaSizesCtrlChoices, 0 );
181 m_viaSizesCtrl->SetSelection( 0 );
182 fgSizerTrackViaPopups->Add( m_viaSizesCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
183
184 m_annularRingsLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Annular rings:"), wxDefaultPosition, wxDefaultSize, 0 );
185 m_annularRingsLabel->Wrap( -1 );
186 fgSizerTrackViaPopups->Add( m_annularRingsLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 15 );
187
188 wxString m_annularRingsCtrlChoices[] = { _("All copper layers"), _("Start, end, and connected layers"), _("Connected layers only") };
189 int m_annularRingsCtrlNChoices = sizeof( m_annularRingsCtrlChoices ) / sizeof( wxString );
190 m_annularRingsCtrl = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_annularRingsCtrlNChoices, m_annularRingsCtrlChoices, 0 );
191 m_annularRingsCtrl->SetSelection( 1 );
192 fgSizerTrackViaPopups->Add( m_annularRingsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
193
194
195 sbAction->Add( fgSizerTrackViaPopups, 0, wxBOTTOM|wxEXPAND|wxLEFT, 25 );
196
197 m_setToDesignRuleValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_NETCLASS_VALUES, _("Set to net class / custom rule values"), wxDefaultPosition, wxDefaultSize, 0 );
198 sbAction->Add( m_setToDesignRuleValues, 0, wxBOTTOM, 5 );
199
200
201 bMainSizer->Add( sbAction, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
202
203 m_sdbSizer = new wxStdDialogButtonSizer();
204 m_sdbSizerOK = new wxButton( this, wxID_OK );
205 m_sdbSizer->AddButton( m_sdbSizerOK );
206 m_sdbSizerApply = new wxButton( this, wxID_APPLY );
207 m_sdbSizer->AddButton( m_sdbSizerApply );
208 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
209 m_sdbSizer->AddButton( m_sdbSizerCancel );
210 m_sdbSizer->Realize();
211
212 bMainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
213
214
215 this->SetSizer( bMainSizer );
216 this->Layout();
217 bMainSizer->Fit( this );
218
219 // Connect Events
220 m_netclassFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
221 m_layerFilter->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
222 m_trackWidthFilterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnTrackWidthText ), NULL, this );
223 m_viaSizeFilterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnViaSizeText ), NULL, this );
224 m_setToSpecifiedValues->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onActionButtonChange ), NULL, this );
225 m_setToDesignRuleValues->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onActionButtonChange ), NULL, this );
226}
227
229{
230 // Disconnect Events
231 m_netclassFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
232 m_layerFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
233 m_trackWidthFilterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnTrackWidthText ), NULL, this );
234 m_viaSizeFilterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnViaSizeText ), NULL, this );
235 m_setToSpecifiedValues->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onActionButtonChange ), NULL, this );
236 m_setToDesignRuleValues->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onActionButtonChange ), NULL, this );
237
238}
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Set Track and Via Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
Class to display a pcb layer list in a wxBitmapComboBox.
#define ID_SPECIFIED_NET_TO_SPECIFIED_VALUES
#define ID_SPECIFIED_NET_TO_NETCLASS_VALUES
#define _(s)