KiCad PCB EDA Suite
PANEL_SETUP_TRACKS_AND_VIAS_BASE Class Reference

Class PANEL_SETUP_TRACKS_AND_VIAS_BASE. More...

#include <panel_setup_tracks_and_vias_base.h>

Inheritance diagram for PANEL_SETUP_TRACKS_AND_VIAS_BASE:
PANEL_SETUP_TRACKS_AND_VIAS

Public Member Functions

 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)
 
 ~PANEL_SETUP_TRACKS_AND_VIAS_BASE ()
 

Protected Member Functions

virtual void OnAddTrackWidthsClick (wxCommandEvent &event)
 
virtual void OnRemoveTrackWidthsClick (wxCommandEvent &event)
 
virtual void OnAddViaSizesClick (wxCommandEvent &event)
 
virtual void OnRemoveViaSizesClick (wxCommandEvent &event)
 
virtual void OnAddDiffPairsClick (wxCommandEvent &event)
 
virtual void OnRemoveDiffPairsClick (wxCommandEvent &event)
 

Protected Attributes

wxStaticText * m_label
 
WX_GRIDm_trackWidthsGrid
 
wxBitmapButton * m_trackWidthsAddButton
 
wxBitmapButton * m_trackWidthsRemoveButton
 
WX_GRIDm_viaSizesGrid
 
wxBitmapButton * m_viaSizesAddButton
 
wxBitmapButton * m_viaSizesRemoveButton
 
WX_GRIDm_diffPairsGrid
 
wxBitmapButton * m_diffPairsAddButton
 
wxBitmapButton * m_diffPairsRemoveButton
 

Detailed Description

Constructor & Destructor Documentation

PANEL_SETUP_TRACKS_AND_VIAS_BASE::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 
)

Definition at line 14 of file panel_setup_tracks_and_vias_base.cpp.

References m_diffPairsAddButton, m_diffPairsGrid, m_diffPairsRemoveButton, m_label, m_trackWidthsAddButton, m_trackWidthsGrid, m_trackWidthsRemoveButton, m_viaSizesAddButton, m_viaSizesGrid, m_viaSizesRemoveButton, OnAddDiffPairsClick(), OnAddTrackWidthsClick(), OnAddViaSizesClick(), OnRemoveDiffPairsClick(), OnRemoveTrackWidthsClick(), and OnRemoveViaSizesClick().

Referenced by OnRemoveDiffPairsClick().

