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 Sep 8 2016)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 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 )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bSizerCurrSettings;
20  bSizerCurrSettings = new wxBoxSizer( wxVERTICAL );
21 
22  m_staticText12 = new wxStaticText( this, wxID_ANY, _("Current Settings:"), wxDefaultPosition, wxDefaultSize, 0 );
23  m_staticText12->Wrap( -1 );
24  m_staticText12->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
25 
26  bSizerCurrSettings->Add( m_staticText12, 0, wxALL, 5 );
27 
28  wxBoxSizer* bSizerCurrSettingsLeft;
29  bSizerCurrSettingsLeft = new wxBoxSizer( wxHORIZONTAL );
30 
31 
32  bSizerCurrSettingsLeft->Add( 20, 0, 0, 0, 5 );
33 
34  wxBoxSizer* bSizerGrids;
35  bSizerGrids = new wxBoxSizer( wxVERTICAL );
36 
37  wxFlexGridSizer* fgSizeNetInfo;
38  fgSizeNetInfo = new wxFlexGridSizer( 0, 2, 0, 0 );
39  fgSizeNetInfo->AddGrowableCol( 1 );
40  fgSizeNetInfo->SetFlexibleDirection( wxBOTH );
41  fgSizeNetInfo->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
42 
43  m_CurrentNetText = new wxStaticText( this, wxID_ANY, _("Current Net:"), wxDefaultPosition, wxDefaultSize, 0 );
44  m_CurrentNetText->Wrap( -1 );
45  fgSizeNetInfo->Add( m_CurrentNetText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
46 
47  wxArrayString m_choiceNetNameChoices;
48  m_choiceNetName = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceNetNameChoices, 0 );
49  m_choiceNetName->SetSelection( 0 );
50  fgSizeNetInfo->Add( m_choiceNetName, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
51 
52  m_CurrentNetclassText = new wxStaticText( this, wxID_ANY, _("Current NetClass:"), wxDefaultPosition, wxDefaultSize, 0 );
53  m_CurrentNetclassText->Wrap( -1 );
54  fgSizeNetInfo->Add( m_CurrentNetclassText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
55 
56  m_CurrentNetclassName = new wxStaticText( this, wxID_ANY, _("unknown"), wxDefaultPosition, wxDefaultSize, 0 );
57  m_CurrentNetclassName->Wrap( -1 );
58  m_CurrentNetclassName->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
59 
60  fgSizeNetInfo->Add( m_CurrentNetclassName, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
61 
62 
63  bSizerGrids->Add( fgSizeNetInfo, 0, wxEXPAND, 5 );
64 
65 
66  bSizerGrids->Add( 10, 10, 0, 0, 5 );
67 
68  m_gridDisplayCurrentSettings = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
69 
70  // Grid
71  m_gridDisplayCurrentSettings->CreateGrid( 2, 5 );
72  m_gridDisplayCurrentSettings->EnableEditing( true );
73  m_gridDisplayCurrentSettings->EnableGridLines( true );
74  m_gridDisplayCurrentSettings->EnableDragGridSize( true );
75  m_gridDisplayCurrentSettings->SetMargins( 10, 0 );
76 
77  // Columns
78  m_gridDisplayCurrentSettings->AutoSizeColumns();
79  m_gridDisplayCurrentSettings->EnableDragColMove( false );
80  m_gridDisplayCurrentSettings->EnableDragColSize( true );
81  m_gridDisplayCurrentSettings->SetColLabelSize( 30 );
82  m_gridDisplayCurrentSettings->SetColLabelValue( 0, _("Track size") );
83  m_gridDisplayCurrentSettings->SetColLabelValue( 1, _("Via diameter") );
84  m_gridDisplayCurrentSettings->SetColLabelValue( 2, _("Via drill") );
85  m_gridDisplayCurrentSettings->SetColLabelValue( 3, _("uVia size") );
86  m_gridDisplayCurrentSettings->SetColLabelValue( 4, _("uVia Drill") );
87  m_gridDisplayCurrentSettings->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
88 
89  // Rows
90  m_gridDisplayCurrentSettings->AutoSizeRows();
91  m_gridDisplayCurrentSettings->EnableDragRowSize( true );
92  m_gridDisplayCurrentSettings->SetRowLabelSize( 100 );
93  m_gridDisplayCurrentSettings->SetRowLabelValue( 0, _("Netclass value") );
94  m_gridDisplayCurrentSettings->SetRowLabelValue( 1, _("Current value") );
95  m_gridDisplayCurrentSettings->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
96 
97  // Label Appearance
98 
99  // Cell Defaults
100  m_gridDisplayCurrentSettings->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
101  bSizerGrids->Add( m_gridDisplayCurrentSettings, 1, wxALL|wxEXPAND, 5 );
102 
103 
104  bSizerCurrSettingsLeft->Add( bSizerGrids, 1, wxEXPAND, 5 );
105 
106 
107  bSizerCurrSettings->Add( bSizerCurrSettingsLeft, 1, wxEXPAND, 5 );
108 
109 
110  bMainSizer->Add( bSizerCurrSettings, 0, wxEXPAND, 5 );
111 
112  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
113  bMainSizer->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 );
114 
115  wxBoxSizer* bLowerSizer;
116  bLowerSizer = new wxBoxSizer( wxVERTICAL );
117 
118  m_staticText11 = new wxStaticText( this, wxID_ANY, _("Global Edition Option:"), wxDefaultPosition, wxDefaultSize, 0 );
119  m_staticText11->Wrap( -1 );
120  m_staticText11->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
121 
122  bLowerSizer->Add( m_staticText11, 0, wxRIGHT|wxLEFT, 5 );
123 
124 
125  bMainSizer->Add( bLowerSizer, 0, wxALL|wxEXPAND, 5 );
126 
127  wxBoxSizer* bSizerOptions;
128  bSizerOptions = new wxBoxSizer( wxHORIZONTAL );
129 
130 
131  bSizerOptions->Add( 20, 0, 0, 0, 5 );
132 
133  wxBoxSizer* bSizerRadioButtons;
134  bSizerRadioButtons = new wxBoxSizer( wxVERTICAL );
135 
136  m_Net2CurrValueButton = new wxRadioButton( this, ID_CURRENT_VALUES_TO_CURRENT_NET, _("Set tracks and vias of the current Net to the current selected user value"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
137  m_Net2CurrValueButton->SetValue( true );
138  bSizerRadioButtons->Add( m_Net2CurrValueButton, 0, wxALL, 5 );
139 
140  m_NetUseNetclassValueButton = new wxRadioButton( this, ID_NETCLASS_VALUES_TO_CURRENT_NET, _("Set tracks and vias of the current Net to the Netclass value"), wxDefaultPosition, wxDefaultSize, 0 );
141  bSizerRadioButtons->Add( m_NetUseNetclassValueButton, 0, wxALL, 5 );
142 
143  m_radioBtnAll = new wxRadioButton( this, ID_ALL_TRACKS_VIAS, _("Set all tracks and vias to their Netclass value"), wxDefaultPosition, wxDefaultSize, 0 );
144  bSizerRadioButtons->Add( m_radioBtnAll, 0, wxALL, 5 );
145 
146  m_radioAllVias = new wxRadioButton( this, ID_ALL_VIAS, _("Set all vias (no track) to their Netclass value"), wxDefaultPosition, wxDefaultSize, 0 );
147  bSizerRadioButtons->Add( m_radioAllVias, 0, wxALL, 5 );
148 
149  m_radioAllTracks = new wxRadioButton( this, ID_ALL_TRACKS, _("Set all tracks (no via) to their Netclass value"), wxDefaultPosition, wxDefaultSize, 0 );
150  bSizerRadioButtons->Add( m_radioAllTracks, 0, wxALL, 5 );
151 
152 
153  bSizerOptions->Add( bSizerRadioButtons, 1, wxEXPAND, 5 );
154 
155 
156  bMainSizer->Add( bSizerOptions, 0, wxEXPAND, 5 );
157 
158  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
159  bMainSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
160 
161  m_sdbSizer = new wxStdDialogButtonSizer();
162  m_sdbSizerOK = new wxButton( this, wxID_OK );
163  m_sdbSizer->AddButton( m_sdbSizerOK );
164  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
165  m_sdbSizer->AddButton( m_sdbSizerCancel );
166  m_sdbSizer->Realize();
167 
168  bMainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
169 
170 
171  this->SetSizer( bMainSizer );
172  this->Layout();
173 
174  // Connect Events
175  m_choiceNetName->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onNetSelection ), NULL, this );
176  m_Net2CurrValueButton->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
177  m_NetUseNetclassValueButton->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
178  m_radioBtnAll->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
179  m_radioAllVias->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
180  m_radioAllTracks->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
181  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnOkClick ), NULL, this );
182 }
183 
185 {
186  // Disconnect Events
187  m_choiceNetName->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::onNetSelection ), NULL, this );
188  m_Net2CurrValueButton->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
189  m_NetUseNetclassValueButton->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
190  m_radioBtnAll->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
191  m_radioAllVias->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
192  m_radioAllTracks->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnSelectionClick ), NULL, this );
193  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE::OnOkClick ), NULL, this );
194 
195 }
#define ID_NETCLASS_VALUES_TO_CURRENT_NET
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
#define ID_CURRENT_VALUES_TO_CURRENT_NET
DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Global Edition of Tracks and Vias"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(706, 412), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)