KiCad PCB EDA Suite
dialog_global_edit_tracks_and_vias_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Oct 26 2018)
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, 4, 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, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 3 );
67
68
69 fgSizer3->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 3 );
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 m_selectedItemsFilter = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Only include selected items"), wxDefaultPosition, wxDefaultSize, 0 );
78 fgSizer3->Add( m_selectedItemsFilter, 0, wxALL, 5 );
79
80
81 sbFilters->Add( fgSizer3, 1, wxEXPAND|wxBOTTOM, 5 );
82
83
84 bSizerTop->Add( sbFilters, 2, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
85
86
87 bMainSizer->Add( bSizerTop, 0, wxEXPAND, 5 );
88
89 wxStaticBoxSizer* sbAction;
90 sbAction = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Action") ), wxVERTICAL );
91
92 m_setToSpecifiedValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_SPECIFIED_VALUES, _("Set to specified values:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
93 m_setToSpecifiedValues->SetValue( true );
94 sbAction->Add( m_setToSpecifiedValues, 0, wxBOTTOM, 5 );
95
96 wxFlexGridSizer* fgSizerTrackViaPopups;
97 fgSizerTrackViaPopups = new wxFlexGridSizer( 2, 3, 0, 0 );
98 fgSizerTrackViaPopups->AddGrowableCol( 0 );
99 fgSizerTrackViaPopups->AddGrowableCol( 1 );
100 fgSizerTrackViaPopups->AddGrowableCol( 2 );
101 fgSizerTrackViaPopups->SetFlexibleDirection( wxHORIZONTAL );
102 fgSizerTrackViaPopups->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
103
104 m_staticTextTrackWidth = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Track Width"), wxDefaultPosition, wxDefaultSize, 0 );
105 m_staticTextTrackWidth->Wrap( -1 );
106 fgSizerTrackViaPopups->Add( m_staticTextTrackWidth, 0, wxALL, 5 );
107
108 m_staticTextViaSize = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Via Size"), wxDefaultPosition, wxDefaultSize, 0 );
109 m_staticTextViaSize->Wrap( -1 );
110 fgSizerTrackViaPopups->Add( m_staticTextViaSize, 0, wxALL, 5 );
111
112 m_staticTextLayer = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Layer"), wxDefaultPosition, wxDefaultSize, 0 );
113 m_staticTextLayer->Wrap( -1 );
114 fgSizerTrackViaPopups->Add( m_staticTextLayer, 0, wxALL, 5 );
115
116 wxArrayString m_trackWidthSelectBoxChoices;
117 m_trackWidthSelectBox = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackWidthSelectBoxChoices, 0 );
118 m_trackWidthSelectBox->SetSelection( 0 );
119 fgSizerTrackViaPopups->Add( m_trackWidthSelectBox, 4, wxEXPAND|wxRIGHT, 5 );
120
121 wxArrayString m_viaSizesSelectBoxChoices;
122 m_viaSizesSelectBox = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_viaSizesSelectBoxChoices, 0 );
123 m_viaSizesSelectBox->SetSelection( 0 );
124 fgSizerTrackViaPopups->Add( m_viaSizesSelectBox, 5, wxEXPAND|wxLEFT|wxRIGHT, 5 );
125
126 m_layerBox = new PCB_LAYER_BOX_SELECTOR( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
127 fgSizerTrackViaPopups->Add( m_layerBox, 0, wxRIGHT|wxLEFT, 3 );
128
129
130 sbAction->Add( fgSizerTrackViaPopups, 1, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
131
132 m_setToNetclassValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_NETCLASS_VALUES, _("Set to net class values:"), wxDefaultPosition, wxDefaultSize, 0 );
133 sbAction->Add( m_setToNetclassValues, 0, wxTOP|wxBOTTOM, 5 );
134
135 m_netclassGrid = new wxGrid( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_DEFAULT|wxVSCROLL );
136
137 // Grid
138 m_netclassGrid->CreateGrid( 1, 6 );
139 m_netclassGrid->EnableEditing( false );
140 m_netclassGrid->EnableGridLines( true );
141 m_netclassGrid->EnableDragGridSize( false );
142 m_netclassGrid->SetMargins( 0, 0 );
143
144 // Columns
145 m_netclassGrid->SetColSize( 0, 110 );
146 m_netclassGrid->SetColSize( 1, 110 );
147 m_netclassGrid->SetColSize( 2, 110 );
148 m_netclassGrid->SetColSize( 3, 110 );
149 m_netclassGrid->SetColSize( 4, 110 );
150 m_netclassGrid->SetColSize( 5, 110 );
151 m_netclassGrid->EnableDragColMove( false );
152 m_netclassGrid->EnableDragColSize( false );
153 m_netclassGrid->SetColLabelSize( 0 );
154 m_netclassGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
155
156 // Rows
157 m_netclassGrid->EnableDragRowSize( false );
158 m_netclassGrid->SetRowLabelSize( 0 );
159 m_netclassGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
160
161 // Label Appearance
162
163 // Cell Defaults
164 m_netclassGrid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
165 m_netclassGrid->SetDefaultCellFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
166 m_netclassGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
167 sbAction->Add( m_netclassGrid, 0, wxEXPAND|wxLEFT, 15 );
168
169
170 sbAction->Add( 0, 0, 1, wxEXPAND|wxTOP, 5 );
171
172
173 bMainSizer->Add( sbAction, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
174
175 m_sdbSizer = new wxStdDialogButtonSizer();
176 m_sdbSizerOK = new wxButton( this, wxID_OK );
177 m_sdbSizer->AddButton( m_sdbSizerOK );
178 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
179 m_sdbSizer->AddButton( m_sdbSizerCancel );
180 m_sdbSizer->Realize();
181
182 bMainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
183
184
185 this->SetSizer( bMainSizer );
186 this->Layout();
187 bMainSizer->Fit( this );
188
189 // Connect Events
190 m_netclassFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
191 m_layerFilter->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
192 m_trackWidthSelectBox->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
193 m_viaSizesSelectBox->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
194 m_netclassGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSizeNetclassGrid ), NULL, this );
195}
196
198{
199 // Disconnect Events
200 m_netclassFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
201 m_layerFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
202 m_trackWidthSelectBox->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
203 m_viaSizesSelectBox->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
204 m_netclassGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSizeNetclassGrid ), NULL, this );
205
206}
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)
virtual void onSpecifiedValuesUpdateUi(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
Class to display a pcb layer list in a wxBitmapComboBox.
#define ID_SPECIFIED_NET_TO_SPECIFIED_VALUES
#define _(s)