From 420cadab34cb08999f860b700325dfced6a07a51 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 6 Oct 2023 19:40:49 +0100 Subject: [PATCH] Separate meander settings from target length/skew. Settings move to Board Setup, while target length is sourced from the custom rules (or a text-entry dialog if no rules are active for the track). Target skew is sourced from the coupled-trace-length minus the trace-to-be-tuned length. Fixes https://gitlab.com/kicad/code/kicad/-/issues/12075 Fixes https://gitlab.com/kicad/code/kicad/-/issues/15826 --- common/dialogs/dialog_unit_entry.cpp | 3 +- include/board_design_settings.h | 5 + include/dialogs/dialog_unit_entry.h | 2 +- pcbnew/CMakeLists.txt | 8 +- pcbnew/board_design_settings.cpp | 68 + pcbnew/dialogs/dialog_board_setup.cpp | 20 +- pcbnew/dialogs/dialog_board_setup.h | 1 + pcbnew/dialogs/dialog_meander_properties.cpp | 90 + pcbnew/dialogs/dialog_meander_properties.h | 54 + .../dialog_meander_properties_base.cpp | 157 + .../dialog_meander_properties_base.fbp | 1227 ++++++ .../dialogs/dialog_meander_properties_base.h | 71 + pcbnew/dialogs/panel_setup_meanders.cpp | 110 + pcbnew/dialogs/panel_setup_meanders.h | 66 + pcbnew/dialogs/panel_setup_meanders_base.cpp | 408 ++ pcbnew/dialogs/panel_setup_meanders_base.fbp | 3782 +++++++++++++++++ pcbnew/dialogs/panel_setup_meanders_base.h | 104 + pcbnew/router/length_tuner_tool.cpp | 110 +- pcbnew/router/length_tuner_tool.h | 4 +- pcbnew/router/pns_meander_skew_placer.cpp | 8 +- pcbnew/router/pns_meander_skew_placer.h | 1 + pcbnew/toolbars_pcb_editor.cpp | 12 - pcbnew/tools/pcb_actions.cpp | 10 - pcbnew/tools/pcb_actions.h | 1 - 24 files changed, 6239 insertions(+), 83 deletions(-) create mode 100644 pcbnew/dialogs/dialog_meander_properties.cpp create mode 100644 pcbnew/dialogs/dialog_meander_properties.h create mode 100644 pcbnew/dialogs/dialog_meander_properties_base.cpp create mode 100644 pcbnew/dialogs/dialog_meander_properties_base.fbp create mode 100644 pcbnew/dialogs/dialog_meander_properties_base.h create mode 100644 pcbnew/dialogs/panel_setup_meanders.cpp create mode 100644 pcbnew/dialogs/panel_setup_meanders.h create mode 100644 pcbnew/dialogs/panel_setup_meanders_base.cpp create mode 100644 pcbnew/dialogs/panel_setup_meanders_base.fbp create mode 100644 pcbnew/dialogs/panel_setup_meanders_base.h diff --git a/common/dialogs/dialog_unit_entry.cpp b/common/dialogs/dialog_unit_entry.cpp index cda078b7c6..a2e56ffc83 100644 --- a/common/dialogs/dialog_unit_entry.cpp +++ b/common/dialogs/dialog_unit_entry.cpp @@ -34,6 +34,7 @@ WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxStr m_label->SetLabel( aLabel ); m_unit_binder.SetValue( aDefaultValue ); + SetInitialFocus( m_textCtrl ); SetupStandardButtons(); } @@ -56,10 +57,10 @@ WX_PT_ENTRY_DIALOG::WX_PT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& m_unit_binder_x.SetValue( aDefaultValue.x ); m_unit_binder_y.SetValue( aDefaultValue.y ); + SetInitialFocus( m_textCtrlX ); SetupStandardButtons(); } - VECTOR2I WX_PT_ENTRY_DIALOG::GetValue() { return VECTOR2I( m_unit_binder_x.GetIntValue(), m_unit_binder_y.GetIntValue() ); diff --git a/include/board_design_settings.h b/include/board_design_settings.h index d1410c94a7..d14958131b 100644 --- a/include/board_design_settings.h +++ b/include/board_design_settings.h @@ -35,6 +35,7 @@ #include #include #include +#include #define DEFAULT_SILK_LINE_WIDTH 0.1 @@ -644,6 +645,10 @@ public: */ TEARDROP_PARAMETERS_LIST m_TeardropParamsList; + PNS::MEANDER_SETTINGS m_singleTrackMeanderSettings; + PNS::MEANDER_SETTINGS m_diffPairMeanderSettings; + PNS::MEANDER_SETTINGS m_skewMeanderSettings; + VIATYPE m_CurrentViaType; ///< (VIA_BLIND_BURIED, VIA_THROUGH, VIA_MICROVIA) bool m_UseConnectedTrackWidth; // use width of existing track when creating a new, diff --git a/include/dialogs/dialog_unit_entry.h b/include/dialogs/dialog_unit_entry.h index 7ebf8d4923..6afe86f310 100644 --- a/include/dialogs/dialog_unit_entry.h +++ b/include/dialogs/dialog_unit_entry.h @@ -35,7 +35,7 @@ #include -#include "dialog_unit_entry_base.h" +#include "../../common/dialogs/dialog_unit_entry_base.h" class WX_UNIT_ENTRY_DIALOG : public WX_UNIT_ENTRY_DIALOG_BASE { diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 2b8fedbc72..e9c15fdd32 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -106,6 +106,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_rule_area_properties.cpp dialogs/dialog_rule_area_properties_base.cpp dialogs/dialog_layer_selection_base.cpp + dialogs/dialog_meander_properties.cpp + dialogs/dialog_meander_properties_base.cpp dialogs/dialog_move_exact.cpp dialogs/dialog_move_exact_base.cpp dialogs/dialog_net_inspector.cpp @@ -143,8 +145,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_unused_pad_layers_base.cpp dialogs/dialog_update_pcb.cpp dialogs/dialog_update_pcb_base.cpp - dialogs/panel_pcb_display_options.cpp - dialogs/panel_pcb_display_options_base.cpp + dialogs/panel_pcb_display_options.cpp + dialogs/panel_pcb_display_options_base.cpp dialogs/panel_edit_options.cpp dialogs/panel_edit_options_base.cpp dialogs/panel_fp_lib_table.cpp @@ -165,6 +167,8 @@ set( PCBNEW_DIALOGS dialogs/panel_setup_formatting_base.cpp dialogs/panel_setup_mask_and_paste.cpp dialogs/panel_setup_mask_and_paste_base.cpp + dialogs/panel_setup_meanders.cpp + dialogs/panel_setup_meanders_base.cpp dialogs/panel_setup_layers.cpp dialogs/panel_setup_layers_base.cpp dialogs/panel_setup_rules.cpp diff --git a/pcbnew/board_design_settings.cpp b/pcbnew/board_design_settings.cpp index 8cdeb04b1a..b73b99cab9 100644 --- a/pcbnew/board_design_settings.cpp +++ b/pcbnew/board_design_settings.cpp @@ -596,6 +596,74 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std: }, {} ) ); + m_params.emplace_back( new PARAM_LAMBDA( "meander_settings", + [&]() -> nlohmann::json + { + nlohmann::json js = {}; + + auto make_settings = + []( const PNS::MEANDER_SETTINGS& aSettings ) + { + nlohmann::json entry = {}; + + entry["min_amplitude"] = pcbIUScale.IUTomm( aSettings.m_minAmplitude ); + entry["max_amplitude"] = pcbIUScale.IUTomm( aSettings.m_maxAmplitude ); + entry["spacing"] = pcbIUScale.IUTomm( aSettings.m_spacing ); + entry["corner_style"] = aSettings.m_cornerStyle == PNS::MEANDER_STYLE_CHAMFER ? 0 : 1; + entry["corner_radius_percentage"] = aSettings.m_cornerRadiusPercentage; + entry["single_sided"] = aSettings.m_singleSided; + + return entry; + }; + + js["single_track_meander_defaults"] = make_settings( m_singleTrackMeanderSettings ); + js["diff_pair_meander_defaults"] = make_settings( m_diffPairMeanderSettings ); + js["skew_meander_defaults"] = make_settings( m_skewMeanderSettings ); + + return js; + }, + [&]( const nlohmann::json& aObj ) + { + auto read_settings = + []( const nlohmann::json& entry ) -> PNS::MEANDER_SETTINGS + { + PNS::MEANDER_SETTINGS settings; + + if( entry.contains( "min_amplitude" ) ) + settings.m_minAmplitude = pcbIUScale.mmToIU( entry["min_amplitude"].get() ); + + if( entry.contains( "max_amplitude" ) ) + settings.m_maxAmplitude = pcbIUScale.mmToIU( entry["max_amplitude"].get() ); + + if( entry.contains( "spacing" ) ) + settings.m_spacing = pcbIUScale.mmToIU( entry["spacing"].get() ); + + if( entry.contains( "corner_style" ) ) + { + settings.m_cornerStyle = entry["corner_style"] == 0 ? PNS::MEANDER_STYLE_CHAMFER + : PNS::MEANDER_STYLE_ROUND; + } + + if( entry.contains( "corner_radius_percentage" ) ) + settings.m_cornerRadiusPercentage = entry["corner_radius_percentage"].get(); + + if( entry.contains( "single_sided" ) ) + settings.m_singleSided = entry["single_sided"].get(); + + return settings; + }; + + if( aObj.contains( "single_track_meander_defaults" ) ) + m_singleTrackMeanderSettings = read_settings( aObj["single_track_meander_defaults"] ); + + if( aObj.contains( "diff_pair_meander_defaults" ) ) + m_diffPairMeanderSettings = read_settings( aObj["diff_pair_meander_defaults"] ); + + if( aObj.contains( "skew_meander_defaults" ) ) + m_skewMeanderSettings = read_settings( aObj["skew_meander_defaults"] ); + }, + {} ) ); + int minTextSize = pcbIUScale.MilsToIU( TEXT_MIN_SIZE_MILS ); int maxTextSize = pcbIUScale.MilsToIU( TEXT_MAX_SIZE_MILS ); int minStroke = 1; diff --git a/pcbnew/dialogs/dialog_board_setup.cpp b/pcbnew/dialogs/dialog_board_setup.cpp index dac5debc53..ab39c6461f 100644 --- a/pcbnew/dialogs/dialog_board_setup.cpp +++ b/pcbnew/dialogs/dialog_board_setup.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include <../board_stackup_manager/panel_board_stackup.h> @@ -32,6 +31,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -41,8 +44,6 @@ #include #include "dialog_board_setup.h" -#include "panel_setup_rules.h" -#include "panel_setup_teardrops.h" std::mutex DIALOG_BOARD_SETUP::g_Mutex; @@ -66,6 +67,7 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) : m_constraintsPage( 0 ), m_tracksAndViasPage( 0 ), m_teardropsPage( 0 ), + m_meandersPage( 0 ), m_netclassesPage( 0 ), m_severitiesPage( 0 ) @@ -158,6 +160,18 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) : return new PANEL_SETUP_TEARDROPS( aParent, m_frame ); }, _( "Teardrops" ) ); + m_meandersPage = m_treebook->GetPageCount(); + m_treebook->AddLazySubPage( + [this]( wxWindow* aParent ) -> wxWindow* + { + BOARD_DESIGN_SETTINGS& bds = m_frame->GetBoard()->GetDesignSettings(); + + return new PANEL_SETUP_MEANDERS( aParent, m_frame, + bds.m_singleTrackMeanderSettings, + bds.m_diffPairMeanderSettings, + bds.m_skewMeanderSettings ); + }, _( "Meanders" ) ); + m_netclassesPage = m_treebook->GetPageCount(); m_treebook->AddLazySubPage( [this]( wxWindow* aParent ) -> wxWindow* diff --git a/pcbnew/dialogs/dialog_board_setup.h b/pcbnew/dialogs/dialog_board_setup.h index d8de3390c5..cea6d242a5 100644 --- a/pcbnew/dialogs/dialog_board_setup.h +++ b/pcbnew/dialogs/dialog_board_setup.h @@ -68,6 +68,7 @@ private: size_t m_constraintsPage; size_t m_tracksAndViasPage; size_t m_teardropsPage; + size_t m_meandersPage; size_t m_netclassesPage; size_t m_severitiesPage; }; diff --git a/pcbnew/dialogs/dialog_meander_properties.cpp b/pcbnew/dialogs/dialog_meander_properties.cpp new file mode 100644 index 0000000000..df32b65bbc --- /dev/null +++ b/pcbnew/dialogs/dialog_meander_properties.cpp @@ -0,0 +1,90 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "dialog_meander_properties.h" +#include +#include +#include +#include + +DIALOG_MEANDER_PROPERTIES::DIALOG_MEANDER_PROPERTIES( EDA_DRAW_FRAME* aFrame, + PNS::MEANDER_SETTINGS& aSettings, + PNS::ROUTER_MODE aMeanderType ) : + DIALOG_MEANDER_PROPERTIES_BASE( aFrame ), + m_minA( aFrame, m_track_minALabel, m_minACtrl, m_minAUnits ), + m_maxA( aFrame, m_maxALabel, m_maxACtrl, m_maxAUnits ), + m_spacing( aFrame, m_spacingLabel, m_spacingCtrl, m_spacingUnits ), + m_r( aFrame, m_rLabel, m_rCtrl, m_rUnits ), + m_settings( aSettings ) +{ + m_r.SetUnits( EDA_UNITS::PERCENT ); + + switch( aMeanderType ) + { + case PNS::PNS_MODE_TUNE_SINGLE: + m_legend->SetBitmap( KiBitmap( BITMAPS::tune_single_track_length_legend ) ); + break; + + case PNS::PNS_MODE_TUNE_DIFF_PAIR: + m_legend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_length_legend ) ); + m_r.Enable( false ); + break; + + case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW: + m_legend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_skew_legend ) ); + break; + + default: + break; + } + + // Bitmap has a new size, so recalculate sizes + GetSizer()->SetSizeHints(this); + SetupStandardButtons(); + + GetSizer()->SetSizeHints(this); + Centre(); +} + + +bool DIALOG_MEANDER_PROPERTIES::TransferDataToWindow() +{ + m_minA.SetValue( m_settings.m_minAmplitude ); + m_maxA.SetValue( m_settings.m_maxAmplitude ); + m_spacing.SetValue( m_settings.m_spacing ); + m_cornerCtrl->SetSelection( m_settings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 ); + m_r.SetValue( m_settings.m_cornerRadiusPercentage ); + m_singleSided->SetValue( m_settings.m_singleSided ); + + return true; +} + + +bool DIALOG_MEANDER_PROPERTIES::TransferDataFromWindow() +{ + m_settings.m_minAmplitude = m_minA.GetIntValue(); + m_settings.m_maxAmplitude = m_maxA.GetIntValue(); + m_settings.m_spacing = m_spacing.GetIntValue(); + m_settings.m_cornerStyle = m_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND + : PNS::MEANDER_STYLE_CHAMFER; + m_settings.m_cornerRadiusPercentage = m_r.GetValue(); + m_settings.m_singleSided = m_singleSided->GetValue(); + + return true; +} diff --git a/pcbnew/dialogs/dialog_meander_properties.h b/pcbnew/dialogs/dialog_meander_properties.h new file mode 100644 index 0000000000..2d08237169 --- /dev/null +++ b/pcbnew/dialogs/dialog_meander_properties.h @@ -0,0 +1,54 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef DIALOG_MEANDER_PROPERTIES_H +#define DIALOG_MEANDER_PROPERTIES_H + +#include "dialog_meander_properties_base.h" + +#include + +#include + +namespace PNS { + +class MEANDER_SETTINGS; + +} + +class DIALOG_MEANDER_PROPERTIES : public DIALOG_MEANDER_PROPERTIES_BASE +{ +public: + DIALOG_MEANDER_PROPERTIES( EDA_DRAW_FRAME* aParent, PNS::MEANDER_SETTINGS& aSettings, + PNS::ROUTER_MODE aMeanderType ); + +private: + bool TransferDataToWindow() override; + bool TransferDataFromWindow() override; + +private: + UNIT_BINDER m_minA; + UNIT_BINDER m_maxA; + UNIT_BINDER m_spacing; + UNIT_BINDER m_r; + + PNS::MEANDER_SETTINGS& m_settings; +}; + +#endif // DIALOG_MEANDER_PROPERTIES_H diff --git a/pcbnew/dialogs/dialog_meander_properties_base.cpp b/pcbnew/dialogs/dialog_meander_properties_base.cpp new file mode 100644 index 0000000000..1eb966179a --- /dev/null +++ b/pcbnew/dialogs/dialog_meander_properties_base.cpp @@ -0,0 +1,157 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "widgets/text_ctrl_eval.h" + +#include "dialog_meander_properties_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_MEANDER_PROPERTIES_BASE::DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* singleTrackSizer; + singleTrackSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_legend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + singleTrackSizer->Add( m_legend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 ); + + wxFlexGridSizer* fgSizer31; + fgSizer31 = new wxFlexGridSizer( 0, 5, 5, 5 ); + fgSizer31->AddGrowableCol( 1 ); + fgSizer31->SetFlexibleDirection( wxBOTH ); + fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_track_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_minALabel->Wrap( -1 ); + fgSizer31->Add( m_track_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxHORIZONTAL ); + + m_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer8->Add( m_minACtrl, 1, 0, 5 ); + + m_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_minAUnits->Wrap( -1 ); + bSizer8->Add( m_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + fgSizer31->Add( bSizer8, 1, wxEXPAND, 5 ); + + m_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_maxALabel->Wrap( -1 ); + fgSizer31->Add( m_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); + + m_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer31->Add( m_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_maxAUnits->Wrap( -1 ); + fgSizer31->Add( m_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_spacingLabel->Wrap( -1 ); + fgSizer31->Add( m_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxHORIZONTAL ); + + m_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") ); + + bSizer9->Add( m_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_spacingUnits->Wrap( -1 ); + bSizer9->Add( m_spacingUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer31->Add( bSizer9, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 5, 1, wxEXPAND, 5 ); + + m_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerLabel->Wrap( -1 ); + fgSizer31->Add( m_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") }; + int m_cornerCtrlNChoices = sizeof( m_cornerCtrlChoices ) / sizeof( wxString ); + m_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerCtrlNChoices, m_cornerCtrlChoices, 0 ); + m_cornerCtrl->SetSelection( 0 ); + fgSizer31->Add( m_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rLabel->Wrap( -1 ); + fgSizer31->Add( m_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); + + m_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer31->Add( m_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rUnits->Wrap( -1 ); + fgSizer31->Add( m_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer31->Add( m_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + singleTrackSizer->Add( fgSizer31, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + + bMainSizer->Add( singleTrackSizer, 1, wxEXPAND|wxTOP, 5 ); + + m_stdButtons = new wxStdDialogButtonSizer(); + m_stdButtonsOK = new wxButton( this, wxID_OK ); + m_stdButtons->AddButton( m_stdButtonsOK ); + m_stdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_stdButtons->AddButton( m_stdButtonsCancel ); + m_stdButtons->Realize(); + + bMainSizer->Add( m_stdButtons, 0, wxEXPAND|wxALL, 5 ); + + + this->SetSizer( bMainSizer ); + this->Layout(); + bMainSizer->Fit( this ); +} + +DIALOG_MEANDER_PROPERTIES_BASE::~DIALOG_MEANDER_PROPERTIES_BASE() +{ +} diff --git a/pcbnew/dialogs/dialog_meander_properties_base.fbp b/pcbnew/dialogs/dialog_meander_properties_base.fbp new file mode 100644 index 0000000000..06911bd7c0 --- /dev/null +++ b/pcbnew/dialogs/dialog_meander_properties_base.fbp @@ -0,0 +1,1227 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + + UTF-8 + connect + dialog_meander_properties_base + 1000 + none + + + 1 + DIALOG_MEANDER_PROPERTIES_BASE + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + -1,-1 + DIALOG_MEANDER_PROPERTIES_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Meander Properties + + 0 + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP + 1 + + + singleTrackSizer + wxHORIZONTAL + none + + 15 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Resource; + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_legend + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 5 + wxBOTH + 1 + + 5 + + fgSizer31 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Amplitude (A) min: + 0 + + 0 + + + 0 + + 1 + m_track_minALabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + + bSizer8 + wxHORIZONTAL + none + + 5 + + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_minACtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_minAUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Max: + 0 + + 0 + + + 0 + + 1 + m_maxALabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_maxACtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_maxAUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Spacing (s): + 0 + + 0 + + + 0 + + 1 + m_spacingLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 1 + + + bSizer9 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_spacingCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_spacingUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 5 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Corner style: + 0 + + 0 + + + 0 + + 1 + m_cornerLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Chamfer" "Fillet" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_cornerCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Radius (r): + 0 + + 0 + + + 0 + + 1 + m_rLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_rCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_rUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Single-sided + + 0 + + + 0 + + 1 + m_singleSided + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_stdButtons + protected + + + + + + diff --git a/pcbnew/dialogs/dialog_meander_properties_base.h b/pcbnew/dialogs/dialog_meander_properties_base.h new file mode 100644 index 0000000000..00e17d0bc1 --- /dev/null +++ b/pcbnew/dialogs/dialog_meander_properties_base.h @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include +#include +#include +class TEXT_CTRL_EVAL; + +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_MEANDER_PROPERTIES_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_MEANDER_PROPERTIES_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxStaticBitmap* m_legend; + wxStaticText* m_track_minALabel; + wxTextCtrl* m_minACtrl; + wxStaticText* m_minAUnits; + wxStaticText* m_maxALabel; + wxTextCtrl* m_maxACtrl; + wxStaticText* m_maxAUnits; + wxStaticText* m_spacingLabel; + wxTextCtrl* m_spacingCtrl; + wxStaticText* m_spacingUnits; + wxStaticText* m_cornerLabel; + wxChoice* m_cornerCtrl; + wxStaticText* m_rLabel; + TEXT_CTRL_EVAL* m_rCtrl; + wxStaticText* m_rUnits; + wxCheckBox* m_singleSided; + wxStdDialogButtonSizer* m_stdButtons; + wxButton* m_stdButtonsOK; + wxButton* m_stdButtonsCancel; + + public: + + DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Meander Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + ~DIALOG_MEANDER_PROPERTIES_BASE(); + +}; + diff --git a/pcbnew/dialogs/panel_setup_meanders.cpp b/pcbnew/dialogs/panel_setup_meanders.cpp new file mode 100644 index 0000000000..5d948b3f45 --- /dev/null +++ b/pcbnew/dialogs/panel_setup_meanders.cpp @@ -0,0 +1,110 @@ +/* +* This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include +#include +#include +#include +#include + +PANEL_SETUP_MEANDERS::PANEL_SETUP_MEANDERS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame, + PNS::MEANDER_SETTINGS& aTrackSettings, + PNS::MEANDER_SETTINGS& aDiffPairSettings, + PNS::MEANDER_SETTINGS& aSkewSettings ) : + PANEL_SETUP_MEANDERS_BASE( aParent ), + m_track_minA( aFrame, m_track_minALabel, m_track_minACtrl, m_track_minAUnits ), + m_track_maxA( aFrame, m_track_maxALabel, m_track_maxACtrl, m_track_maxAUnits ), + m_track_spacing( aFrame, m_track_spacingLabel, m_track_spacingCtrl, m_track_spacingUnits ), + m_track_r( aFrame, m_track_rLabel, m_track_rCtrl, m_track_rUnits ), + m_dp_minA( aFrame, m_dp_minALabel, m_dp_minACtrl, m_dp_minAUnits ), + m_dp_maxA( aFrame, m_dp_maxALabel, m_dp_maxACtrl, m_dp_maxAUnits ), + m_dp_spacing( aFrame, m_dp_spacingLabel, m_dp_spacingCtrl, m_dp_spacingUnits ), + m_dp_r( aFrame, m_dp_rLabel, m_dp_rCtrl, m_dp_rUnits ), + m_skew_minA( aFrame, m_skew_minALabel, m_skew_minACtrl, m_skew_minAUnits ), + m_skew_maxA( aFrame, m_skew_maxALabel, m_skew_maxACtrl, m_skew_maxAUnits ), + m_skew_spacing( aFrame, m_skew_spacingLabel, m_skew_spacingCtrl, m_skew_spacingUnits ), + m_skew_r( aFrame, m_skew_rLabel, m_skew_rCtrl, m_skew_rUnits ), + m_trackSettings( aTrackSettings ), + m_dpSettings( aDiffPairSettings ), + m_skewSettings( aSkewSettings ) +{ + m_singleTrackLegend->SetBitmap( KiBitmap( BITMAPS::tune_single_track_length_legend ) ); + m_diffPairLegend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_length_legend ) ); + m_skewLegend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_skew_legend ) ); + + m_track_r.SetUnits( EDA_UNITS::PERCENT ); + m_dp_r.SetUnits( EDA_UNITS::PERCENT ); + m_skew_r.SetUnits( EDA_UNITS::PERCENT ); +} + + +bool PANEL_SETUP_MEANDERS::TransferDataToWindow() +{ + m_track_minA.SetValue( m_trackSettings.m_minAmplitude ); + m_track_maxA.SetValue( m_trackSettings.m_maxAmplitude ); + m_track_spacing.SetValue( m_trackSettings.m_spacing ); + m_track_cornerCtrl->SetSelection( m_trackSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 ); + m_track_r.SetValue( m_trackSettings.m_cornerRadiusPercentage ); + m_track_singleSided->SetValue( m_trackSettings.m_singleSided ); + + m_dp_minA.SetValue( m_dpSettings.m_minAmplitude ); + m_dp_maxA.SetValue( m_dpSettings.m_maxAmplitude ); + m_dp_spacing.SetValue( m_dpSettings.m_spacing ); + m_dp_cornerCtrl->SetSelection( m_dpSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 ); + m_dp_r.SetValue( 100 ); + m_dp_singleSided->SetValue( m_dpSettings.m_singleSided ); + + m_skew_minA.SetValue( m_skewSettings.m_minAmplitude ); + m_skew_maxA.SetValue( m_skewSettings.m_maxAmplitude ); + m_skew_spacing.SetValue( m_skewSettings.m_spacing ); + m_skew_cornerCtrl->SetSelection( m_skewSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 ); + m_skew_r.SetValue( m_skewSettings.m_cornerRadiusPercentage ); + + return true; +} + + +bool PANEL_SETUP_MEANDERS::TransferDataFromWindow() +{ + m_trackSettings.m_minAmplitude = m_track_minA.GetIntValue(); + m_trackSettings.m_maxAmplitude = m_track_maxA.GetIntValue(); + m_trackSettings.m_spacing = m_track_spacing.GetIntValue(); + m_trackSettings.m_cornerStyle = m_track_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND + : PNS::MEANDER_STYLE_CHAMFER; + m_trackSettings.m_cornerRadiusPercentage = m_track_r.GetValue(); + m_trackSettings.m_singleSided = m_track_singleSided->GetValue(); + + m_dpSettings.m_minAmplitude = m_dp_minA.GetIntValue(); + m_dpSettings.m_maxAmplitude = m_dp_maxA.GetIntValue(); + m_dpSettings.m_spacing = m_dp_spacing.GetIntValue(); + m_dpSettings.m_cornerStyle = m_dp_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND + : PNS::MEANDER_STYLE_CHAMFER; + // TODO: fix diff-pair meandering so we can use non-100% radii + m_dpSettings.m_cornerRadiusPercentage = 100; + m_dpSettings.m_singleSided = m_dp_singleSided->GetValue(); + + m_skewSettings.m_minAmplitude = m_skew_minA.GetIntValue(); + m_skewSettings.m_maxAmplitude = m_skew_maxA.GetIntValue(); + m_skewSettings.m_spacing = m_skew_spacing.GetIntValue(); + m_skewSettings.m_cornerStyle = m_skew_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND + : PNS::MEANDER_STYLE_CHAMFER; + m_skewSettings.m_cornerRadiusPercentage = m_skew_r.GetValue(); + + return true; +} diff --git a/pcbnew/dialogs/panel_setup_meanders.h b/pcbnew/dialogs/panel_setup_meanders.h new file mode 100644 index 0000000000..c78fe67778 --- /dev/null +++ b/pcbnew/dialogs/panel_setup_meanders.h @@ -0,0 +1,66 @@ +/* +* This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef PANEL_SETUP_MEANDERS_H +#define PANEL_SETUP_MEANDERS_H + +#include +#include + + +namespace PNS { + +class MEANDER_SETTINGS; + +} + +class PANEL_SETUP_MEANDERS : public PANEL_SETUP_MEANDERS_BASE +{ +public: + PANEL_SETUP_MEANDERS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame, + PNS::MEANDER_SETTINGS& aTrackSettings, + PNS::MEANDER_SETTINGS& aDiffPairSettings, + PNS::MEANDER_SETTINGS& aSkewSettings ); + +private: + bool TransferDataToWindow() override; + bool TransferDataFromWindow() override; + +private: + UNIT_BINDER m_track_minA; + UNIT_BINDER m_track_maxA; + UNIT_BINDER m_track_spacing; + UNIT_BINDER m_track_r; + + UNIT_BINDER m_dp_minA; + UNIT_BINDER m_dp_maxA; + UNIT_BINDER m_dp_spacing; + UNIT_BINDER m_dp_r; + + UNIT_BINDER m_skew_minA; + UNIT_BINDER m_skew_maxA; + UNIT_BINDER m_skew_spacing; + UNIT_BINDER m_skew_r; + + PNS::MEANDER_SETTINGS& m_trackSettings; + PNS::MEANDER_SETTINGS& m_dpSettings; + PNS::MEANDER_SETTINGS& m_skewSettings; +}; + +#endif // PANEL_SETUP_MEANDERS_H diff --git a/pcbnew/dialogs/panel_setup_meanders_base.cpp b/pcbnew/dialogs/panel_setup_meanders_base.cpp new file mode 100644 index 0000000000..56da665b4c --- /dev/null +++ b/pcbnew/dialogs/panel_setup_meanders_base.cpp @@ -0,0 +1,408 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "widgets/text_ctrl_eval.h" + +#include "panel_setup_meanders_base.h" + +/////////////////////////////////////////////////////////////////////////// + +PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) +{ + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + m_singleTrackLabel = new wxStaticText( this, wxID_ANY, _("Default properties for single-track meanders:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_singleTrackLabel->Wrap( -1 ); + bMainSizer->Add( m_singleTrackLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 10 ); + + wxBoxSizer* singleTrackSizer; + singleTrackSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_singleTrackLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + singleTrackSizer->Add( m_singleTrackLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 ); + + wxFlexGridSizer* fgSizer3; + fgSizer3 = new wxFlexGridSizer( 0, 5, 5, 5 ); + fgSizer3->AddGrowableCol( 1 ); + fgSizer3->SetFlexibleDirection( wxBOTH ); + fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_track_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_minALabel->Wrap( -1 ); + fgSizer3->Add( m_track_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxHORIZONTAL ); + + m_track_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer8->Add( m_track_minACtrl, 1, 0, 5 ); + + m_track_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_minAUnits->Wrap( -1 ); + bSizer8->Add( m_track_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + fgSizer3->Add( bSizer8, 1, wxEXPAND, 5 ); + + m_track_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_maxALabel->Wrap( -1 ); + fgSizer3->Add( m_track_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); + + m_track_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer3->Add( m_track_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_track_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_maxAUnits->Wrap( -1 ); + fgSizer3->Add( m_track_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_track_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_spacingLabel->Wrap( -1 ); + fgSizer3->Add( m_track_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxHORIZONTAL ); + + m_track_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_track_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") ); + + bSizer9->Add( m_track_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_track_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_spacingUnits->Wrap( -1 ); + bSizer9->Add( m_track_spacingUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer3->Add( bSizer9, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer3->Add( 0, 5, 1, wxEXPAND, 5 ); + + m_track_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_cornerLabel->Wrap( -1 ); + fgSizer3->Add( m_track_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_track_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") }; + int m_track_cornerCtrlNChoices = sizeof( m_track_cornerCtrlChoices ) / sizeof( wxString ); + m_track_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_track_cornerCtrlNChoices, m_track_cornerCtrlChoices, 0 ); + m_track_cornerCtrl->SetSelection( 0 ); + fgSizer3->Add( m_track_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_track_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_rLabel->Wrap( -1 ); + fgSizer3->Add( m_track_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); + + m_track_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer3->Add( m_track_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_track_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_track_rUnits->Wrap( -1 ); + fgSizer3->Add( m_track_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_track_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer3->Add( m_track_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + + singleTrackSizer->Add( fgSizer3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + + bMainSizer->Add( singleTrackSizer, 0, wxEXPAND|wxRIGHT, 5 ); + + + bMainSizer->Add( 0, 10, 0, wxEXPAND, 5 ); + + m_diffPairsLabel = new wxStaticText( this, wxID_ANY, _("Default properties for differential-pair meanders:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_diffPairsLabel->Wrap( -1 ); + bMainSizer->Add( m_diffPairsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 ); + + m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMainSizer->Add( m_staticline11, 0, wxEXPAND|wxBOTTOM, 10 ); + + wxBoxSizer* diffPairSizer; + diffPairSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_diffPairLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + diffPairSizer->Add( m_diffPairLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 ); + + wxFlexGridSizer* fgSizer32; + fgSizer32 = new wxFlexGridSizer( 0, 5, 5, 5 ); + fgSizer32->AddGrowableCol( 1 ); + fgSizer32->SetFlexibleDirection( wxBOTH ); + fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_dp_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_minALabel->Wrap( -1 ); + fgSizer32->Add( m_dp_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer81; + bSizer81 = new wxBoxSizer( wxHORIZONTAL ); + + m_dp_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer81->Add( m_dp_minACtrl, 1, 0, 5 ); + + m_dp_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_minAUnits->Wrap( -1 ); + bSizer81->Add( m_dp_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + fgSizer32->Add( bSizer81, 1, wxEXPAND, 5 ); + + m_dp_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_maxALabel->Wrap( -1 ); + fgSizer32->Add( m_dp_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); + + m_dp_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer32->Add( m_dp_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_dp_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_maxAUnits->Wrap( -1 ); + fgSizer32->Add( m_dp_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dp_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_spacingLabel->Wrap( -1 ); + fgSizer32->Add( m_dp_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer91; + bSizer91 = new wxBoxSizer( wxHORIZONTAL ); + + m_dp_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") ); + + bSizer91->Add( m_dp_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_dp_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_spacingUnits->Wrap( -1 ); + bSizer91->Add( m_dp_spacingUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + fgSizer32->Add( bSizer91, 1, wxEXPAND, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer32->Add( 0, 5, 1, wxEXPAND, 5 ); + + m_dp_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_cornerLabel->Wrap( -1 ); + fgSizer32->Add( m_dp_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_dp_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") }; + int m_dp_cornerCtrlNChoices = sizeof( m_dp_cornerCtrlChoices ) / sizeof( wxString ); + m_dp_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dp_cornerCtrlNChoices, m_dp_cornerCtrlChoices, 0 ); + m_dp_cornerCtrl->SetSelection( 0 ); + fgSizer32->Add( m_dp_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_dp_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_rLabel->Wrap( -1 ); + m_dp_rLabel->Enable( false ); + + fgSizer32->Add( m_dp_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); + + m_dp_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_rCtrl->Enable( false ); + + fgSizer32->Add( m_dp_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_dp_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dp_rUnits->Wrap( -1 ); + m_dp_rUnits->Enable( false ); + + fgSizer32->Add( m_dp_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_dp_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer32->Add( m_dp_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + + fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); + + + diffPairSizer->Add( fgSizer32, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + + bMainSizer->Add( diffPairSizer, 0, wxEXPAND|wxRIGHT, 5 ); + + + bMainSizer->Add( 0, 10, 0, wxEXPAND, 5 ); + + m_diffPairsLabel1 = new wxStaticText( this, wxID_ANY, _("Default properties for differential-pair skews:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_diffPairsLabel1->Wrap( -1 ); + bMainSizer->Add( m_diffPairsLabel1, 0, wxTOP|wxRIGHT|wxLEFT, 8 ); + + m_staticline111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMainSizer->Add( m_staticline111, 0, wxEXPAND|wxBOTTOM, 10 ); + + wxBoxSizer* skewSizer; + skewSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_skewLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + skewSizer->Add( m_skewLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 ); + + wxFlexGridSizer* fgSizer31; + fgSizer31 = new wxFlexGridSizer( 0, 5, 5, 5 ); + fgSizer31->AddGrowableCol( 1 ); + fgSizer31->SetFlexibleDirection( wxBOTH ); + fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_skew_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_minALabel->Wrap( -1 ); + fgSizer31->Add( m_skew_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer82; + bSizer82 = new wxBoxSizer( wxHORIZONTAL ); + + m_skew_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer82->Add( m_skew_minACtrl, 1, 0, 5 ); + + m_skew_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_minAUnits->Wrap( -1 ); + bSizer82->Add( m_skew_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + fgSizer31->Add( bSizer82, 1, wxEXPAND, 5 ); + + m_skew_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_maxALabel->Wrap( -1 ); + fgSizer31->Add( m_skew_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); + + m_skew_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer31->Add( m_skew_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_skew_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_maxAUnits->Wrap( -1 ); + fgSizer31->Add( m_skew_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_skew_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_spacingLabel->Wrap( -1 ); + fgSizer31->Add( m_skew_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer92; + bSizer92 = new wxBoxSizer( wxHORIZONTAL ); + + m_skew_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") ); + + bSizer92->Add( m_skew_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_skew_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_spacingUnits->Wrap( -1 ); + bSizer92->Add( m_skew_spacingUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + + fgSizer31->Add( bSizer92, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizer31->Add( 0, 5, 1, wxEXPAND, 5 ); + + m_skew_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_cornerLabel->Wrap( -1 ); + fgSizer31->Add( m_skew_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_skew_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") }; + int m_skew_cornerCtrlNChoices = sizeof( m_skew_cornerCtrlChoices ) / sizeof( wxString ); + m_skew_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_skew_cornerCtrlNChoices, m_skew_cornerCtrlChoices, 0 ); + m_skew_cornerCtrl->SetSelection( 0 ); + fgSizer31->Add( m_skew_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_skew_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_rLabel->Wrap( -1 ); + fgSizer31->Add( m_skew_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); + + m_skew_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer31->Add( m_skew_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + m_skew_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_skew_rUnits->Wrap( -1 ); + fgSizer31->Add( m_skew_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + skewSizer->Add( fgSizer31, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + + bMainSizer->Add( skewSizer, 0, wxEXPAND|wxRIGHT, 5 ); + + + this->SetSizer( bMainSizer ); + this->Layout(); + bMainSizer->Fit( this ); +} + +PANEL_SETUP_MEANDERS_BASE::~PANEL_SETUP_MEANDERS_BASE() +{ +} diff --git a/pcbnew/dialogs/panel_setup_meanders_base.fbp b/pcbnew/dialogs/panel_setup_meanders_base.fbp new file mode 100644 index 0000000000..9eaf09d56d --- /dev/null +++ b/pcbnew/dialogs/panel_setup_meanders_base.fbp @@ -0,0 +1,3782 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + + UTF-8 + connect + panel_setup_meanders_base + 1000 + none + + + 1 + PANEL_SETUP_MEANDERS_BASE + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + 1 + 1 + impl_virtual + + + 0 + wxID_ANY + + + PANEL_SETUP_MEANDERS_BASE + + -1,-1 + ; ; forward_declare + + 0 + + + wxTAB_TRAVERSAL + + + bMainSizer + wxVERTICAL + none + + 8 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default properties for single-track meanders: + 0 + + 0 + + + 0 + + 1 + m_singleTrackLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 10 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND|wxRIGHT + 0 + + + singleTrackSizer + wxHORIZONTAL + none + + 15 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Resource; + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_singleTrackLegend + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 5 + wxBOTH + 1 + + 5 + + fgSizer3 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Amplitude (A) min: + 0 + + 0 + + + 0 + + 1 + m_track_minALabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + + bSizer8 + wxHORIZONTAL + none + + 5 + + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_track_minACtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_track_minAUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Max: + 0 + + 0 + + + 0 + + 1 + m_track_maxALabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_track_maxACtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_track_maxAUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Spacing (s): + 0 + + 0 + + + 0 + + 1 + m_track_spacingLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 1 + + + bSizer9 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_track_spacingCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_track_spacingUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 5 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Corner style: + 0 + + 0 + + + 0 + + 1 + m_track_cornerLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Chamfer" "Fillet" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_track_cornerCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Radius (r): + 0 + + 0 + + + 0 + + 1 + m_track_rLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_track_rCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_track_rUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Single-sided + + 0 + + + 0 + + 1 + m_track_singleSided + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + + + + + 5 + wxEXPAND + 0 + + 10 + protected + 0 + + + + 8 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default properties for differential-pair meanders: + 0 + + 0 + + + 0 + + 1 + m_diffPairsLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 10 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline11 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND|wxRIGHT + 0 + + + diffPairSizer + wxHORIZONTAL + none + + 15 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Resource; + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_diffPairLegend + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 5 + wxBOTH + 1 + + 5 + + fgSizer32 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Amplitude (A) min: + 0 + + 0 + + + 0 + + 1 + m_dp_minALabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + + bSizer81 + wxHORIZONTAL + none + + 5 + + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_dp_minACtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_dp_minAUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Max: + 0 + + 0 + + + 0 + + 1 + m_dp_maxALabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_dp_maxACtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_dp_maxAUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Spacing (s): + 0 + + 0 + + + 0 + + 1 + m_dp_spacingLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + + bSizer91 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_dp_spacingCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_dp_spacingUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 5 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Corner style: + 0 + + 0 + + + 0 + + 1 + m_dp_cornerLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Chamfer" "Fillet" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_dp_cornerCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + Radius (r): + 0 + + 0 + + + 0 + + 1 + m_dp_rLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_dp_rCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_dp_rUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Single-sided + + 0 + + + 0 + + 1 + m_dp_singleSided + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + + + + + 5 + wxEXPAND + 0 + + 10 + protected + 0 + + + + 8 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default properties for differential-pair skews: + 0 + + 0 + + + 0 + + 1 + m_diffPairsLabel1 + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 10 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline111 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND|wxRIGHT + 0 + + + skewSizer + wxHORIZONTAL + none + + 15 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Resource; + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_skewLegend + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 5 + wxBOTH + 1 + + 5 + + fgSizer31 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Amplitude (A) min: + 0 + + 0 + + + 0 + + 1 + m_skew_minALabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + + bSizer82 + wxHORIZONTAL + none + + 5 + + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_skew_minACtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_skew_minAUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Max: + 0 + + 0 + + + 0 + + 1 + m_skew_maxALabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_skew_maxACtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_skew_maxAUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Spacing (s): + 0 + + 0 + + + 0 + + 1 + m_skew_spacingLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + + bSizer92 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_skew_spacingCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_skew_spacingUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 5 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Corner style: + 0 + + 0 + + + 0 + + 1 + m_skew_cornerLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Chamfer" "Fillet" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_skew_cornerCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Radius (r): + 0 + + 0 + + + 0 + + 1 + m_skew_rLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_skew_rCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_skew_rUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + diff --git a/pcbnew/dialogs/panel_setup_meanders_base.h b/pcbnew/dialogs/panel_setup_meanders_base.h new file mode 100644 index 0000000000..973f128b78 --- /dev/null +++ b/pcbnew/dialogs/panel_setup_meanders_base.h @@ -0,0 +1,104 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include +#include +#include +class TEXT_CTRL_EVAL; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class PANEL_SETUP_MEANDERS_BASE +/////////////////////////////////////////////////////////////////////////////// +class PANEL_SETUP_MEANDERS_BASE : public wxPanel +{ + private: + + protected: + wxStaticText* m_singleTrackLabel; + wxStaticLine* m_staticline1; + wxStaticBitmap* m_singleTrackLegend; + wxStaticText* m_track_minALabel; + wxTextCtrl* m_track_minACtrl; + wxStaticText* m_track_minAUnits; + wxStaticText* m_track_maxALabel; + wxTextCtrl* m_track_maxACtrl; + wxStaticText* m_track_maxAUnits; + wxStaticText* m_track_spacingLabel; + wxTextCtrl* m_track_spacingCtrl; + wxStaticText* m_track_spacingUnits; + wxStaticText* m_track_cornerLabel; + wxChoice* m_track_cornerCtrl; + wxStaticText* m_track_rLabel; + TEXT_CTRL_EVAL* m_track_rCtrl; + wxStaticText* m_track_rUnits; + wxCheckBox* m_track_singleSided; + wxStaticText* m_diffPairsLabel; + wxStaticLine* m_staticline11; + wxStaticBitmap* m_diffPairLegend; + wxStaticText* m_dp_minALabel; + wxTextCtrl* m_dp_minACtrl; + wxStaticText* m_dp_minAUnits; + wxStaticText* m_dp_maxALabel; + wxTextCtrl* m_dp_maxACtrl; + wxStaticText* m_dp_maxAUnits; + wxStaticText* m_dp_spacingLabel; + wxTextCtrl* m_dp_spacingCtrl; + wxStaticText* m_dp_spacingUnits; + wxStaticText* m_dp_cornerLabel; + wxChoice* m_dp_cornerCtrl; + wxStaticText* m_dp_rLabel; + TEXT_CTRL_EVAL* m_dp_rCtrl; + wxStaticText* m_dp_rUnits; + wxCheckBox* m_dp_singleSided; + wxStaticText* m_diffPairsLabel1; + wxStaticLine* m_staticline111; + wxStaticBitmap* m_skewLegend; + wxStaticText* m_skew_minALabel; + wxTextCtrl* m_skew_minACtrl; + wxStaticText* m_skew_minAUnits; + wxStaticText* m_skew_maxALabel; + wxTextCtrl* m_skew_maxACtrl; + wxStaticText* m_skew_maxAUnits; + wxStaticText* m_skew_spacingLabel; + wxTextCtrl* m_skew_spacingCtrl; + wxStaticText* m_skew_spacingUnits; + wxStaticText* m_skew_cornerLabel; + wxChoice* m_skew_cornerCtrl; + wxStaticText* m_skew_rLabel; + TEXT_CTRL_EVAL* m_skew_rCtrl; + wxStaticText* m_skew_rUnits; + + public: + + PANEL_SETUP_MEANDERS_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 ); + + ~PANEL_SETUP_MEANDERS_BASE(); + +}; + diff --git a/pcbnew/router/length_tuner_tool.cpp b/pcbnew/router/length_tuner_tool.cpp index be4979be83..b936b34be4 100644 --- a/pcbnew/router/length_tuner_tool.cpp +++ b/pcbnew/router/length_tuner_tool.cpp @@ -20,18 +20,19 @@ */ #include -#include +#include #include #include #include #include +#include +#include #include "pns_router.h" #include "pns_meander_placer.h" // fixme: move settings to separate header #include "pns_tune_status_popup.h" #include "length_tuner_tool.h" #include -#include using namespace KIGFX; @@ -100,6 +101,12 @@ bool LENGTH_TUNER_TOOL::Init() { m_inLengthTuner = false; + auto tuning = + [&]( const SELECTION& ) + { + return m_router->RoutingInProgress(); + }; + auto& menu = m_menu.GetMenu(); menu.SetTitle( _( "Length Tuner" ) ); @@ -110,11 +117,10 @@ bool LENGTH_TUNER_TOOL::Init() menu.AddSeparator(); - menu.AddItem( ACT_SpacingIncrease, SELECTION_CONDITIONS::ShowAlways ); - menu.AddItem( ACT_SpacingDecrease, SELECTION_CONDITIONS::ShowAlways ); - menu.AddItem( ACT_AmplIncrease, SELECTION_CONDITIONS::ShowAlways ); - menu.AddItem( ACT_AmplDecrease, SELECTION_CONDITIONS::ShowAlways ); - menu.AddItem( PCB_ACTIONS::lengthTunerSettingsDialog, SELECTION_CONDITIONS::ShowAlways ); + menu.AddItem( ACT_SpacingIncrease, tuning ); + menu.AddItem( ACT_SpacingDecrease, tuning ); + menu.AddItem( ACT_AmplIncrease, tuning ); + menu.AddItem( ACT_AmplDecrease, tuning ); return true; } @@ -162,9 +168,53 @@ void LENGTH_TUNER_TOOL::performTuning() return; } - auto placer = static_cast( m_router->Placer() ); + BOARD_DESIGN_SETTINGS& bds = board()->GetDesignSettings(); + PNS::MEANDER_PLACER_BASE* placer = static_cast( m_router->Placer() ); + PNS::MEANDER_SETTINGS* settings = nullptr; + + switch( m_lastTuneMode ) + { + case PNS::PNS_MODE_TUNE_SINGLE: settings = &bds.m_singleTrackMeanderSettings; break; + case PNS::PNS_MODE_TUNE_DIFF_PAIR: settings = &bds.m_diffPairMeanderSettings; break; + case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW: settings = &bds.m_skewMeanderSettings; break; + default: + wxFAIL_MSG( wxT( "Unsupported tuning mode." ) ); + m_router->StopRouting(); + highlightNets( false ); + return; + } + + if( m_lastTuneMode == PNS::PNS_MODE_TUNE_SINGLE + || m_lastTuneMode == PNS::PNS_MODE_TUNE_DIFF_PAIR ) + { + std::shared_ptr& drcEngine = bds.m_DRCEngine; + DRC_CONSTRAINT constraint; + + constraint = drcEngine->EvalRules( LENGTH_CONSTRAINT, m_startItem->Parent(), nullptr, + ToLAYER_ID( layer ) ); + + if( constraint.IsNull() ) + { + WX_UNIT_ENTRY_DIALOG dlg( frame(), _( "Length Tuning" ), _( "Target length:" ), + 100 * PCB_IU_PER_MM ); + + if( dlg.ShowModal() != wxID_OK ) + { + m_router->StopRouting(); + highlightNets( false ); + return; + } + + settings->m_targetLength = dlg.GetValue(); + } + else + { + settings->m_targetLength = constraint.GetValue().Opt(); + } + } + + placer->UpdateSettings( *settings ); - placer->UpdateSettings( m_savedMeanderSettings ); frame()->UndoRedoBlock( true ); VECTOR2I end = getViewControls()->GetMousePosition(); @@ -238,13 +288,6 @@ void LENGTH_TUNER_TOOL::performTuning() m_router->Move( end, nullptr ); updateStatusPopup( statusPopup ); } - else if( evt->IsAction( &PCB_ACTIONS::lengthTunerSettingsDialog ) ) - { - statusPopup.Hide(); - TOOL_EVENT dummy; - meanderSettingsDialog( dummy ); - statusPopup.Show(); - } // TODO: It'd be nice to be able to say "don't allow any non-trivial editing actions", // but we don't at present have that, so we just knock out some of the egregious ones. else if( ZONE_FILLER_TOOL::IsZoneFillAction( evt ) ) @@ -270,14 +313,9 @@ void LENGTH_TUNER_TOOL::performTuning() void LENGTH_TUNER_TOOL::setTransitions() { - Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneSingleTrace.MakeEvent() ); - Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneDiffPair.MakeEvent() ); - Go( &LENGTH_TUNER_TOOL::MainLoop, - PCB_ACTIONS::routerTuneDiffPairSkew.MakeEvent() ); - - // in case tool is inactive, otherwise the event is handled in the tool loop - Go( &LENGTH_TUNER_TOOL::meanderSettingsDialog, - PCB_ACTIONS::lengthTunerSettingsDialog.MakeEvent() ); + Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneSingleTrace.MakeEvent() ); + Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneDiffPair.MakeEvent() ); + Go( &LENGTH_TUNER_TOOL::MainLoop, PCB_ACTIONS::routerTuneDiffPairSkew.MakeEvent() ); } @@ -335,11 +373,6 @@ int LENGTH_TUNER_TOOL::MainLoop( const TOOL_EVENT& aEvent ) updateStartItem( *evt ); performTuning(); } - else if( evt->IsAction( &PCB_ACTIONS::lengthTunerSettingsDialog ) ) - { - TOOL_EVENT dummy; - meanderSettingsDialog( dummy ); - } else if( evt->IsClick( BUT_RIGHT ) ) { m_menu.ShowContextMenu( selection() ); @@ -357,22 +390,3 @@ int LENGTH_TUNER_TOOL::MainLoop( const TOOL_EVENT& aEvent ) frame()->PopTool( aEvent ); return 0; } - - -int LENGTH_TUNER_TOOL::meanderSettingsDialog( const TOOL_EVENT& aEvent ) -{ - PNS::MEANDER_PLACER_BASE* placer = static_cast( m_router->Placer() ); - - PNS::MEANDER_SETTINGS settings = placer ? placer->MeanderSettings() : m_savedMeanderSettings; - DIALOG_PNS_LENGTH_TUNING_SETTINGS settingsDlg( frame(), settings, m_lastTuneMode ); - - if( settingsDlg.ShowModal() == wxID_OK ) - { - if( placer ) - placer->UpdateSettings( settings ); - - m_savedMeanderSettings = settings; - } - - return 0; -} diff --git a/pcbnew/router/length_tuner_tool.h b/pcbnew/router/length_tuner_tool.h index 0ad0299f42..89abc59aa4 100644 --- a/pcbnew/router/length_tuner_tool.h +++ b/pcbnew/router/length_tuner_tool.h @@ -47,9 +47,7 @@ private: void performTuning(); void updateStatusPopup( PNS_TUNE_STATUS_POPUP& aPopup ); - int meanderSettingsDialog( const TOOL_EVENT& aEvent ); - - PNS::MEANDER_SETTINGS m_savedMeanderSettings; +private: PNS::ROUTER_MODE m_lastTuneMode; bool m_inLengthTuner; }; diff --git a/pcbnew/router/pns_meander_skew_placer.cpp b/pcbnew/router/pns_meander_skew_placer.cpp index d9b2c610fb..20d5b51b7d 100644 --- a/pcbnew/router/pns_meander_skew_placer.cpp +++ b/pcbnew/router/pns_meander_skew_placer.cpp @@ -108,14 +108,18 @@ bool MEANDER_SKEW_PLACER::Start( const VECTOR2I& aP, ITEM* aStartItem ) if ( m_originPair.NetP() == m_originLine.Net() ) { m_coupledLength = m_padToDieN + lineLength( m_tunedPathN, m_startPad_n, m_endPad_n ); + m_lastLength = m_padToDieP + lineLength( m_tunedPathP, m_startPad_p, m_endPad_p ); m_tunedPath = m_tunedPathP; } else { m_coupledLength = m_padToDieP + lineLength( m_tunedPathP, m_startPad_p, m_endPad_p ); + m_lastLength = m_padToDieN + lineLength( m_tunedPathN, m_startPad_n, m_endPad_n ); m_tunedPath = m_tunedPathN; } + m_targetSkew = (int) currentSkew(); + return true; } @@ -160,7 +164,7 @@ bool MEANDER_SKEW_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem ) } } - return doMove( aP, aEndItem, m_coupledLength + m_settings.m_targetSkew ); + return doMove( aP, aEndItem, m_coupledLength + m_targetSkew ); } @@ -185,7 +189,7 @@ const wxString MEANDER_SKEW_PLACER::TuningInfo( EDA_UNITS aUnits ) const status += EDA_UNIT_UTILS::UI::MessageTextFromValue( pcbIUScale, aUnits, m_lastLength - m_coupledLength ); status += wxT( "/" ); - status += EDA_UNIT_UTILS::UI::MessageTextFromValue( pcbIUScale, aUnits, m_settings.m_targetSkew ); + status += EDA_UNIT_UTILS::UI::MessageTextFromValue( pcbIUScale, aUnits, m_targetSkew ); return status; } diff --git a/pcbnew/router/pns_meander_skew_placer.h b/pcbnew/router/pns_meander_skew_placer.h index 1e0e213c2b..3eed4d7bae 100644 --- a/pcbnew/router/pns_meander_skew_placer.h +++ b/pcbnew/router/pns_meander_skew_placer.h @@ -62,6 +62,7 @@ private: long long int m_coupledLength; int m_padToDieP; int m_padToDieN; + int m_targetSkew; }; } diff --git a/pcbnew/toolbars_pcb_editor.cpp b/pcbnew/toolbars_pcb_editor.cpp index e29fdcce9e..f0f426864f 100644 --- a/pcbnew/toolbars_pcb_editor.cpp +++ b/pcbnew/toolbars_pcb_editor.cpp @@ -479,18 +479,6 @@ void PCB_EDIT_FRAME::ReCreateVToolbar() m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routeSingleTrack, makeRouteMenu() ); m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routeDiffPair, makeRouteMenu() ); - auto makeTuneMenu = - [&]() - { - std::unique_ptr tuneMenu = std::make_unique( false, selTool ); - tuneMenu->Add( PCB_ACTIONS::lengthTunerSettingsDialog ); - return tuneMenu; - }; - - m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routerTuneSingleTrace, makeTuneMenu() ); - m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routerTuneDiffPair, makeTuneMenu() ); - m_drawToolBar->AddToolContextMenu( PCB_ACTIONS::routerTuneDiffPairSkew, makeTuneMenu() ); - std::unique_ptr zoneMenu = std::make_unique( false, selTool ); zoneMenu->Add( PCB_ACTIONS::zoneFillAll ); zoneMenu->Add( PCB_ACTIONS::zoneUnfillAll ); diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index 5342dbdf19..9cf0951a84 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -2352,16 +2352,6 @@ TOOL_ACTION PCB_ACTIONS::dragFreeAngle( TOOL_ACTION_ARGS() // LENGTH_TUNER_TOOL // -TOOL_ACTION PCB_ACTIONS::lengthTunerSettingsDialog( TOOL_ACTION_ARGS() - .Name( "pcbnew.LengthTuner.Settings" ) - .Scope( AS_CONTEXT ) - .DefaultHotkey( MD_CTRL + 'L' ) - // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name. - .LegacyHotkeyName( "Length Tuning Settings (Modern Toolset only)" ) - .MenuText( _( "Length Tuning Settings..." ) ) - .Tooltip( _( "Sets the length tuning parameters for currently routed item." ) ) - .Icon( BITMAPS::router_len_tuner_setup ) ); - TOOL_ACTION PCB_ACTIONS::ddAppendBoard( TOOL_ACTION_ARGS() .Name( "pcbnew.Control.DdAppendBoard" ) .Scope( AS_GLOBAL ) ); diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index 79c12dda53..15e1e2e25f 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -257,7 +257,6 @@ public: /// Activation of the Push and Shove settings dialogs static TOOL_ACTION routerSettingsDialog; static TOOL_ACTION routerDiffPairDialog; - static TOOL_ACTION lengthTunerSettingsDialog; /// Actions to enable switching modes via hotkey assignments static TOOL_ACTION routerHighlightMode;