14  : wxPanel( parent, id, pos, size, style )
15 {
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  m_label = new wxStaticText( this, wxID_ANY, _("Pre-defined track and via dimensions:"), wxDefaultPosition, wxDefaultSize, 0 );
20  m_label->Wrap( -1 );
21  bMainSizer->Add( m_label, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
22 
23  wxBoxSizer* bSizerLower;
24  bSizerLower = new wxBoxSizer( wxHORIZONTAL );
25 
26  wxStaticBoxSizer* sbSizer4;
27  sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks") ), wxVERTICAL );
28 
29  m_trackWidthsGrid = new WX_GRID( sbSizer4->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
30 
31  // Grid
32  m_trackWidthsGrid->CreateGrid( 8, 1 );
33  m_trackWidthsGrid->EnableEditing( true );
34  m_trackWidthsGrid->EnableGridLines( true );
35  m_trackWidthsGrid->EnableDragGridSize( false );
36  m_trackWidthsGrid->SetMargins( 0, 0 );
37 
38  // Columns
39  m_trackWidthsGrid->SetColSize( 0, 125 );
40  m_trackWidthsGrid->EnableDragColMove( false );
41  m_trackWidthsGrid->EnableDragColSize( false );
42  m_trackWidthsGrid->SetColLabelSize( 22 );
43  m_trackWidthsGrid->SetColLabelValue( 0, _("Width") );
44  m_trackWidthsGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
45 
46  // Rows
47  m_trackWidthsGrid->EnableDragRowSize( false );
48  m_trackWidthsGrid->SetRowLabelSize( 0 );
49  m_trackWidthsGrid->SetRowLabelValue( 0, _("1") );
50  m_trackWidthsGrid->SetRowLabelValue( 1, _("2") );
51  m_trackWidthsGrid->SetRowLabelValue( 2, _("3") );
52  m_trackWidthsGrid->SetRowLabelValue( 3, _("4") );
53  m_trackWidthsGrid->SetRowLabelValue( 4, _("5") );
54  m_trackWidthsGrid->SetRowLabelValue( 5, _("6") );
55  m_trackWidthsGrid->SetRowLabelValue( 6, _("7") );
56  m_trackWidthsGrid->SetRowLabelValue( 7, _("8") );
57  m_trackWidthsGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
58 
59  // Label Appearance
60 
61  // Cell Defaults
62  m_trackWidthsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
63  sbSizer4->Add( m_trackWidthsGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
64 
65  wxBoxSizer* bSizer3;
66  bSizer3 = new wxBoxSizer( wxHORIZONTAL );
67 
68  m_trackWidthsAddButton = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
69  m_trackWidthsAddButton->SetMinSize( wxSize( 30,30 ) );
70 
71  bSizer3->Add( m_trackWidthsAddButton, 0, wxLEFT|wxRIGHT, 5 );
72 
73 
74  bSizer3->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
75 
76  m_trackWidthsRemoveButton = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
77  m_trackWidthsRemoveButton->SetMinSize( wxSize( 30,30 ) );
78 
79  bSizer3->Add( m_trackWidthsRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
80 
81 
82  sbSizer4->Add( bSizer3, 0, wxEXPAND|wxTOP, 2 );
83 
84 
85  bSizerLower->Add( sbSizer4, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
86 
87  wxStaticBoxSizer* sbSizer5;
88  sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Vias") ), wxVERTICAL );
89 
90  m_viaSizesGrid = new WX_GRID( sbSizer5->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
91 
92  // Grid
93  m_viaSizesGrid->CreateGrid( 8, 2 );
94  m_viaSizesGrid->EnableEditing( true );
95  m_viaSizesGrid->EnableGridLines( true );
96  m_viaSizesGrid->EnableDragGridSize( false );
97  m_viaSizesGrid->SetMargins( 0, 0 );
98 
99  // Columns
100  m_viaSizesGrid->SetColSize( 0, 110 );
101  m_viaSizesGrid->SetColSize( 1, 110 );
102  m_viaSizesGrid->EnableDragColMove( false );
103  m_viaSizesGrid->EnableDragColSize( false );
104  m_viaSizesGrid->SetColLabelSize( 22 );
105  m_viaSizesGrid->SetColLabelValue( 0, _("Size") );
106  m_viaSizesGrid->SetColLabelValue( 1, _("Drill") );
107  m_viaSizesGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
108 
109  // Rows
110  m_viaSizesGrid->EnableDragRowSize( false );
111  m_viaSizesGrid->SetRowLabelSize( 0 );
112  m_viaSizesGrid->SetRowLabelValue( 0, _("1") );
113  m_viaSizesGrid->SetRowLabelValue( 1, _("2") );
114  m_viaSizesGrid->SetRowLabelValue( 2, _("3") );
115  m_viaSizesGrid->SetRowLabelValue( 3, _("4") );
116  m_viaSizesGrid->SetRowLabelValue( 4, _("5") );
117  m_viaSizesGrid->SetRowLabelValue( 5, _("6") );
118  m_viaSizesGrid->SetRowLabelValue( 6, _("7") );
119  m_viaSizesGrid->SetRowLabelValue( 7, _("8") );
120  m_viaSizesGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
121 
122  // Label Appearance
123 
124  // Cell Defaults
125  m_viaSizesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
126  sbSizer5->Add( m_viaSizesGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
127 
128  wxBoxSizer* bSizer4;
129  bSizer4 = new wxBoxSizer( wxHORIZONTAL );
130 
131  m_viaSizesAddButton = new wxBitmapButton( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
132  m_viaSizesAddButton->SetMinSize( wxSize( 30,30 ) );
133 
134  bSizer4->Add( m_viaSizesAddButton, 0, wxLEFT|wxRIGHT, 5 );
135 
136 
137  bSizer4->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
138 
139  m_viaSizesRemoveButton = new wxBitmapButton( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
140  m_viaSizesRemoveButton->SetMinSize( wxSize( 30,30 ) );
141 
142  bSizer4->Add( m_viaSizesRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
143 
144 
145  sbSizer5->Add( bSizer4, 0, wxEXPAND|wxTOP, 2 );
146 
147 
148  bSizerLower->Add( sbSizer5, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
149 
150  wxStaticBoxSizer* sbSizer6;
151  sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Differential Pairs") ), wxVERTICAL );
152 
153  m_diffPairsGrid = new WX_GRID( sbSizer6->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
154 
155  // Grid
156  m_diffPairsGrid->CreateGrid( 8, 3 );
157  m_diffPairsGrid->EnableEditing( true );
158  m_diffPairsGrid->EnableGridLines( true );
159  m_diffPairsGrid->EnableDragGridSize( false );
160  m_diffPairsGrid->SetMargins( 0, 0 );
161 
162  // Columns
163  m_diffPairsGrid->SetColSize( 0, 110 );
164  m_diffPairsGrid->SetColSize( 1, 110 );
165  m_diffPairsGrid->SetColSize( 2, 110 );
166  m_diffPairsGrid->EnableDragColMove( false );
167  m_diffPairsGrid->EnableDragColSize( true );
168  m_diffPairsGrid->SetColLabelSize( 22 );
169  m_diffPairsGrid->SetColLabelValue( 0, _("Width") );
170  m_diffPairsGrid->SetColLabelValue( 1, _("Gap") );
171  m_diffPairsGrid->SetColLabelValue( 2, _("Via Gap") );
172  m_diffPairsGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
173 
174  // Rows
175  m_diffPairsGrid->EnableDragRowSize( true );
176  m_diffPairsGrid->SetRowLabelSize( 0 );
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->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
186 
187  // Label Appearance
188 
189  // Cell Defaults
190  m_diffPairsGrid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
191  m_diffPairsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
192  sbSizer6->Add( m_diffPairsGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
193 
194  wxBoxSizer* bSizer5;
195  bSizer5 = new wxBoxSizer( wxHORIZONTAL );
196 
197  m_diffPairsAddButton = new wxBitmapButton( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
198  m_diffPairsAddButton->SetMinSize( wxSize( 30,30 ) );
199 
200  bSizer5->Add( m_diffPairsAddButton, 0, wxLEFT|wxRIGHT, 5 );
201 
202 
203  bSizer5->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
204 
205  m_diffPairsRemoveButton = new wxBitmapButton( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
206  m_diffPairsRemoveButton->SetMinSize( wxSize( 30,30 ) );
207 
208  bSizer5->Add( m_diffPairsRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
209 
210 
211  sbSizer6->Add( bSizer5, 0, wxEXPAND|wxTOP, 2 );
212 
213 
214  bSizerLower->Add( sbSizer6, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
215 
216 
217  bMainSizer->Add( bSizerLower, 5, wxEXPAND|wxLEFT, 20 );
218 
219 
220  this->SetSizer( bMainSizer );
221  this->Layout();
222  bMainSizer->Fit( this );
223 
224  // Connect Events
225  m_trackWidthsAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ), NULL, this );
226  m_trackWidthsRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ), NULL, this );
227  m_viaSizesAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ), NULL, this );
228  m_viaSizesRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ), NULL, this );
229  m_diffPairsAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ), NULL, this );
230  m_diffPairsRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ), NULL, this );
231 }
virtual void OnAddViaSizesClick(wxCommandEvent &event)
virtual void OnRemoveDiffPairsClick(wxCommandEvent &event)
virtual void OnRemoveTrackWidthsClick(wxCommandEvent &event)
virtual void OnRemoveViaSizesClick(wxCommandEvent &event)
virtual void OnAddDiffPairsClick(wxCommandEvent &event)
virtual void OnAddTrackWidthsClick(wxCommandEvent &event)
PANEL_SETUP_TRACKS_AND_VIAS_BASE::~PANEL_SETUP_TRACKS_AND_VIAS_BASE ( )

Definition at line 233 of file panel_setup_tracks_and_vias_base.cpp.

References m_diffPairsAddButton, m_diffPairsRemoveButton, m_trackWidthsAddButton, m_trackWidthsRemoveButton, m_viaSizesAddButton, m_viaSizesRemoveButton, OnAddDiffPairsClick(), OnAddTrackWidthsClick(), OnAddViaSizesClick(), OnRemoveDiffPairsClick(), OnRemoveTrackWidthsClick(), and OnRemoveViaSizesClick().

Referenced by OnRemoveDiffPairsClick().

234 {
235  // Disconnect Events
236  m_trackWidthsAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ), NULL, this );
237  m_trackWidthsRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ), NULL, this );
238  m_viaSizesAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ), NULL, this );
239  m_viaSizesRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ), NULL, this );
240  m_diffPairsAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ), NULL, this );
241  m_diffPairsRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ), NULL, this );
242 
243 }
virtual void OnAddViaSizesClick(wxCommandEvent &event)
virtual void OnRemoveDiffPairsClick(wxCommandEvent &event)
virtual void OnRemoveTrackWidthsClick(wxCommandEvent &event)
virtual void OnRemoveViaSizesClick(wxCommandEvent &event)
virtual void OnAddDiffPairsClick(wxCommandEvent &event)
virtual void OnAddTrackWidthsClick(wxCommandEvent &event)

