KiCad PCB EDA Suite
dialog_global_edit_tracks_and_vias_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
13 
14 DIALOG_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 
78  sbFilters->Add( fgSizer3, 1, wxEXPAND|wxBOTTOM, 5 );
79 
80 
81  bSizerTop->Add( sbFilters, 2, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
82 
83 
84  bMainSizer->Add( bSizerTop, 0, wxEXPAND, 5 );
85 
86  wxStaticBoxSizer* sbAction;
87  sbAction = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Action") ), wxVERTICAL );
88 
89  m_setToSpecifiedValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_SPECIFIED_VALUES, _("Set to specified values:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
90  m_setToSpecifiedValues->SetValue( true );
91  sbAction->Add( m_setToSpecifiedValues, 0, wxBOTTOM, 5 );
92 
93  wxBoxSizer* bSizerTrackViaPopups;
94  bSizerTrackViaPopups = new wxBoxSizer( wxHORIZONTAL );
95 
96  wxArrayString m_trackWidthSelectBoxChoices;
97  m_trackWidthSelectBox = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackWidthSelectBoxChoices, 0 );
98  m_trackWidthSelectBox->SetSelection( 0 );
99  bSizerTrackViaPopups->Add( m_trackWidthSelectBox, 4, wxEXPAND|wxRIGHT, 5 );
100 
101  wxArrayString m_viaSizesSelectBoxChoices;
102  m_viaSizesSelectBox = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_viaSizesSelectBoxChoices, 0 );
103  m_viaSizesSelectBox->SetSelection( 0 );
104  bSizerTrackViaPopups->Add( m_viaSizesSelectBox, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
105 
106  m_layerBox = new PCB_LAYER_BOX_SELECTOR( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
107  bSizerTrackViaPopups->Add( m_layerBox, 0, wxRIGHT|wxLEFT, 3 );
108 
109 
110  sbAction->Add( bSizerTrackViaPopups, 0, wxEXPAND|wxBOTTOM|wxLEFT, 15 );
111 
112  m_setToNetclassValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_NETCLASS_VALUES, _("Set to net class values:"), wxDefaultPosition, wxDefaultSize, 0 );
113  sbAction->Add( m_setToNetclassValues, 0, wxTOP|wxBOTTOM, 5 );
114 
115  m_netclassGrid = new wxGrid( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_DEFAULT|wxVSCROLL );
116 
117  // Grid
118  m_netclassGrid->CreateGrid( 1, 6 );
119  m_netclassGrid->EnableEditing( false );
120  m_netclassGrid->EnableGridLines( true );
121  m_netclassGrid->EnableDragGridSize( false );
122  m_netclassGrid->SetMargins( 0, 0 );
123 
124  // Columns
125  m_netclassGrid->SetColSize( 0, 110 );
126  m_netclassGrid->SetColSize( 1, 110 );
127  m_netclassGrid->SetColSize( 2, 110 );
128  m_netclassGrid->SetColSize( 3, 110 );
129  m_netclassGrid->SetColSize( 4, 110 );
130  m_netclassGrid->SetColSize( 5, 110 );
131  m_netclassGrid->EnableDragColMove( false );
132  m_netclassGrid->EnableDragColSize( false );
133  m_netclassGrid->SetColLabelSize( 0 );
134  m_netclassGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
135 
136  // Rows
137  m_netclassGrid->EnableDragRowSize( false );
138  m_netclassGrid->SetRowLabelSize( 0 );
139  m_netclassGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
140 
141  // Label Appearance
142 
143  // Cell Defaults
144  m_netclassGrid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
145  m_netclassGrid->SetDefaultCellFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
146  m_netclassGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
147  sbAction->Add( m_netclassGrid, 0, wxEXPAND|wxLEFT, 15 );
148 
149 
150  sbAction->Add( 0, 0, 1, wxEXPAND|wxTOP, 5 );
151 
152 
153  bMainSizer->Add( sbAction, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
154 
155  m_sdbSizer = new wxStdDialogButtonSizer();
156  m_sdbSizerOK = new wxButton( this, wxID_OK );
157  m_sdbSizer->AddButton( m_sdbSizerOK );
158  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
159  m_sdbSizer->AddButton( m_sdbSizerCancel );
160  m_sdbSizer->Realize();
161 
162  bMainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
163 
164 
165  this->SetSizer( bMainSizer );
166  this->Layout();
167  bMainSizer->Fit( this );
168 
169  // Connect Events
170  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnUpdateUI ) );
171  m_netclassFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
172  m_layerFilter->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
173  m_netclassGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSizeNetclassGrid ), NULL, this );
174 }
175 
177 {
178  // Disconnect Events
179  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnUpdateUI ) );
180  m_netclassFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
181  m_layerFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
182  m_netclassGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSizeNetclassGrid ), NULL, this );
183 
184 }
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)
Class to display a pcb layer list in a wxBitmapComboBox.
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
#define NULL
#define _(s)
Definition: 3d_actions.cpp:33
#define ID_SPECIFIED_NET_TO_SPECIFIED_VALUES