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 4.2.1-0-g80c4cb6)
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->SetColSize( 0, 120 );
39 m_trackWidthsGrid->EnableDragColMove( false );
40 m_trackWidthsGrid->EnableDragColSize( false );
41 m_trackWidthsGrid->SetColLabelValue( 0, _("Width") );
42 m_trackWidthsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
43 m_trackWidthsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
44
45 // Rows
46 m_trackWidthsGrid->EnableDragRowSize( false );
47 m_trackWidthsGrid->SetRowLabelSize( 0 );
48 m_trackWidthsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
49
50 // Label Appearance
51
52 // Cell Defaults
53 m_trackWidthsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
54 bSizerTracks->Add( m_trackWidthsGrid, 1, wxEXPAND|wxRIGHT, 5 );
55
56 wxBoxSizer* bSizer3;
57 bSizer3 = new wxBoxSizer( wxHORIZONTAL );
58
59 m_trackWidthsAddButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
60 bSizer3->Add( m_trackWidthsAddButton, 0, wxBOTTOM|wxRIGHT, 5 );
61
62 m_trackWidthsSortButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
63 bSizer3->Add( m_trackWidthsSortButton, 0, wxRIGHT|wxLEFT, 5 );
64
65 m_trackWidthsRemoveButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
66 bSizer3->Add( m_trackWidthsRemoveButton, 0, wxLEFT|wxRIGHT, 25 );
67
68
69 bSizerTracks->Add( bSizer3, 0, wxEXPAND|wxTOP, 3 );
70
71
72 bMainSizer->Add( bSizerTracks, 1, wxEXPAND, 5 );
73
74 wxBoxSizer* bSizerVias;
75 bSizerVias = new wxBoxSizer( wxVERTICAL );
76
77 wxStaticText* stViasLabel;
78 stViasLabel = new wxStaticText( this, wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 );
79 stViasLabel->Wrap( -1 );
80 bSizerVias->Add( stViasLabel, 0, wxALL, 5 );
81
82 m_viaSizesGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
83
84 // Grid
85 m_viaSizesGrid->CreateGrid( 8, 2 );
86 m_viaSizesGrid->EnableEditing( true );
87 m_viaSizesGrid->EnableGridLines( true );
88 m_viaSizesGrid->EnableDragGridSize( false );
89 m_viaSizesGrid->SetMargins( 0, 0 );
90
91 // Columns
92 m_viaSizesGrid->SetColSize( 0, 120 );
93 m_viaSizesGrid->SetColSize( 1, 120 );
94 m_viaSizesGrid->EnableDragColMove( false );
95 m_viaSizesGrid->EnableDragColSize( false );
96 m_viaSizesGrid->SetColLabelValue( 0, _("Diameter") );
97 m_viaSizesGrid->SetColLabelValue( 1, _("Hole") );
98 m_viaSizesGrid->SetColLabelSize( wxGRID_AUTOSIZE );
99 m_viaSizesGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
100
101 // Rows
102 m_viaSizesGrid->EnableDragRowSize( false );
103 m_viaSizesGrid->SetRowLabelSize( 0 );
104 m_viaSizesGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
105
106 // Label Appearance
107
108 // Cell Defaults
109 m_viaSizesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
110 bSizerVias->Add( m_viaSizesGrid, 1, wxEXPAND|wxRIGHT, 5 );
111
112 wxBoxSizer* bSizer4;
113 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
114
115 m_viaSizesAddButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
116 bSizer4->Add( m_viaSizesAddButton, 0, wxBOTTOM|wxRIGHT, 5 );
117
118 m_viaSizesSortButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
119 bSizer4->Add( m_viaSizesSortButton, 0, wxRIGHT|wxLEFT, 5 );
120
121
122 bSizer4->Add( 20, 0, 0, wxEXPAND, 5 );
123
124 m_viaSizesRemoveButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
125 bSizer4->Add( m_viaSizesRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
126
127
128 bSizerVias->Add( bSizer4, 0, wxEXPAND|wxTOP, 3 );
129
130
131 bMainSizer->Add( bSizerVias, 2, wxEXPAND, 5 );
132
133 wxBoxSizer* bSizerDiffPairs;
134 bSizerDiffPairs = new wxBoxSizer( wxVERTICAL );
135
136 wxStaticText* stDiffPairsLabel;
137 stDiffPairsLabel = new wxStaticText( this, wxID_ANY, _("Differential Pairs"), wxDefaultPosition, wxDefaultSize, 0 );
138 stDiffPairsLabel->Wrap( -1 );
139 bSizerDiffPairs->Add( stDiffPairsLabel, 0, wxALL, 5 );
140
141 m_diffPairsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
142
143 // Grid
144 m_diffPairsGrid->CreateGrid( 8, 3 );
145 m_diffPairsGrid->EnableEditing( true );
146 m_diffPairsGrid->EnableGridLines( true );
147 m_diffPairsGrid->EnableDragGridSize( false );
148 m_diffPairsGrid->SetMargins( 0, 0 );
149
150 // Columns
151 m_diffPairsGrid->SetColSize( 0, 120 );
152 m_diffPairsGrid->SetColSize( 1, 120 );
153 m_diffPairsGrid->SetColSize( 2, 120 );
154 m_diffPairsGrid->EnableDragColMove( false );
155 m_diffPairsGrid->EnableDragColSize( false );
156 m_diffPairsGrid->SetColLabelValue( 0, _("Width") );
157 m_diffPairsGrid->SetColLabelValue( 1, _("Gap") );
158 m_diffPairsGrid->SetColLabelValue( 2, _("Via Gap") );
159 m_diffPairsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
160 m_diffPairsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
161
162 // Rows
163 m_diffPairsGrid->EnableDragRowSize( false );
164 m_diffPairsGrid->SetRowLabelSize( 0 );
165 m_diffPairsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
166
167 // Label Appearance
168
169 // Cell Defaults
170 m_diffPairsGrid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
171 m_diffPairsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
172 bSizerDiffPairs->Add( m_diffPairsGrid, 1, wxEXPAND, 5 );
173
174 wxBoxSizer* bSizer5;
175 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
176
177 m_diffPairsAddButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
178 bSizer5->Add( m_diffPairsAddButton, 0, wxBOTTOM|wxRIGHT, 5 );
179
180 m_diffPairsSortButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
181 bSizer5->Add( m_diffPairsSortButton, 0, wxRIGHT|wxLEFT, 5 );
182
183
184 bSizer5->Add( 20, 0, 0, wxEXPAND, 5 );
185
186 m_diffPairsRemoveButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
187 bSizer5->Add( m_diffPairsRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
188
189
190 bSizerDiffPairs->Add( bSizer5, 0, wxEXPAND|wxTOP, 3 );
191
192
193 bMainSizer->Add( bSizerDiffPairs, 3, wxEXPAND, 5 );
194
195
196 this->SetSizer( bMainSizer );
197 this->Layout();
198 bMainSizer->Fit( this );
199
200 // Connect Events
201 m_trackWidthsAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ), NULL, this );
202 m_trackWidthsSortButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortTrackWidthsClick ), NULL, this );
203 m_trackWidthsRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ), NULL, this );
204 m_viaSizesAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ), NULL, this );
205 m_viaSizesSortButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortViaSizesClick ), NULL, this );
206 m_viaSizesRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ), NULL, this );
207 m_diffPairsAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ), NULL, this );
208 m_diffPairsSortButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortDiffPairsClick ), NULL, this );
209 m_diffPairsRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ), NULL, this );
210}
211
213{
214 // Disconnect Events
215 m_trackWidthsAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ), NULL, this );
216 m_trackWidthsSortButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortTrackWidthsClick ), NULL, this );
217 m_trackWidthsRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ), NULL, this );
218 m_viaSizesAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ), NULL, this );
219 m_viaSizesSortButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortViaSizesClick ), NULL, this );
220 m_viaSizesRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ), NULL, this );
221 m_diffPairsAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ), NULL, this );
222 m_diffPairsSortButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnSortDiffPairsClick ), NULL, this );
223 m_diffPairsRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ), NULL, this );
224
225}
const char * name
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.
#define _(s)