Member Function Documentation

virtual void PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_TRACKS_AND_VIAS.

Definition at line 58 of file panel_setup_tracks_and_vias_base.h.

Referenced by PANEL_SETUP_TRACKS_AND_VIAS_BASE(), and ~PANEL_SETUP_TRACKS_AND_VIAS_BASE().

58 { event.Skip(); }
virtual void PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_TRACKS_AND_VIAS.

Definition at line 54 of file panel_setup_tracks_and_vias_base.h.

Referenced by PANEL_SETUP_TRACKS_AND_VIAS_BASE(), and ~PANEL_SETUP_TRACKS_AND_VIAS_BASE().

54 { event.Skip(); }
virtual void PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_TRACKS_AND_VIAS.

Definition at line 56 of file panel_setup_tracks_and_vias_base.h.

Referenced by PANEL_SETUP_TRACKS_AND_VIAS_BASE(), and ~PANEL_SETUP_TRACKS_AND_VIAS_BASE().

56 { event.Skip(); }
virtual void PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ( wxCommandEvent &  event)
inlineprotectedvirtual
virtual void PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_TRACKS_AND_VIAS.

Definition at line 55 of file panel_setup_tracks_and_vias_base.h.

Referenced by PANEL_SETUP_TRACKS_AND_VIAS_BASE(), and ~PANEL_SETUP_TRACKS_AND_VIAS_BASE().

