From 2b24c09307aba0f40585240c71fd855702115fdf Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 6 Sep 2019 11:13:52 -0400 Subject: [PATCH] Pcbnew: minor netlist dialog layout fixes. --- pcbnew/dialogs/dialog_netlist_base.cpp | 98 ++++---- pcbnew/dialogs/dialog_netlist_base.fbp | 326 +++---------------------- pcbnew/dialogs/dialog_netlist_base.h | 24 +- 3 files changed, 93 insertions(+), 355 deletions(-) diff --git a/pcbnew/dialogs/dialog_netlist_base.cpp b/pcbnew/dialogs/dialog_netlist_base.cpp index f90d0dbdbf..5ea4437873 100644 --- a/pcbnew/dialogs/dialog_netlist_base.cpp +++ b/pcbnew/dialogs/dialog_netlist_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Aug 15 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -14,78 +14,78 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_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( wxDefaultSize, wxDefaultSize ); - + wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizerNetlistFilename; bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL ); - + wxStaticText* staticTextNetlistFile; staticTextNetlistFile = new wxStaticText( this, wxID_ANY, _("Netlist file:"), wxDefaultPosition, wxDefaultSize, 0 ); staticTextNetlistFile->Wrap( -1 ); bSizerNetlistFilename->Add( staticTextNetlistFile, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - + m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 ); - - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_browseButton->SetMinSize( wxSize( 30,28 ) ); - - bSizerNetlistFilename->Add( m_browseButton, 0, wxRIGHT|wxTOP, 2 ); - - - bMainSizer->Add( bSizerNetlistFilename, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 ); - + + bSizerNetlistFilename->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 ); + + + bMainSizer->Add( bSizerNetlistFilename, 0, wxALL|wxEXPAND, 5 ); + wxBoxSizer* bUpperSizer; bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxString m_matchByTimestampChoices[] = { _("Associate footprints by reference"), _("Associate footprints using \"tstamp\" fields") }; + + wxString m_matchByTimestampChoices[] = { _("Associate footprints by reference"), _("Associate footprints using time stamp field") }; int m_matchByTimestampNChoices = sizeof( m_matchByTimestampChoices ) / sizeof( wxString ); m_matchByTimestamp = new wxRadioBox( this, wxID_ANY, _("Match Method"), wxDefaultPosition, wxDefaultSize, m_matchByTimestampNChoices, m_matchByTimestampChoices, 1, wxRA_SPECIFY_COLS ); - m_matchByTimestamp->SetSelection( 0 ); + m_matchByTimestamp->SetSelection( 1 ); m_matchByTimestamp->SetToolTip( _("Select whether to update footprint references to match their currently-assigned symbols, or to re-assign footprints to symbols which match their current references.") ); - - bUpperSizer->Add( m_matchByTimestamp, 1, wxALIGN_TOP|wxEXPAND|wxTOP|wxRIGHT, 5 ); - + + bUpperSizer->Add( m_matchByTimestamp, 1, wxALIGN_TOP|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); + wxStaticBoxSizer* sbSizer1; sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); - + m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Update footprints"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer1->Add( m_cbUpdateFootprints, 0, wxBOTTOM, 5 ); - + m_cbDeleteShortingTracks = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete tracks shorting multiple nets"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer1->Add( m_cbDeleteShortingTracks, 0, wxBOTTOM, 5 ); - + m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete extra footprints"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer1->Add( m_cbDeleteExtraFootprints, 0, wxBOTTOM, 5 ); - + m_cbDeleteSinglePadNets = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete single-pad nets"), wxDefaultPosition, wxDefaultSize, 0 ); sbSizer1->Add( m_cbDeleteSinglePadNets, 0, wxBOTTOM, 5 ); - - - bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxLEFT, 5 ); - - - bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); - + + + bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); + + + bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + wxBoxSizer* bLowerSizer; bLowerSizer = new wxBoxSizer( wxVERTICAL ); - - bLowerSizer->SetMinSize( wxSize( 660,250 ) ); + + bLowerSizer->SetMinSize( wxSize( -1,250 ) ); m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); bLowerSizer->Add( m_MessageWindow, 1, wxEXPAND | wxALL, 5 ); - - - bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - + + + bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL ); - + m_buttonFPTest = new wxButton( this, ID_TEST_NETLIST, _("Test Footprints"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonFPTest->SetToolTip( _("Read the current netlist file and list missing and extra footprints") ); - - m_buttonsSizer->Add( m_buttonFPTest, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); - + + m_buttonsSizer->Add( m_buttonFPTest, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 ); + m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizer1->AddButton( m_sdbSizer1OK ); @@ -94,17 +94,17 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id, const m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbSizer1->Realize(); - + m_buttonsSizer->Add( m_sdbSizer1, 1, wxEXPAND, 5 ); - - - bMainSizer->Add( m_buttonsSizer, 0, wxALL|wxEXPAND, 5 ); - - + + + bMainSizer->Add( m_buttonsSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); + + this->SetSizer( bMainSizer ); this->Layout(); bMainSizer->Fit( this ); - + // Connect Events m_NetlistFilenameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_NETLIST_BASE::OnFilenameKillFocus ), NULL, this ); m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOpenNetlistClick ), NULL, this ); @@ -133,5 +133,5 @@ DIALOG_NETLIST_BASE::~DIALOG_NETLIST_BASE() m_buttonFPTest->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_BASE::OnUpdateUIValidNetlistFile ), NULL, this ); m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnCompileRatsnestClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnUpdatePCB ), NULL, this ); - + } diff --git a/pcbnew/dialogs/dialog_netlist_base.fbp b/pcbnew/dialogs/dialog_netlist_base.fbp index 7fd9bfea52..4bd8796320 100644 --- a/pcbnew/dialogs/dialog_netlist_base.fbp +++ b/pcbnew/dialogs/dialog_netlist_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,8 @@ dialog_netlist_base 1000 none + + 1 dialog_netlist_base @@ -24,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -52,50 +55,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bMainSizer wxVERTICAL none - 10 - wxEXPAND|wxLEFT|wxRIGHT|wxTOP + 5 + wxALL|wxEXPAND 0 @@ -135,6 +102,7 @@ 0 wxID_ANY Netlist file: + 0 0 @@ -160,34 +128,11 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxTOP + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT 1 1 @@ -247,38 +192,12 @@ - - - - - OnFilenameKillFocus - - - - - - - - - - - - - - - - - - - - - 2 - wxRIGHT|wxTOP + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -298,6 +217,7 @@ 1 1 + 0 0 @@ -311,9 +231,10 @@ 0 0 - wxID_ANY Browse + + 0 0 @@ -328,11 +249,12 @@ protected 1 + + Resizable - 1 - wxBU_AUTODRAW + ; forward_declare 0 @@ -344,35 +266,12 @@ OnOpenNetlistClick - - - - - - - - - - - - - - - - - - - - - - - - 10 + 5 wxEXPAND|wxRIGHT|wxLEFT 0 @@ -382,7 +281,7 @@ none 5 - wxALIGN_TOP|wxEXPAND|wxTOP|wxRIGHT + wxALIGN_TOP|wxEXPAND|wxLEFT|wxRIGHT|wxTOP 1 1 @@ -398,7 +297,7 @@ 1 0 - "Associate footprints by reference" "Associate footprints using \"tstamp\" fields" + "Associate footprints by reference" "Associate footprints using time stamp field" 1 1 @@ -430,7 +329,7 @@ 1 Resizable - 0 + 1 1 wxRA_SPECIFY_COLS @@ -444,35 +343,12 @@ - - - - - - - - - - - - - - - - - OnMatchChanged - - - - - - 5 - wxEXPAND|wxTOP|wxLEFT + wxEXPAND|wxLEFT|wxRIGHT|wxTOP 1 wxID_ANY @@ -482,7 +358,6 @@ wxVERTICAL 1 none - 5 wxBOTTOM @@ -545,30 +420,7 @@ - OnOptionChanged - - - - - - - - - - - - - - - - - - - - - - @@ -633,30 +485,7 @@ - OnOptionChanged - - - - - - - - - - - - - - - - - - - - - - @@ -721,30 +550,7 @@ - OnOptionChanged - - - - - - - - - - - - - - - - - - - - - - @@ -809,30 +615,7 @@ - OnOptionChanged - - - - - - - - - - - - - - - - - - - - - - @@ -841,10 +624,10 @@ 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT + wxEXPAND|wxLEFT|wxRIGHT|wxTOP 1 - 660,250 + -1,250 bLowerSizer wxVERTICAL none @@ -903,36 +686,13 @@ wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND + wxBOTTOM|wxEXPAND|wxLEFT|wxTOP 0 @@ -940,8 +700,8 @@ wxHORIZONTAL protected - 10 - wxEXPAND|wxRIGHT|wxLEFT + 5 + wxEXPAND|wxLEFT|wxRIGHT 0 1 @@ -954,25 +714,31 @@ + 1 0 1 1 + 0 0 + Dock 0 Left 1 1 + 0 0 ID_TEST_NETLIST Test Footprints + + 0 0 @@ -987,6 +753,8 @@ protected 1 + + Resizable 1 @@ -1002,28 +770,6 @@ OnTestFootprintsClick - - - - - - - - - - - - - - - - - - - - - - OnUpdateUIValidNetlistFile @@ -1044,13 +790,7 @@ m_sdbSizer1 protected OnCompileRatsnestClick - - - - OnUpdatePCB - - diff --git a/pcbnew/dialogs/dialog_netlist_base.h b/pcbnew/dialogs/dialog_netlist_base.h index 7706d65bb6..b8fca27588 100644 --- a/pcbnew/dialogs/dialog_netlist_base.h +++ b/pcbnew/dialogs/dialog_netlist_base.h @@ -1,12 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Aug 15 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOG_NETLIST_BASE_H__ -#define __DIALOG_NETLIST_BASE_H__ +#pragma once #include #include @@ -21,10 +20,10 @@ class WX_HTML_REPORT_PANEL; #include #include #include +#include #include #include #include -#include #include #include #include @@ -41,13 +40,13 @@ class WX_HTML_REPORT_PANEL; class DIALOG_NETLIST_BASE : public DIALOG_SHIM { private: - + protected: enum { ID_TEST_NETLIST = 1000 }; - + wxTextCtrl* m_NetlistFilenameCtrl; wxBitmapButton* m_browseButton; wxRadioBox* m_matchByTimestamp; @@ -62,7 +61,7 @@ class DIALOG_NETLIST_BASE : public DIALOG_SHIM wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1Apply; wxButton* m_sdbSizer1Cancel; - + // Virtual event handlers, overide them in your derived class virtual void OnFilenameKillFocus( wxFocusEvent& event ) { event.Skip(); } virtual void OnOpenNetlistClick( wxCommandEvent& event ) { event.Skip(); } @@ -72,13 +71,12 @@ class DIALOG_NETLIST_BASE : public DIALOG_SHIM virtual void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnCompileRatsnestClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdatePCB( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Import Netlist"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Import Netlist"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_NETLIST_BASE(); - + }; -#endif //__DIALOG_NETLIST_BASE_H__