KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_tracks_and_vias_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bMainSizer;
18 bMainSizer = new wxBoxSizer( wxHORIZONTAL );
19
20 wxBoxSizer* bSizerTracks;
21 bSizerTracks = new wxBoxSizer( wxVERTICAL );
22
23 wxStaticText* stTracksLabel;
24 stTracksLabel = new wxStaticText( this, wxID_ANY, _("Tracks:"), wxDefaultPosition, wxDefaultSize, 0 );
25 stTracksLabel->Wrap( -1 );
26 bSizerTracks->Add( stTracksLabel, 0, wxALL, 5 );
27
28 m_trackWidthsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
29
30 // Grid
31 m_trackWidthsGrid->CreateGrid( 8, 1 );
32 m_trackWidthsGrid->EnableEditing( true );
33 m_trackWidthsGrid->EnableGridLines( true );
34 m_trackWidthsGrid->EnableDragGridSize( false );
35 m_trackWidthsGrid->SetMargins( 0, 0 );
36
37 // Columns
38 m_trackWidthsGrid->EnableDragColMove( false );
39 m_trackWidthsGrid->EnableDragColSize( false );
40 m_trackWidthsGrid->SetColLabelValue( 0, _("Width") );
41 m_trackWidthsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
42 m_trackWidthsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
43
44 // Rows
45 m_trackWidthsGrid->EnableDragRowSize( false );
46 m_trackWidthsGrid->SetRowLabelValue( 0, _("1") );
47 m_trackWidthsGrid->SetRowLabelValue( 1, _("2") );
48 m_trackWidthsGrid->SetRowLabelValue( 2, _("3") );
49 m_trackWidthsGrid->SetRowLabelValue( 3, _("4") );
50 m_trackWidthsGrid->SetRowLabelValue( 4, _("5") );
51 m_trackWidthsGrid->SetRowLabelValue( 5, _("6") );
52 m_trackWidthsGrid->SetRowLabelValue( 6, _("7") );
53 m_trackWidthsGrid->SetRowLabelValue( 7, _("8") );
54 m_trackWidthsGrid->SetRowLabelSize( 0 );
55 m_trackWidthsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
56
57 // Label Appearance
58
59 // Cell Defaults
60 m_trackWidthsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
61 bSizerTracks->Add( m_trackWidthsGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
62
63 wxBoxSizer* bSizer3;
64 bSizer3 = new wxBoxSizer( wxHORIZONTAL );
65
66 m_trackWidthsAddButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
67 bSizer3->Add( m_trackWidthsAddButton, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
68
69 m_trackWidthsSortButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
70 bSizer3->Add( m_trackWidthsSortButton, 0, wxRIGHT|wxLEFT, 5 );
71
72
73 bSizer3->Add( 20, 0, 0, wxEXPAND, 5 );
74
75 m_trackWidthsRemoveButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
76 bSizer3->Add( m_trackWidthsRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
77
78
79 bSizerTracks->Add( bSizer3, 0, wxEXPAND|wxTOP, 2 );
80
81
82 bMainSizer->Add( bSizerTracks, 1, wxEXPAND|wxRIGHT, 5 );
83
84 wxBoxSizer* bSizerVias;
85 bSizerVias = new wxBoxSizer( wxVERTICAL );
86
87 wxStaticText* stViasLabel;
88 stViasLabel = new wxStaticText( this, wxID_ANY, _("Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
89 stViasLabel->Wrap( -1 );
90 bSizerVias->Add( stViasLabel, 0, wxALL, 5 );
91
92 m_viaSizesGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
93
94 // Grid
95 m_viaSizesGrid->CreateGrid( 8, 2 );
96 m_viaSizesGrid->EnableEditing( true );
97 m_viaSizesGrid->EnableGridLines( true );
98 m_viaSizesGrid->EnableDragGridSize( false );
99 m_viaSizesGrid->SetMargins( 0, 0 );
100
101 // Columns
102 m_viaSizesGrid->EnableDragColMove( false );
103 m_viaSizesGrid->EnableDragColSize( false );
104 m_viaSizesGrid->SetColLabelValue( 0, _("Diameter") );
105 m_viaSizesGrid->SetColLabelValue( 1, _("Hole") );
106 m_viaSizesGrid->SetColLabelSize( wxGRID_AUTOSIZE );
107 m_viaSizesGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
108
109 // Rows
110 m_viaSizesGrid->EnableDragRowSize( false );
111 m_viaSizesGrid->SetRowLabelValue( 0, _("1") );
112 m_viaSizesGrid->SetRowLabelValue( 1, _("2") );
113 m_viaSizesGrid->SetRowLabelValue( 2, _("3") );
114 m_viaSizesGrid->SetRowLabelValue( 3, _("4") );
115 m_viaSizesGrid->SetRowLabelValue( 4, _("5") );
116 m_viaSizesGrid->SetRowLabelValue( 5, _("6") );
117 m_viaSizesGrid->SetRowLabelValue( 6, _("7") );
118 m_viaSizesGrid->SetRowLabelValue( 7, _("8") );
119 m_viaSizesGrid->SetRowLabelSize( 0 );
120 m_viaSizesGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
121
122 // Label Appearance
123
124 // Cell Defaults
125 m_viaSizesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
126 bSizerVias->Add( m_viaSizesGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
127
128 wxBoxSizer* bSizer4;
129 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
130
131 m_viaSizesAddButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
132 bSizer4->Add( m_viaSizesAddButton, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
133
134 m_viaSizesSortButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
135 bSizer4->Add( m_viaSizesSortButton, 0, wxRIGHT|wxLEFT, 5 );
136
137
138 bSizer4->Add( 20, 0, 0, wxEXPAND, 5 );
139
140 m_viaSizesRemoveButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
141 bSizer4->Add( m_viaSizesRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
142
143
144 bSizerVias->Add( bSizer4, 0, wxEXPAND|wxTOP, 2 );
145
146
147 bMainSizer->Add( bSizerVias, 2, wxEXPAND|wxRIGHT, 5 );
148
149 wxBoxSizer* bSizerDiffPairs;
150 bSizerDiffPairs = new wxBoxSizer( wxVERTICAL );
151
152 wxStaticText* stDiffPairsLabel;
153 stDiffPairsLabel = new wxStaticText( this, wxID_ANY, _("Differential pairs:"), wxDefaultPosition, wxDefaultSize, 0 );
154 stDiffPairsLabel->Wrap( -1 );
155 bSizerDiffPairs->Add( stDiffPairsLabel, 0, wxALL, 5 );
156
157 m_diffPairsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
158
159 // Grid
160 m_diffPairsGrid->CreateGrid( 8, 3 );
161 m_diffPairsGrid->EnableEditing( true );
162 m_diffPairsGrid->EnableGridLines( true );
163 m_diffPairsGrid->EnableDragGridSize( false );
164 m_diffPairsGrid->SetMargins( 0, 0 );
165
166 // Columns
167 m_diffPairsGrid->EnableDragColMove( false );
168 m_diffPairsGrid->EnableDragColSize( false );
169 m_diffPairsGrid->SetColLabelValue( 0, _("Width") );
170 m_diffPairsGrid->SetColLabelValue( 1, _("Gap") );
171 m_diffPairsGrid->SetColLabelValue( 2, _("Via Gap") );
172 m_diffPairsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
173 m_diffPairsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
174
175 // Rows
176 m_diffPairsGrid->EnableDragRowSize( false );
177 m_diffPairsGrid->SetRowLabelValue( 0, _("1") );
178 m_diffPairsGrid->SetRowLabelValue( 1, _("2") );
179 m_diffPairsGrid->SetRowLabelValue( 2, _("3") );
180 m_diffPairsGrid->SetRowLabelValue( 3, _("4") );
181 m_diffPairsGrid->SetRowLabelValue( 4, _("5") );
182 m_diffPairsGrid->SetRowLabelValue( 5, _("6") );
183 m_diffPairsGrid->SetRowLabelValue( 6, _("7") );
184 m_diffPairsGrid->SetRowLabelValue( 7, _("8") );
185 m_diffPairsGrid->SetRowLabelSize( 0 );
186 m_diffPairsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
187
188 // Label Appearance
189
190 // Cell Defaults
191 m_diffPairsGrid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
192 m_diffPairsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
193 bSizerDiffPairs->Add( m_diffPairsGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
194
195 wxBoxSizer* bSizer5;
196 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
197
198 m_diffPairsAddButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
199 bSizer5->Add( m_diffPairsAddButton, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
200
201 m_diffPairsSortButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
202 bSizer5->Add( m_diffPairsSortButton, 0, wxRIGHT|wxLEFT, 5 );
203
204
205 bSizer5->Add( 20, 0, 0, wxEXPAND, 5 );
206
207 m_diffPairsRemoveButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
208 bSizer5->Add( m_diffPairsRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
209
210
211 bSizerDiffPairs->Add( bSizer5, 0, wxEXPAND|wxTOP, 2 );
212
213
214 bMainSizer->Add( bSizerDiffPairs, 3, wxEXPAND, 5 );
215
216
217 this->SetSizer( bMainSizer );
218 this->Layout();
219 bMainSizer->Fit( this );
220
221 // Connect Events
222 m_trackWidthsAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ), NULL, this );
223 m_trackWidthsSortButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortTrackWidthsClick ), NULL, this );
224 m_trackWidthsRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ), NULL, this );
225 m_viaSizesAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ), NULL, this );
226 m_viaSizesSortButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortViaSizesClick ), NULL, this );
227 m_viaSizesRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ), NULL, this );
228 m_diffPairsAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ), NULL, this );
229 m_diffPairsSortButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortDiffPairsClick ), NULL, this );
230 m_diffPairsRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ), NULL, this );
231}
232
234{
235 // Disconnect Events
236 m_trackWidthsAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ), NULL, this );
237 m_trackWidthsSortButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortTrackWidthsClick ), NULL, this );
238 m_trackWidthsRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ), NULL, this );
239 m_viaSizesAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ), NULL, this );
240 m_viaSizesSortButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortViaSizesClick ), NULL, this );
241 m_viaSizesRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ), NULL, this );
242 m_diffPairsAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ), NULL, this );
243 m_diffPairsSortButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortDiffPairsClick ), NULL, this );
244 m_diffPairsRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ), NULL, this );
245
246}
const char * name
Definition: DXF_plotter.cpp:57
virtual void OnRemoveViaSizesClick(wxCommandEvent &event)
virtual void OnAddDiffPairsClick(wxCommandEvent &event)
virtual void OnAddTrackWidthsClick(wxCommandEvent &event)
virtual void OnSortTrackWidthsClick(wxCommandEvent &event)
virtual void OnSortViaSizesClick(wxCommandEvent &event)
PANEL_SETUP_TRACKS_AND_VIAS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnRemoveDiffPairsClick(wxCommandEvent &event)
virtual void OnSortDiffPairsClick(wxCommandEvent &event)
virtual void OnAddViaSizesClick(wxCommandEvent &event)
virtual void OnRemoveTrackWidthsClick(wxCommandEvent &event)
A bitmap button widget that behaves like a standard dialog button except with an icon.
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:249
#define _(s)