From e94449df81cb06af7c3a14ae8138557973fd5392 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 7 Jan 2025 11:54:48 +0000 Subject: [PATCH] Modernize board setup formatting panel. --- .../dialogs/panel_setup_formatting_base.cpp | 54 +- .../dialogs/panel_setup_formatting_base.fbp | 1482 ++++++++++------- pcbnew/dialogs/panel_setup_formatting_base.h | 9 +- 3 files changed, 896 insertions(+), 649 deletions(-) diff --git a/pcbnew/dialogs/panel_setup_formatting_base.cpp b/pcbnew/dialogs/panel_setup_formatting_base.cpp index 742391c6f3..3ab74e5eef 100644 --- a/pcbnew/dialogs/panel_setup_formatting_base.cpp +++ b/pcbnew/dialogs/panel_setup_formatting_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -17,58 +17,66 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi wxBoxSizer* bMargins; bMargins = new wxBoxSizer( wxVERTICAL ); - wxStaticBoxSizer* sbSizer6; - sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Dashed Lines") ), wxVERTICAL ); + m_dashedLinesLabel = new wxStaticText( this, wxID_ANY, _("Dashed Lines"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dashedLinesLabel->Wrap( -1 ); + bMargins->Add( m_dashedLinesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMargins->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 ); wxFlexGridSizer* fgSizer41; fgSizer41 = new wxFlexGridSizer( 0, 2, 5, 0 ); fgSizer41->SetFlexibleDirection( wxBOTH ); fgSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - dashLengthLabel = new wxStaticText( sbSizer6->GetStaticBox(), wxID_ANY, _("Dash length:"), wxDefaultPosition, wxDefaultSize, 0 ); + dashLengthLabel = new wxStaticText( this, wxID_ANY, _("Dash length:"), wxDefaultPosition, wxDefaultSize, 0 ); dashLengthLabel->Wrap( -1 ); fgSizer41->Add( dashLengthLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - m_dashLengthCtrl = new wxTextCtrl( sbSizer6->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_dashLengthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer41->Add( m_dashLengthCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 ); - gapLengthLabel = new wxStaticText( sbSizer6->GetStaticBox(), wxID_ANY, _("Gap length:"), wxDefaultPosition, wxDefaultSize, 0 ); + gapLengthLabel = new wxStaticText( this, wxID_ANY, _("Gap length:"), wxDefaultPosition, wxDefaultSize, 0 ); gapLengthLabel->Wrap( -1 ); fgSizer41->Add( gapLengthLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - m_gapLengthCtrl = new wxTextCtrl( sbSizer6->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_gapLengthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizer41->Add( m_gapLengthCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 ); - sbSizer6->Add( fgSizer41, 0, wxEXPAND|wxBOTTOM, 5 ); + bMargins->Add( fgSizer41, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_dashedLineHelp = new wxStaticText( sbSizer6->GetStaticBox(), wxID_ANY, _("Dash and dot lengths are ratios of the line width."), wxDefaultPosition, wxDefaultSize, 0 ); + m_dashedLineHelp = new wxStaticText( this, wxID_ANY, _("Dash and dot lengths are ratios of the line width."), wxDefaultPosition, wxDefaultSize, 0 ); m_dashedLineHelp->Wrap( -1 ); - sbSizer6->Add( m_dashedLineHelp, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 ); - - - bMargins->Add( sbSizer6, 0, wxEXPAND|wxALL, 5 ); + bMargins->Add( m_dashedLineHelp, 0, wxALL, 10 ); bMargins->Add( 0, 10, 0, wxEXPAND, 5 ); - wxStaticBoxSizer* sbSizer2; - sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("When Adding Footprints to Board") ), wxVERTICAL ); + m_staticText5 = new wxStaticText( this, wxID_ANY, _("When Adding Footprints to Board"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + bMargins->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 8 ); - m_styleFields = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Apply board defaults to footprint fields"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer2->Add( m_styleFields, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMargins->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM, 5 ); - m_styleText = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Apply board defaults to footprint text"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer2->Add( m_styleText, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); - m_styleShapes = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Apply board defaults to non-copper footprint shapes"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer2->Add( m_styleShapes, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_styleFields = new wxCheckBox( this, wxID_ANY, _("Apply board defaults to footprint fields"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_styleFields, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_styleText = new wxCheckBox( this, wxID_ANY, _("Apply board defaults to footprint text"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_styleText, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_styleShapes = new wxCheckBox( this, wxID_ANY, _("Apply board defaults to non-copper footprint shapes"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_styleShapes, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bMargins->Add( sbSizer2, 0, wxEXPAND|wxALL, 5 ); + bMargins->Add( bSizer3, 1, wxEXPAND|wxTOP|wxLEFT, 5 ); - bMainSizer->Add( bMargins, 1, wxEXPAND|wxTOP|wxRIGHT, 5 ); + bMainSizer->Add( bMargins, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); this->SetSizer( bMainSizer ); diff --git a/pcbnew/dialogs/panel_setup_formatting_base.fbp b/pcbnew/dialogs/panel_setup_formatting_base.fbp index 8305e69f83..bc5d55986e 100644 --- a/pcbnew/dialogs/panel_setup_formatting_base.fbp +++ b/pcbnew/dialogs/panel_setup_formatting_base.fbp @@ -1,633 +1,869 @@ - + - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - panel_setup_formatting_base - 1000 - none - - - 1 - PANEL_SETUP_FORMATTING_BASE - - . - - 1 - 1 - 1 - 1 - UI - 0 - 0 - 0 - - 0 - wxAUI_MGR_DEFAULT - - - 1 - 1 - impl_virtual - - - 0 - wxID_ANY - + + + C++ + + 1 + connect + none + + + 0 + 0 + res + UTF-8 + panel_setup_formatting_base + 1000 + 1 + 1 + UI + PANEL_SETUP_FORMATTING_BASE + . + 0 + source_name + 1 + 0 + source_name + + + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + 1 + 0 + 1 + impl_virtual + + + 0 + wxID_ANY + + + PANEL_SETUP_FORMATTING_BASE + + -1,-1 + ; ; forward_declare + + 0 + + + wxTAB_TRAVERSAL + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 1 + - PANEL_SETUP_FORMATTING_BASE - - -1,-1 - ; ; forward_declare - - 0 - - - wxTAB_TRAVERSAL - + bMargins + wxVERTICAL + none + + 8 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Dashed Lines + 0 + + 0 + + + 0 - bMainSizer + 1 + m_dashedLinesLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 2 + wxBOTH + + + 0 + + fgSizer41 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Dash length: + 0 + + 0 + + + 0 + + 1 + dashLengthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_dashLengthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Gap length: + 0 + + 0 + + + 0 + + 1 + gapLengthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_gapLengthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + 10 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Dash and dot lengths are ratios of the line width. + 0 + + 0 + + + 0 + + 1 + m_dashedLineHelp + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND + 0 + + 10 + protected + 0 + + + + 8 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + When Adding Footprints to Board + 0 + + 0 + + + 0 + + 1 + m_staticText5 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline2 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND|wxTOP|wxLEFT + 1 + + + bSizer3 wxVERTICAL none - - 5 - wxEXPAND|wxTOP|wxRIGHT - 1 - - - bMargins - wxVERTICAL - none - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - Dashed Lines - - sbSizer6 - wxVERTICAL - 1 - none - - 5 - wxEXPAND|wxBOTTOM - 0 - - 2 - wxBOTH - - - 0 - - fgSizer41 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 5 - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Dash length: - 0 - - 0 - - - 0 - - 1 - dashLengthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 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 - - 0 - - - - 0 - - 1 - m_dashLengthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Gap length: - 0 - - 0 - - - 0 - - 1 - gapLengthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 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 - - 0 - - - - 0 - - 1 - m_gapLengthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Dash and dot lengths are ratios of the line width. - 0 - - 0 - - - 0 - - 1 - m_dashedLineHelp - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - - - 5 - wxEXPAND - 0 - - 10 - protected - 0 - - - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - When Adding Footprints to Board - - sbSizer2 - wxVERTICAL - 1 - none - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Apply board defaults to footprint fields - - 0 - - - 0 - - 1 - m_styleFields - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Apply board defaults to footprint text - - 0 - - - 0 - - 1 - m_styleText - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Apply board defaults to non-copper footprint shapes - - 0 - - - 0 - - 1 - m_styleShapes - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Apply board defaults to footprint fields + + 0 + + + 0 + + 1 + m_styleFields + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Apply board defaults to footprint text + + 0 + + + 0 + + 1 + m_styleText + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Apply board defaults to non-copper footprint shapes + + 0 + + + 0 + + 1 + m_styleShapes + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + diff --git a/pcbnew/dialogs/panel_setup_formatting_base.h b/pcbnew/dialogs/panel_setup_formatting_base.h index 8319f61857..a48084aaea 100644 --- a/pcbnew/dialogs/panel_setup_formatting_base.h +++ b/pcbnew/dialogs/panel_setup_formatting_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -16,15 +16,14 @@ #include #include #include +#include #include #include -#include #include #include /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// /// Class PANEL_SETUP_FORMATTING_BASE /////////////////////////////////////////////////////////////////////////////// @@ -33,11 +32,15 @@ class PANEL_SETUP_FORMATTING_BASE : public wxPanel private: protected: + wxStaticText* m_dashedLinesLabel; + wxStaticLine* m_staticline1; wxStaticText* dashLengthLabel; wxTextCtrl* m_dashLengthCtrl; wxStaticText* gapLengthLabel; wxTextCtrl* m_gapLengthCtrl; wxStaticText* m_dashedLineHelp; + wxStaticText* m_staticText5; + wxStaticLine* m_staticline2; wxCheckBox* m_styleFields; wxCheckBox* m_styleText; wxCheckBox* m_styleShapes;