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 Aug 2 2018)
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  wxStaticBoxSizer* sbScope;
22  sbScope = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scope") ), wxVERTICAL );
23 
24  wxFlexGridSizer* fgSizer1;
25  fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
26  fgSizer1->AddGrowableCol( 0 );
27  fgSizer1->AddGrowableCol( 1 );
28  fgSizer1->SetFlexibleDirection( wxBOTH );
29  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
30 
31  m_tracks = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Tracks"), wxDefaultPosition, wxDefaultSize, 0 );
32  m_tracks->SetValue(true);
33  fgSizer1->Add( m_tracks, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
34 
35  m_vias = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 );
36  m_vias->SetValue(true);
37  fgSizer1->Add( m_vias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
38 
39 
40  sbScope->Add( fgSizer1, 0, wxEXPAND, 5 );
41 
42 
43  bMainSizer->Add( sbScope, 0, wxALL|wxEXPAND, 5 );
44 
45  wxStaticBoxSizer* sbFilters;
46  sbFilters = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Filters") ), wxVERTICAL );
47 
48  wxFlexGridSizer* fgSizer3;
49  fgSizer3 = new wxFlexGridSizer( 0, 3, 3, 0 );
50  fgSizer3->AddGrowableCol( 1 );
51  fgSizer3->AddGrowableCol( 2 );
52  fgSizer3->SetFlexibleDirection( wxHORIZONTAL );
53  fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
54 
55  m_netFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by net:"), wxDefaultPosition, wxDefaultSize, 0 );
56  fgSizer3->Add( m_netFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
57 
58  m_netFilter = new NET_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
59  fgSizer3->Add( m_netFilter, 1, wxEXPAND|wxRIGHT, 5 );
60 
61 
62  fgSizer3->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 100 );
63 
64  m_netclassFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by net class:"), wxDefaultPosition, wxDefaultSize, 0 );
65  fgSizer3->Add( m_netclassFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
66 
67  wxArrayString m_netclassFilterChoices;
68  m_netclassFilter = new wxChoice( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_netclassFilterChoices, 0 );
69  m_netclassFilter->SetSelection( 0 );
70  fgSizer3->Add( m_netclassFilter, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
71 
72 
73  fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
74 
75  m_layerFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by layer:"), wxDefaultPosition, wxDefaultSize, 0 );
76  fgSizer3->Add( m_layerFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
77 
78  m_layerFilter = new PCB_LAYER_BOX_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
79  fgSizer3->Add( m_layerFilter, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
80 
81 
82  fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
83 
84 
85  sbFilters->Add( fgSizer3, 1, wxEXPAND, 5 );
86 
87 
88  bMainSizer->Add( sbFilters, 0, wxALL|wxEXPAND, 5 );
89 
90  wxStaticBoxSizer* sbAction;
91  sbAction = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Action") ), wxVERTICAL );
92 
93  m_setToSpecifiedValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_SPECIFIED_VALUES, _("Set to specified values:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
94  m_setToSpecifiedValues->SetValue( true );
95  sbAction->Add( m_setToSpecifiedValues, 0, wxTOP|wxBOTTOM, 5 );
96 
97  wxBoxSizer* bSizerTrackViaPopups;
98  bSizerTrackViaPopups = new wxBoxSizer( wxHORIZONTAL );
99 
100  wxArrayString m_trackWidthSelectBoxChoices;
101  m_trackWidthSelectBox = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackWidthSelectBoxChoices, 0 );
102  m_trackWidthSelectBox->SetSelection( 0 );
103  bSizerTrackViaPopups->Add( m_trackWidthSelectBox, 4, wxEXPAND|wxRIGHT, 5 );
104 
105  wxArrayString m_viaSizesSelectBoxChoices;
106  m_viaSizesSelectBox = new wxChoice( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_viaSizesSelectBoxChoices, 0 );
107  m_viaSizesSelectBox->SetSelection( 0 );
108  bSizerTrackViaPopups->Add( m_viaSizesSelectBox, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
109 
110  m_layerBox = new PCB_LAYER_BOX_SELECTOR( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
111  bSizerTrackViaPopups->Add( m_layerBox, 0, wxRIGHT|wxLEFT, 3 );
112 
113 
114  sbAction->Add( bSizerTrackViaPopups, 0, wxEXPAND|wxBOTTOM|wxLEFT, 15 );
115 
116  m_setToNetclassValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_NETCLASS_VALUES, _("Set to net class values:"), wxDefaultPosition, wxDefaultSize, 0 );
117  sbAction->Add( m_setToNetclassValues, 0, wxTOP|wxBOTTOM, 5 );
118 
119  m_netclassGrid = new wxGrid( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_DEFAULT|wxVSCROLL );
120 
121  // Grid
122  m_netclassGrid->CreateGrid( 1, 6 );
123  m_netclassGrid->EnableEditing( false );
124  m_netclassGrid->EnableGridLines( true );
125  m_netclassGrid->EnableDragGridSize( false );
126  m_netclassGrid->SetMargins( 0, 0 );
127 
128  // Columns
129  m_netclassGrid->SetColSize( 0, 95 );
130  m_netclassGrid->SetColSize( 1, 95 );
131  m_netclassGrid->SetColSize( 2, 95 );
132  m_netclassGrid->SetColSize( 3, 95 );
133  m_netclassGrid->SetColSize( 4, 95 );
134  m_netclassGrid->SetColSize( 5, 95 );
135  m_netclassGrid->EnableDragColMove( false );
136  m_netclassGrid->EnableDragColSize( false );
137  m_netclassGrid->SetColLabelSize( 0 );
138  m_netclassGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
139 
140  // Rows
141  m_netclassGrid->EnableDragRowSize( false );
142  m_netclassGrid->SetRowLabelSize( 0 );
143  m_netclassGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
144 
145  // Label Appearance
146 
147  // Cell Defaults
148  m_netclassGrid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
149  m_netclassGrid->SetDefaultCellFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
150  m_netclassGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
151  sbAction->Add( m_netclassGrid, 0, wxEXPAND|wxLEFT, 15 );
152 
153 
154  sbAction->Add( 0, 0, 1, wxEXPAND|wxTOP, 5 );
155 
156 
157  bMainSizer->Add( sbAction, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
158 
159  m_sdbSizer = new wxStdDialogButtonSizer();
160  m_sdbSizerOK = new wxButton( this, wxID_OK );
161  m_sdbSizer->AddButton( m_sdbSizerOK );
162  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
163  m_sdbSizer->AddButton( m_sdbSizerCancel );
164  m_sdbSizer->Realize();
165 
166  bMainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
167 
168 
169  this->SetSizer( bMainSizer );
170  this->Layout();
171  bMainSizer->Fit( this );
172 
173  // Connect Events
174  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnUpdateUI ) );
175  m_netclassFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
176  m_layerFilter->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
177  m_netclassGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSizeNetclassGrid ), NULL, this );
178 }
179 
181 {
182  // Disconnect Events
183  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnUpdateUI ) );
184  m_netclassFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
185  m_layerFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
186  m_netclassGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSizeNetclassGrid ), NULL, this );
187 
188 }
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.
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
#define ID_SPECIFIED_NET_TO_NETCLASS_VALUES
#define ID_SPECIFIED_NET_TO_SPECIFIED_VALUES