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( 4, 2, 0, 0 );
139 fgSizerTrackViaPopups->AddGrowableCol( 0 );
140 fgSizerTrackViaPopups->AddGrowableCol( 1 );
141 fgSizerTrackViaPopups->AddGrowableRow( 0 );
142 fgSizerTrackViaPopups->AddGrowableRow( 1 );
143 fgSizerTrackViaPopups->SetFlexibleDirection( wxBOTH );
144 fgSizerTrackViaPopups->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
145
146 m_layerLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
147 m_layerLabel->Wrap( -1 );
148 fgSizerTrackViaPopups->Add( m_layerLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
149
150 m_layerCtrl = new PCB_LAYER_BOX_SELECTOR( sbAction->GetStaticBox(), wxID_ANY, _("-- leave unchanged -- "), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
151 fgSizerTrackViaPopups->Add( m_layerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
152
153 m_trackWidthLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Track width:"), wxDefaultPosition, wxDefaultSize, 0 );
154 m_trackWidthLabel->Wrap( -1 );
155 fgSizerTrackViaPopups->Add( m_trackWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
156
157 wxArrayString m_trackWidthCtrlChoices;
158 m_trackWidthCtrl = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackWidthCtrlChoices, 0 );
159 m_trackWidthCtrl->SetSelection( 0 );
160 fgSizerTrackViaPopups->Add( m_trackWidthCtrl, 4, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
161
162 m_viaSizeLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Via size:"), wxDefaultPosition, wxDefaultSize, 0 );
163 m_viaSizeLabel->Wrap( -1 );
164 fgSizerTrackViaPopups->Add( m_viaSizeLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
165
166 wxArrayString m_viaSizesCtrlChoices;
167 m_viaSizesCtrl = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_viaSizesCtrlChoices, 0 );
168 m_viaSizesCtrl->SetSelection( 0 );
169 fgSizerTrackViaPopups->Add( m_viaSizesCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
170
171 m_annularRingsLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Annular rings:"), wxDefaultPosition, wxDefaultSize, 0 );
172 m_annularRingsLabel->Wrap( -1 );
173 fgSizerTrackViaPopups->Add( m_annularRingsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 15 );
174
175 wxString m_annularRingsCtrlChoices[] = { _("All copper layers"), _("Start, end, and connected layers"), _("Connected layers only") };
176 int m_annularRingsCtrlNChoices = sizeof( m_annularRingsCtrlChoices ) / sizeof( wxString );
177 m_annularRingsCtrl = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_annularRingsCtrlNChoices, m_annularRingsCtrlChoices, 0 );
178 m_annularRingsCtrl->SetSelection( 1 );
179 fgSizerTrackViaPopups->Add( m_annularRingsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
180
181
182 sbAction->Add( fgSizerTrackViaPopups, 0, wxBOTTOM|wxEXPAND|wxLEFT, 25 );
183
184 m_setToDesignRuleValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_NETCLASS_VALUES, _("Set to net class / custom rule values"), wxDefaultPosition, wxDefaultSize, 0 );
185 sbAction->Add( m_setToDesignRuleValues, 0, wxBOTTOM, 5 );
186
187
188 bMainSizer->Add( sbAction, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
189
190 m_sdbSizer = new wxStdDialogButtonSizer();
191 m_sdbSizerOK = new wxButton( this, wxID_OK );
192 m_sdbSizer->AddButton( m_sdbSizerOK );
193 m_sdbSizerApply = new wxButton( this, wxID_APPLY );
194 m_sdbSizer->AddButton( m_sdbSizerApply );
195 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
196 m_sdbSizer->AddButton( m_sdbSizerCancel );
197 m_sdbSizer->Realize();
198
199 bMainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
200
201
202 this->SetSizer( bMainSizer );
203 this->Layout();
204 bMainSizer->Fit( this );
205
206 // Connect Events
207 m_netclassFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
208 m_layerFilter->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
209 m_trackWidthFilterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnTrackWidthText ), NULL, this );
210 m_viaSizeFilterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnViaSizeText ), NULL, this );
211 m_setToSpecifiedValues->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onActionButtonChange ), NULL, this );
212 m_setToDesignRuleValues->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onActionButtonChange ), NULL, this );
213}
214
216{
217 // Disconnect Events
218 m_netclassFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
219 m_layerFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
220 m_trackWidthFilterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnTrackWidthText ), NULL, this );
221 m_viaSizeFilterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnViaSizeText ), NULL, this );
222 m_setToSpecifiedValues->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onActionButtonChange ), NULL, this );
223 m_setToDesignRuleValues->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onActionButtonChange ), NULL, this );
224
225}
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)