2017-12-27 17:09:27 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2018-03-13 11:03:41 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
2017-12-27 17:09:27 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dialog_design_rules_aux_helper_class.h"
|
|
|
|
|
|
|
|
#include "dialog_design_rules_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
|
|
|
{
|
2017-12-28 18:56:13 +00:00
|
|
|
this->SetSizeHints( wxSize( -1,-1 ), wxSize( -1,-1 ) );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
m_DRnotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP );
|
|
|
|
m_panelNetClassesEditor = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
|
|
|
wxBoxSizer* bpanelNetClassesSizer;
|
|
|
|
bpanelNetClassesSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
wxStaticBoxSizer* sbSizerUpper;
|
2018-03-13 11:03:41 +00:00
|
|
|
sbSizerUpper = new wxStaticBoxSizer( new wxStaticBox( m_panelNetClassesEditor, wxID_ANY, _("Net Classes") ), wxVERTICAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_grid = new wxGrid( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxSUNKEN_BORDER|wxTAB_TRAVERSAL|wxVSCROLL );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
// Grid
|
2018-03-13 11:03:41 +00:00
|
|
|
m_grid->CreateGrid( 1, 9 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_grid->EnableEditing( true );
|
|
|
|
m_grid->EnableGridLines( true );
|
|
|
|
m_grid->EnableDragGridSize( false );
|
|
|
|
m_grid->SetMargins( 0, 0 );
|
|
|
|
|
|
|
|
// Columns
|
2018-03-13 11:03:41 +00:00
|
|
|
m_grid->SetColSize( 0, 120 );
|
|
|
|
m_grid->SetColSize( 1, 100 );
|
|
|
|
m_grid->SetColSize( 2, 100 );
|
|
|
|
m_grid->SetColSize( 3, 100 );
|
|
|
|
m_grid->SetColSize( 4, 100 );
|
|
|
|
m_grid->SetColSize( 5, 100 );
|
|
|
|
m_grid->SetColSize( 6, 100 );
|
|
|
|
m_grid->SetColSize( 7, 100 );
|
|
|
|
m_grid->SetColSize( 8, 100 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_grid->EnableDragColMove( false );
|
|
|
|
m_grid->EnableDragColSize( true );
|
2018-03-13 11:03:41 +00:00
|
|
|
m_grid->SetColLabelSize( 22 );
|
|
|
|
m_grid->SetColLabelValue( 0, _("Name") );
|
|
|
|
m_grid->SetColLabelValue( 1, _("Clearance") );
|
|
|
|
m_grid->SetColLabelValue( 2, _("Track Width") );
|
|
|
|
m_grid->SetColLabelValue( 3, _("Via Dia") );
|
|
|
|
m_grid->SetColLabelValue( 4, _("Via Drill") );
|
|
|
|
m_grid->SetColLabelValue( 5, _("uVia Dia") );
|
|
|
|
m_grid->SetColLabelValue( 6, _("uVia Drill") );
|
|
|
|
m_grid->SetColLabelValue( 7, _("Diff Pair Width") );
|
|
|
|
m_grid->SetColLabelValue( 8, _("Diff Pair Gap") );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Rows
|
|
|
|
m_grid->EnableDragRowSize( false );
|
2018-03-13 11:03:41 +00:00
|
|
|
m_grid->SetRowLabelSize( 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_grid->SetRowLabelValue( 0, _("Default") );
|
|
|
|
m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Label Appearance
|
|
|
|
|
|
|
|
// Cell Defaults
|
|
|
|
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
|
|
|
m_grid->SetToolTip( _("Net Class parameters") );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
sbSizerUpper->Add( m_grid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
wxBoxSizer* buttonBoxSizer;
|
|
|
|
buttonBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_addButton = new wxBitmapButton( m_panelNetClassesEditor, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
|
|
|
|
m_addButton->SetMinSize( wxSize( 29,29 ) );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
buttonBoxSizer->Add( m_addButton, 0, wxLEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_removeButton = new wxBitmapButton( m_panelNetClassesEditor, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
|
|
|
|
m_removeButton->SetMinSize( wxSize( 29,29 ) );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
buttonBoxSizer->Add( m_removeButton, 0, wxRIGHT, 10 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_moveUpButton = new wxBitmapButton( m_panelNetClassesEditor, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
|
|
|
|
m_moveUpButton->SetMinSize( wxSize( 29,29 ) );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
buttonBoxSizer->Add( m_moveUpButton, 0, wxLEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_moveDownButton = new wxBitmapButton( m_panelNetClassesEditor, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW );
|
|
|
|
m_moveDownButton->SetMinSize( wxSize( 29,29 ) );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
buttonBoxSizer->Add( m_moveDownButton, 0, wxRIGHT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
sbSizerUpper->Add( buttonBoxSizer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 2 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
bpanelNetClassesSizer->Add( sbSizerUpper, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
|
|
|
|
|
|
|
wxStaticBoxSizer* sbSizerNetSelectMain;
|
2018-03-13 11:03:41 +00:00
|
|
|
sbSizerNetSelectMain = new wxStaticBoxSizer( new wxStaticBox( m_panelNetClassesEditor, wxID_ANY, _("Net Class Membership") ), wxHORIZONTAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
wxBoxSizer* leftNetSelectBoxSizer;
|
|
|
|
leftNetSelectBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
wxBoxSizer* bSizer10;
|
|
|
|
bSizer10 = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_leftClassChoice = new wxComboBox( m_panelNetClassesEditor, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
|
2017-12-27 17:09:27 +00:00
|
|
|
bSizer10->Add( m_leftClassChoice, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_staticline21 = new wxStaticLine( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
bSizer10->Add( m_staticline21, 0, wxEXPAND | wxALL, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_buttonLeftSelAll = new wxButton( m_panelNetClassesEditor, wxID_ANY, _("Select All"), wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_buttonLeftSelAll->SetToolTip( _("Select all nets in the left list") );
|
|
|
|
|
|
|
|
bSizer10->Add( m_buttonLeftSelAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
leftNetSelectBoxSizer->Add( bSizer10, 0, wxEXPAND, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_leftListCtrl = new NETS_LIST_CTRL( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES|wxSUNKEN_BORDER );
|
2017-12-27 17:09:27 +00:00
|
|
|
leftNetSelectBoxSizer->Add( m_leftListCtrl, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
sbSizerNetSelectMain->Add( leftNetSelectBoxSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
wxBoxSizer* bmiddleSizerNetSelect;
|
|
|
|
bmiddleSizerNetSelect = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_buttonRightToLeft = new wxButton( m_panelNetClassesEditor, ID_LEFT_TO_RIGHT_COPY, _("<<<"), wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_buttonRightToLeft->SetToolTip( _("Move the selected nets in the right list to the left list") );
|
|
|
|
|
|
|
|
bmiddleSizerNetSelect->Add( m_buttonRightToLeft, 0, wxALL, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_buttonLeftToRight = new wxButton( m_panelNetClassesEditor, ID_RIGHT_TO_LEFT_COPY, _(">>>"), wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_buttonLeftToRight->SetToolTip( _("Move the selected nets in the left list to the right list") );
|
|
|
|
|
|
|
|
bmiddleSizerNetSelect->Add( m_buttonLeftToRight, 0, wxALL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
sbSizerNetSelectMain->Add( bmiddleSizerNetSelect, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
wxBoxSizer* rghtNetSelectBoxSizer;
|
|
|
|
rghtNetSelectBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
wxBoxSizer* bSizer11;
|
|
|
|
bSizer11 = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_rightClassChoice = new wxComboBox( m_panelNetClassesEditor, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
|
2017-12-27 17:09:27 +00:00
|
|
|
bSizer11->Add( m_rightClassChoice, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_staticline3 = new wxStaticLine( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
bSizer11->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_buttonRightSelAll = new wxButton( m_panelNetClassesEditor, wxID_ANY, _("Select All"), wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_buttonRightSelAll->SetToolTip( _("Select all nets in the right list") );
|
|
|
|
|
|
|
|
bSizer11->Add( m_buttonRightSelAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
rghtNetSelectBoxSizer->Add( bSizer11, 0, wxEXPAND, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_rightListCtrl = new NETS_LIST_CTRL( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES|wxSUNKEN_BORDER );
|
2017-12-27 17:09:27 +00:00
|
|
|
rghtNetSelectBoxSizer->Add( m_rightListCtrl, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
sbSizerNetSelectMain->Add( rghtNetSelectBoxSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bpanelNetClassesSizer->Add( sbSizerNetSelectMain, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_panelNetClassesEditor->SetSizer( bpanelNetClassesSizer );
|
|
|
|
m_panelNetClassesEditor->Layout();
|
|
|
|
bpanelNetClassesSizer->Fit( m_panelNetClassesEditor );
|
|
|
|
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), true );
|
|
|
|
m_panelGolbalDesignRules = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
|
|
|
wxBoxSizer* bpanelGlobRulesSizer;
|
2018-03-13 11:03:41 +00:00
|
|
|
bpanelGlobRulesSizer = new wxBoxSizer( wxHORIZONTAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
wxStaticBoxSizer* sbRoutingOptionSizer;
|
|
|
|
sbRoutingOptionSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Routing Options") ), wxVERTICAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
wxFlexGridSizer* fgViaOptionsSize;
|
|
|
|
fgViaOptionsSize = new wxFlexGridSizer( 0, 3, 0, 0 );
|
|
|
|
fgViaOptionsSize->AddGrowableCol( 1 );
|
|
|
|
fgViaOptionsSize->SetFlexibleDirection( wxBOTH );
|
|
|
|
fgViaOptionsSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_TrackMinWidthTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum track width:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_TrackMinWidthTitle->Wrap( -1 );
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_TrackMinWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_SetTrackMinWidthCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_SetTrackMinWidthCtrl, 0, wxALIGN_LEFT|wxALIGN_TOP|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_TrackMinWidthUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_TrackMinWidthUnits->Wrap( -1 );
|
|
|
|
fgViaOptionsSize->Add( m_TrackMinWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_ViaMinTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum via diameter:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_ViaMinTitle->Wrap( -1 );
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_SetViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_SetViasMinSizeCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_ViaMinUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_ViaMinUnits->Wrap( -1 );
|
|
|
|
fgViaOptionsSize->Add( m_ViaMinUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_ViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum via drill:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_ViaMinDrillTitle->Wrap( -1 );
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_ViaMinDrillTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_SetViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_SetViasMinDrillCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_ViaMinDrillUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_ViaMinDrillUnits->Wrap( -1 );
|
|
|
|
fgViaOptionsSize->Add( m_ViaMinDrillUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
fgViaOptionsSize->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_OptAllowBlindBuriedVias = new wxCheckBox( m_panelGolbalDesignRules, wxID_ANY, _("Allow blind/buried vias"), wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
fgViaOptionsSize->Add( m_OptAllowBlindBuriedVias, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
fgViaOptionsSize->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
fgViaOptionsSize->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_OptAllowMicroVias = new wxCheckBox( m_panelGolbalDesignRules, wxID_ANY, _("Allow micro vias (uVias)"), wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
fgViaOptionsSize->Add( m_OptAllowMicroVias, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
fgViaOptionsSize->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_MicroViaMinSizeTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum uVia diameter:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_MicroViaMinSizeTitle->Wrap( -1 );
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_MicroViaMinSizeTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_SetMicroViasMinSizeCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_SetMicroViasMinSizeCtrl->Enable( false );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_SetMicroViasMinSizeCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_MicroViaMinSizeUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_MicroViaMinSizeUnits->Wrap( -1 );
|
|
|
|
fgViaOptionsSize->Add( m_MicroViaMinSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_MicroViaMinDrillTitle = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Minimum uVia drill:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_MicroViaMinDrillTitle->Wrap( -1 );
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_MicroViaMinDrillTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_SetMicroViasMinDrillCtrl = new wxTextCtrl( m_panelGolbalDesignRules, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_SetMicroViasMinDrillCtrl->Enable( false );
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
fgViaOptionsSize->Add( m_SetMicroViasMinDrillCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_MicroViaMinDrillUnits = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_MicroViaMinDrillUnits->Wrap( -1 );
|
|
|
|
fgViaOptionsSize->Add( m_MicroViaMinDrillUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
|
|
|
|
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
sbRoutingOptionSizer->Add( fgViaOptionsSize, 1, wxEXPAND, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
bpanelGlobRulesSizer->Add( sbRoutingOptionSizer, 1, wxEXPAND|wxALL, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
wxStaticBoxSizer* sbTracksListSizer;
|
|
|
|
sbTracksListSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Custom Track Widths") ), wxVERTICAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
m_gridTrackWidthList = new wxGrid( m_panelGolbalDesignRules, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
// Grid
|
|
|
|
m_gridTrackWidthList->CreateGrid( 8, 1 );
|
|
|
|
m_gridTrackWidthList->EnableEditing( true );
|
|
|
|
m_gridTrackWidthList->EnableGridLines( true );
|
|
|
|
m_gridTrackWidthList->EnableDragGridSize( false );
|
|
|
|
m_gridTrackWidthList->SetMargins( 0, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
// Columns
|
|
|
|
m_gridTrackWidthList->SetColSize( 0, 110 );
|
|
|
|
m_gridTrackWidthList->EnableDragColMove( false );
|
|
|
|
m_gridTrackWidthList->EnableDragColSize( false );
|
|
|
|
m_gridTrackWidthList->SetColLabelSize( 22 );
|
|
|
|
m_gridTrackWidthList->SetColLabelValue( 0, _("Width") );
|
|
|
|
m_gridTrackWidthList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
// Rows
|
|
|
|
m_gridTrackWidthList->EnableDragRowSize( false );
|
|
|
|
m_gridTrackWidthList->SetRowLabelSize( 80 );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 0, _("Track 1") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 1, _("Track 2") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 2, _("Track 3") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 3, _("Track 4") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 4, _("Track 5") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 5, _("Track 6") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 6, _("Track 7") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 7, _("Track 8") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 8, _("Track 9") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 9, _("Track 10") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 10, _("Track 11") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelValue( 11, _("Track 12") );
|
|
|
|
m_gridTrackWidthList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Label Appearance
|
|
|
|
|
|
|
|
// Cell Defaults
|
|
|
|
m_gridTrackWidthList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
|
|
|
sbTracksListSizer->Add( m_gridTrackWidthList, 0, wxALL|wxEXPAND, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
|
|
|
|
bpanelGlobRulesSizer->Add( sbTracksListSizer, 0, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
wxStaticBoxSizer* sViaSizeBox;
|
|
|
|
sViaSizeBox = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Custom Via Sizes") ), wxVERTICAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
2018-01-05 18:26:31 +00:00
|
|
|
m_gridViaSizeList = new wxGrid( m_panelGolbalDesignRules, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
// Grid
|
|
|
|
m_gridViaSizeList->CreateGrid( 8, 2 );
|
|
|
|
m_gridViaSizeList->EnableEditing( true );
|
|
|
|
m_gridViaSizeList->EnableGridLines( true );
|
|
|
|
m_gridViaSizeList->EnableDragGridSize( false );
|
|
|
|
m_gridViaSizeList->SetMargins( 0, 0 );
|
|
|
|
|
|
|
|
// Columns
|
2018-03-13 11:03:41 +00:00
|
|
|
m_gridViaSizeList->SetColSize( 0, 110 );
|
|
|
|
m_gridViaSizeList->SetColSize( 1, 110 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_gridViaSizeList->EnableDragColMove( false );
|
2018-03-13 11:03:41 +00:00
|
|
|
m_gridViaSizeList->EnableDragColSize( false );
|
|
|
|
m_gridViaSizeList->SetColLabelSize( 22 );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_gridViaSizeList->SetColLabelValue( 0, _("Diameter") );
|
|
|
|
m_gridViaSizeList->SetColLabelValue( 1, _("Drill") );
|
|
|
|
m_gridViaSizeList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Rows
|
2018-03-13 11:03:41 +00:00
|
|
|
m_gridViaSizeList->EnableDragRowSize( false );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_gridViaSizeList->SetRowLabelSize( 80 );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 0, _("Via 1") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 1, _("Via 2") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 2, _("Via 3") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 3, _("Via 4") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 4, _("Via 5") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 5, _("Via 6") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 6, _("Via 7") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 7, _("Via 8") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 8, _("Via 9") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 9, _("Via 10") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 10, _("Via 11") );
|
|
|
|
m_gridViaSizeList->SetRowLabelValue( 11, _("Via 12") );
|
|
|
|
m_gridViaSizeList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Label Appearance
|
|
|
|
|
|
|
|
// Cell Defaults
|
|
|
|
m_gridViaSizeList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
2018-03-13 11:03:41 +00:00
|
|
|
sViaSizeBox->Add( m_gridViaSizeList, 0, wxALL|wxEXPAND, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
|
2018-03-13 11:03:41 +00:00
|
|
|
bpanelGlobRulesSizer->Add( sViaSizeBox, 0, wxALL|wxEXPAND, 5 );
|
2017-12-27 17:09:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
m_panelGolbalDesignRules->SetSizer( bpanelGlobRulesSizer );
|
|
|
|
m_panelGolbalDesignRules->Layout();
|
|
|
|
bpanelGlobRulesSizer->Fit( m_panelGolbalDesignRules );
|
|
|
|
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), false );
|
|
|
|
|
|
|
|
bMainSizer->Add( m_DRnotebook, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
|
|
bMainSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
|
|
|
|
|
|
|
|
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
|
|
|
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
|
|
|
m_sdbSizer1->Realize();
|
|
|
|
|
|
|
|
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
|
|
|
bMainSizer->Fit( this );
|
|
|
|
|
|
|
|
// Connect Events
|
2018-03-13 11:03:41 +00:00
|
|
|
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_DESIGN_RULES_BASE::OnUpdateUI ) );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_DRnotebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_DESIGN_RULES_BASE::OnNotebookPageChanged ), NULL, this );
|
|
|
|
m_grid->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( DIALOG_DESIGN_RULES_BASE::OnNetClassesNameLeftClick ), NULL, this );
|
|
|
|
m_grid->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( DIALOG_DESIGN_RULES_BASE::OnNetClassesNameRightClick ), NULL, this );
|
2018-03-13 11:03:41 +00:00
|
|
|
m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_DESIGN_RULES_BASE::OnSizeNetclassGrid ), NULL, this );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnAddNetclassClick ), NULL, this );
|
|
|
|
m_removeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRemoveNetclassClick ), NULL, this );
|
|
|
|
m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnMoveUpSelectedNetClass ), NULL, this );
|
2018-03-13 11:03:41 +00:00
|
|
|
m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnMoveDownSelectedNetClass ), NULL, this );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_leftClassChoice->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftCBSelection ), NULL, this );
|
|
|
|
m_buttonLeftSelAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftSelectAllButton ), NULL, this );
|
|
|
|
m_buttonRightToLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightToLeftCopyButton ), NULL, this );
|
|
|
|
m_buttonLeftToRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftToRightCopyButton ), NULL, this );
|
|
|
|
m_rightClassChoice->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightCBSelection ), NULL, this );
|
|
|
|
m_buttonRightSelAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightSelectAllButton ), NULL, this );
|
|
|
|
m_OptAllowMicroVias->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnAllowMicroVias ), NULL, this );
|
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_DESIGN_RULES_BASE::~DIALOG_DESIGN_RULES_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
2018-03-13 11:03:41 +00:00
|
|
|
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_DESIGN_RULES_BASE::OnUpdateUI ) );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_DRnotebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_DESIGN_RULES_BASE::OnNotebookPageChanged ), NULL, this );
|
|
|
|
m_grid->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( DIALOG_DESIGN_RULES_BASE::OnNetClassesNameLeftClick ), NULL, this );
|
|
|
|
m_grid->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( DIALOG_DESIGN_RULES_BASE::OnNetClassesNameRightClick ), NULL, this );
|
2018-03-13 11:03:41 +00:00
|
|
|
m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_DESIGN_RULES_BASE::OnSizeNetclassGrid ), NULL, this );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnAddNetclassClick ), NULL, this );
|
|
|
|
m_removeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRemoveNetclassClick ), NULL, this );
|
|
|
|
m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnMoveUpSelectedNetClass ), NULL, this );
|
2018-03-13 11:03:41 +00:00
|
|
|
m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnMoveDownSelectedNetClass ), NULL, this );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_leftClassChoice->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftCBSelection ), NULL, this );
|
|
|
|
m_buttonLeftSelAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftSelectAllButton ), NULL, this );
|
|
|
|
m_buttonRightToLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightToLeftCopyButton ), NULL, this );
|
|
|
|
m_buttonLeftToRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftToRightCopyButton ), NULL, this );
|
|
|
|
m_rightClassChoice->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightCBSelection ), NULL, this );
|
|
|
|
m_buttonRightSelAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightSelectAllButton ), NULL, this );
|
|
|
|
m_OptAllowMicroVias->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnAllowMicroVias ), NULL, this );
|
|
|
|
|
|
|
|
}
|