KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_netclasses_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"
11#include "widgets/wx_panel.h"
12
14
16
17PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
18{
19 wxBoxSizer* bpanelNetClassesSizer;
20 bpanelNetClassesSizer = new wxBoxSizer( wxVERTICAL );
21
22 wxBoxSizer* bMargins;
23 bMargins = new wxBoxSizer( wxVERTICAL );
24
25 m_splitter = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME );
26 m_splitter->SetMinimumPaneSize( 160 );
27
28 m_netclassesPane = new WX_PANEL( m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
29 wxBoxSizer* bUpperSizer;
30 bUpperSizer = new wxBoxSizer( wxVERTICAL );
31
32 m_staticText3 = new wxStaticText( m_netclassesPane, wxID_ANY, _("Netclasses:"), wxDefaultPosition, wxDefaultSize, 0 );
33 m_staticText3->Wrap( -1 );
34 bUpperSizer->Add( m_staticText3, 0, wxTOP|wxLEFT|wxEXPAND, 8 );
35
36
37 bUpperSizer->Add( 0, 3, 0, wxEXPAND, 5 );
38
39 m_netclassGrid = new WX_GRID( m_netclassesPane, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL );
40
41 // Grid
42 m_netclassGrid->CreateGrid( 3, 14 );
43 m_netclassGrid->EnableEditing( true );
44 m_netclassGrid->EnableGridLines( true );
45 m_netclassGrid->EnableDragGridSize( false );
46 m_netclassGrid->SetMargins( 0, 0 );
47
48 // Columns
49 m_netclassGrid->EnableDragColMove( false );
50 m_netclassGrid->EnableDragColSize( true );
51 m_netclassGrid->SetColLabelValue( 0, _("Name") );
52 m_netclassGrid->SetColLabelValue( 1, _("Clearance") );
53 m_netclassGrid->SetColLabelValue( 2, _("Track Width") );
54 m_netclassGrid->SetColLabelValue( 3, _("Via Size") );
55 m_netclassGrid->SetColLabelValue( 4, _("Via Hole") );
56 m_netclassGrid->SetColLabelValue( 5, _("uVia Size") );
57 m_netclassGrid->SetColLabelValue( 6, _("uVia Hole") );
58 m_netclassGrid->SetColLabelValue( 7, _("DP Width") );
59 m_netclassGrid->SetColLabelValue( 8, _("DP Gap") );
60 m_netclassGrid->SetColLabelValue( 9, _("PCB Color") );
61 m_netclassGrid->SetColLabelValue( 10, _("Wire Thickness") );
62 m_netclassGrid->SetColLabelValue( 11, _("Bus Thickness") );
63 m_netclassGrid->SetColLabelValue( 12, _("Color") );
64 m_netclassGrid->SetColLabelValue( 13, _("Line Style") );
65 m_netclassGrid->SetColLabelSize( wxGRID_AUTOSIZE );
66 m_netclassGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
67
68 // Rows
69 m_netclassGrid->EnableDragRowSize( true );
70 m_netclassGrid->SetRowLabelValue( 0, _("Default") );
71 m_netclassGrid->SetRowLabelSize( 0 );
72 m_netclassGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
73
74 // Label Appearance
75
76 // Cell Defaults
77 m_netclassGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
78 bUpperSizer->Add( m_netclassGrid, 1, wxEXPAND|wxFIXED_MINSIZE|wxLEFT|wxRIGHT|wxTOP, 5 );
79
80 wxBoxSizer* buttonBoxSizer;
81 buttonBoxSizer = new wxBoxSizer( wxHORIZONTAL );
82
83 m_addButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
84 buttonBoxSizer->Add( m_addButton, 0, wxLEFT, 2 );
85
86
87 buttonBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
88
89 m_removeButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
90 buttonBoxSizer->Add( m_removeButton, 0, wxBOTTOM|wxLEFT, 5 );
91
92
93 buttonBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
94
95 m_moveUpButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
96 buttonBoxSizer->Add( m_moveUpButton, 0, wxBOTTOM|wxLEFT, 5 );
97
98
99 buttonBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
100
101 m_moveDownButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
102 buttonBoxSizer->Add( m_moveDownButton, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
103
104
105 buttonBoxSizer->Add( 60, 0, 1, wxEXPAND, 5 );
106
107 m_colorDefaultHelpText = new wxStaticText( m_netclassesPane, wxID_ANY, _("Set color to transparent to use KiCad default color."), wxDefaultPosition, wxDefaultSize, 0 );
108 m_colorDefaultHelpText->Wrap( -1 );
109 buttonBoxSizer->Add( m_colorDefaultHelpText, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
110
111 m_importColorsButton = new wxButton( m_netclassesPane, wxID_ANY, _("Import colors from schematic"), wxDefaultPosition, wxDefaultSize, 0 );
112 buttonBoxSizer->Add( m_importColorsButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
113
114
115 bUpperSizer->Add( buttonBoxSizer, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
116
117
118 m_netclassesPane->SetSizer( bUpperSizer );
119 m_netclassesPane->Layout();
120 bUpperSizer->Fit( m_netclassesPane );
121 m_membershipPane = new WX_PANEL( m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
122 wxBoxSizer* bLowerSizer;
123 bLowerSizer = new wxBoxSizer( wxVERTICAL );
124
125
126 bLowerSizer->Add( 0, 5, 0, wxEXPAND, 5 );
127
128 m_staticText5 = new wxStaticText( m_membershipPane, wxID_ANY, _("Netclass assignments:"), wxDefaultPosition, wxDefaultSize, 0 );
129 m_staticText5->Wrap( -1 );
130 bLowerSizer->Add( m_staticText5, 0, wxEXPAND|wxTOP|wxLEFT, 8 );
131
132 wxBoxSizer* bColumns;
133 bColumns = new wxBoxSizer( wxHORIZONTAL );
134
135 wxBoxSizer* bSizer14;
136 bSizer14 = new wxBoxSizer( wxVERTICAL );
137
138 m_assignmentGrid = new WX_GRID( m_membershipPane, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_DEFAULT );
139
140 // Grid
141 m_assignmentGrid->CreateGrid( 5, 2 );
142 m_assignmentGrid->EnableEditing( true );
143 m_assignmentGrid->EnableGridLines( true );
144 m_assignmentGrid->EnableDragGridSize( false );
145 m_assignmentGrid->SetMargins( 0, 0 );
146
147 // Columns
148 m_assignmentGrid->SetColSize( 0, 270 );
149 m_assignmentGrid->SetColSize( 1, 160 );
150 m_assignmentGrid->EnableDragColMove( false );
151 m_assignmentGrid->EnableDragColSize( true );
152 m_assignmentGrid->SetColLabelValue( 0, _("Pattern") );
153 m_assignmentGrid->SetColLabelValue( 1, _("Net Class") );
154 m_assignmentGrid->SetColLabelSize( wxGRID_AUTOSIZE );
155 m_assignmentGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
156
157 // Rows
158 m_assignmentGrid->EnableDragRowSize( true );
159 m_assignmentGrid->SetRowLabelSize( 0 );
160 m_assignmentGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
161
162 // Label Appearance
163
164 // Cell Defaults
165 m_assignmentGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
166 bSizer14->Add( m_assignmentGrid, 2, wxEXPAND|wxFIXED_MINSIZE|wxLEFT, 5 );
167
168
169 bColumns->Add( bSizer14, 3, wxEXPAND, 5 );
170
171 m_matchingNets = new WX_HTML_REPORT_BOX( m_membershipPane, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
172 bColumns->Add( m_matchingNets, 2, wxEXPAND|wxLEFT|wxRIGHT, 5 );
173
174
175 bLowerSizer->Add( bColumns, 1, wxEXPAND|wxTOP, 3 );
176
177 wxBoxSizer* buttonBoxSizer1;
178 buttonBoxSizer1 = new wxBoxSizer( wxHORIZONTAL );
179
180 m_addAssignmentButton = new STD_BITMAP_BUTTON( m_membershipPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
181 buttonBoxSizer1->Add( m_addAssignmentButton, 0, wxLEFT, 2 );
182
183
184 buttonBoxSizer1->Add( 20, 0, 0, wxEXPAND, 5 );
185
186 m_removeAssignmentButton = new STD_BITMAP_BUTTON( m_membershipPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
187 buttonBoxSizer1->Add( m_removeAssignmentButton, 0, wxRIGHT|wxLEFT, 5 );
188
189
190 bLowerSizer->Add( buttonBoxSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
191
192
193 m_membershipPane->SetSizer( bLowerSizer );
194 m_membershipPane->Layout();
195 bLowerSizer->Fit( m_membershipPane );
196 m_splitter->SplitHorizontally( m_netclassesPane, m_membershipPane, -1 );
197 bMargins->Add( m_splitter, 1, wxEXPAND, 10 );
198
199
200 bpanelNetClassesSizer->Add( bMargins, 1, wxEXPAND|wxTOP, 2 );
201
202
203 this->SetSizer( bpanelNetClassesSizer );
204 this->Layout();
205 bpanelNetClassesSizer->Fit( this );
206
207 // Connect Events
208 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnUpdateUI ) );
209 m_netclassGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnSizeNetclassGrid ), NULL, this );
210 m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnAddNetclassClick ), NULL, this );
211 m_removeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnRemoveNetclassClick ), NULL, this );
212 m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnMoveNetclassUpClick ), NULL, this );
213 m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnMoveNetclassDownClick ), NULL, this );
214 m_importColorsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnImportColorsClick ), NULL, this );
215 m_membershipPane->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::onmembershipPanelSize ), NULL, this );
216 m_assignmentGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnSizeAssignmentGrid ), NULL, this );
217 m_assignmentGrid->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnUpdateUI ), NULL, this );
218 m_addAssignmentButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnAddAssignmentClick ), NULL, this );
219 m_removeAssignmentButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnRemoveAssignmentClick ), NULL, this );
220}
221
223{
224 // Disconnect Events
225 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnUpdateUI ) );
226 m_netclassGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnSizeNetclassGrid ), NULL, this );
227 m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnAddNetclassClick ), NULL, this );
228 m_removeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnRemoveNetclassClick ), NULL, this );
229 m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnMoveNetclassUpClick ), NULL, this );
230 m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnMoveNetclassDownClick ), NULL, this );
231 m_importColorsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnImportColorsClick ), NULL, this );
232 m_membershipPane->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::onmembershipPanelSize ), NULL, this );
233 m_assignmentGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnSizeAssignmentGrid ), NULL, this );
234 m_assignmentGrid->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnUpdateUI ), NULL, this );
235 m_addAssignmentButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnAddAssignmentClick ), NULL, this );
236 m_removeAssignmentButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnRemoveAssignmentClick ), NULL, this );
237
238}
const char * name
Definition: DXF_plotter.cpp:57
virtual void OnSizeNetclassGrid(wxSizeEvent &event)
virtual void OnRemoveAssignmentClick(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnRemoveNetclassClick(wxCommandEvent &event)
virtual void OnMoveNetclassDownClick(wxCommandEvent &event)
virtual void OnAddAssignmentClick(wxCommandEvent &event)
virtual void onmembershipPanelSize(wxSizeEvent &event)
virtual void OnSizeAssignmentGrid(wxSizeEvent &event)
virtual void OnMoveNetclassUpClick(wxCommandEvent &event)
virtual void OnImportColorsClick(wxCommandEvent &event)
virtual void OnAddNetclassClick(wxCommandEvent &event)
PANEL_SETUP_NETCLASSES_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)
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
A slimmed down version of WX_HTML_REPORT_PANEL.
#define _(s)