55 { event.Skip(); }
virtual void PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_TRACKS_AND_VIAS.

Definition at line 57 of file panel_setup_tracks_and_vias_base.h.

Referenced by PANEL_SETUP_TRACKS_AND_VIAS_BASE(), and ~PANEL_SETUP_TRACKS_AND_VIAS_BASE().

57 { event.Skip(); }

Member Data Documentation

wxBitmapButton* PANEL_SETUP_TRACKS_AND_VIAS_BASE::m_diffPairsAddButton
protected
wxBitmapButton* PANEL_SETUP_TRACKS_AND_VIAS_BASE::m_diffPairsRemoveButton
protected
wxStaticText* PANEL_SETUP_TRACKS_AND_VIAS_BASE::m_label
protected

Definition at line 42 of file panel_setup_tracks_and_vias_base.h.

Referenced by PANEL_SETUP_TRACKS_AND_VIAS_BASE().

wxBitmapButton* PANEL_SETUP_TRACKS_AND_VIAS_BASE::m_trackWidthsAddButton
protected
wxBitmapButton* PANEL_SETUP_TRACKS_AND_VIAS_BASE::m_trackWidthsRemoveButton
protected
wxBitmapButton* PANEL_SETUP_TRACKS_AND_VIAS_BASE::m_viaSizesAddButton
protected
wxBitmapButton* PANEL_SETUP_TRACKS_AND_VIAS_BASE::m_viaSizesRemoveButton
protected

The documentation for this class was generated from the following files: