From cfb93920ed2641ae0733ccee44ff39817b52acf5 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 25 Aug 2024 20:17:47 -0600 Subject: [PATCH] ADDED: increment annotation. Pushes the ref des numbers for matching prefixes starting at a particular annotation. --- eeschema/CMakeLists.txt | 1 + eeschema/dialogs/dialog_annotate.cpp | 4 +- eeschema/dialogs/dialog_erc.cpp | 3 +- .../dialogs/dialog_increment_annotations.fbp | 507 ++++++++++++++++++ .../dialog_increment_annotations_base.cpp | 79 +++ .../dialog_increment_annotations_base.h | 54 ++ eeschema/menubar.cpp | 1 + eeschema/sch_edit_frame.cpp | 6 +- eeschema/sch_edit_frame.h | 8 +- eeschema/sch_reference_list.h | 2 +- eeschema/tools/ee_actions.cpp | 6 + eeschema/tools/ee_actions.h | 1 + eeschema/tools/sch_editor_control.cpp | 71 ++- eeschema/tools/sch_editor_control.h | 1 + 14 files changed, 724 insertions(+), 20 deletions(-) create mode 100644 eeschema/dialogs/dialog_increment_annotations.fbp create mode 100644 eeschema/dialogs/dialog_increment_annotations_base.cpp create mode 100644 eeschema/dialogs/dialog_increment_annotations_base.h diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 05fab939aa..ef3cd9be5f 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -113,6 +113,7 @@ set( EESCHEMA_DLGS dialogs/dialog_ibis_parser_reporter_base.cpp dialogs/dialog_image_properties.cpp dialogs/dialog_image_properties_base.cpp + dialogs/dialog_increment_annotations_base.cpp dialogs/dialog_junction_props.cpp dialogs/dialog_junction_props_base.cpp dialogs/dialog_label_properties.cpp diff --git a/eeschema/dialogs/dialog_annotate.cpp b/eeschema/dialogs/dialog_annotate.cpp index e242b9be0b..ab7027cb5c 100644 --- a/eeschema/dialogs/dialog_annotate.cpp +++ b/eeschema/dialogs/dialog_annotate.cpp @@ -294,9 +294,9 @@ int DIALOG_ANNOTATE::GetStartNumber() } -void SCH_EDIT_FRAME::OnAnnotate( wxCommandEvent& event ) +void SCH_EDIT_FRAME::OnAnnotate() { - DIALOG_ANNOTATE* dlg = static_cast ( wxWindow::FindWindowByName( DLG_WINDOW_NAME ) ); + DIALOG_ANNOTATE* dlg = static_cast( wxWindow::FindWindowByName( DLG_WINDOW_NAME ) ); if( !dlg ) { diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 94d09ddd69..80a05f30c0 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -382,8 +382,7 @@ void DIALOG_ERC::syncCheckboxes() void DIALOG_ERC::OnLinkClicked( wxHtmlLinkEvent& event ) { - wxCommandEvent dummy; - m_parent->OnAnnotate( dummy ); + m_parent->OnAnnotate(); } diff --git a/eeschema/dialogs/dialog_increment_annotations.fbp b/eeschema/dialogs/dialog_increment_annotations.fbp new file mode 100644 index 0000000000..14e9b23873 --- /dev/null +++ b/eeschema/dialogs/dialog_increment_annotations.fbp @@ -0,0 +1,507 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + dialog_increment_annotations_base + 1000 + none + + + 1 + dialog_increment_annotations + + . + + 1 + 1 + 1 + 1 + UI + 0 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_INCREMENT_ANNOTATIONS_BASE + + + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Increment Annotations From + + 0 + + + + + + bSizerMain + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + + bSizerTop + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 6 + + fgSizer31 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 6 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Start reference designator: + 0 + + 0 + + + 0 + + 1 + m_firstRefDesLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + The symbol name in library and also the default symbol value when loaded in the schematic. + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_FirstRefDes + 1 + + + public + 1 + + Resizable + 1 + -1,-1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Increment by: + 0 + + 0 + + + 0 + + 1 + m_incrementLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + 64 + + 0 + + 1 + + 0 + + 1 + m_Increment + 1 + + + public + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + + 0 + + 1 + + + + + + + + + 5 + wxEXPAND + 0 + + 10 + protected + 0 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Current sheet only + + 0 + + + 0 + + 1 + m_CurrentSheet + 1 + + + public + 1 + + Resizable + 1 + + wxRB_GROUP + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + All sheets + + 0 + + + 0 + + 1 + m_AllSheets + 1 + + + public + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer + protected + + + + + + diff --git a/eeschema/dialogs/dialog_increment_annotations_base.cpp b/eeschema/dialogs/dialog_increment_annotations_base.cpp new file mode 100644 index 0000000000..5229124e05 --- /dev/null +++ b/eeschema/dialogs/dialog_increment_annotations_base.cpp @@ -0,0 +1,79 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_increment_annotations_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_INCREMENT_ANNOTATIONS_BASE::DIALOG_INCREMENT_ANNOTATIONS_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* bSizerMain; + bSizerMain = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizerTop; + bSizerTop = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer31; + fgSizer31 = new wxFlexGridSizer( 0, 2, 6, 6 ); + fgSizer31->AddGrowableCol( 1 ); + fgSizer31->SetFlexibleDirection( wxBOTH ); + fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_firstRefDesLabel = new wxStaticText( this, wxID_ANY, _("Start reference designator:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_firstRefDesLabel->Wrap( -1 ); + m_firstRefDesLabel->SetToolTip( _("The symbol name in library and also the default\nsymbol value when loaded in the schematic.") ); + + fgSizer31->Add( m_firstRefDesLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_FirstRefDes = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + fgSizer31->Add( m_FirstRefDes, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_incrementLabel = new wxStaticText( this, wxID_ANY, _("Increment by:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_incrementLabel->Wrap( -1 ); + fgSizer31->Add( m_incrementLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_Increment = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 64, 0 ); + fgSizer31->Add( m_Increment, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + + bSizerTop->Add( fgSizer31, 1, wxALL|wxEXPAND, 5 ); + + + bSizerTop->Add( 0, 10, 0, wxEXPAND, 5 ); + + m_CurrentSheet = new wxRadioButton( this, wxID_ANY, _("Current sheet only"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_CurrentSheet->SetValue( true ); + bSizerTop->Add( m_CurrentSheet, 0, wxALL, 5 ); + + m_AllSheets = new wxRadioButton( this, wxID_ANY, _("All sheets"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerTop->Add( m_AllSheets, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + bSizerMain->Add( bSizerTop, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_sdbSizer = new wxStdDialogButtonSizer(); + m_sdbSizerOK = new wxButton( this, wxID_OK ); + m_sdbSizer->AddButton( m_sdbSizerOK ); + m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer->AddButton( m_sdbSizerCancel ); + m_sdbSizer->Realize(); + + bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 ); + + + this->SetSizer( bSizerMain ); + this->Layout(); + bSizerMain->Fit( this ); + + this->Centre( wxBOTH ); +} + +DIALOG_INCREMENT_ANNOTATIONS_BASE::~DIALOG_INCREMENT_ANNOTATIONS_BASE() +{ +} diff --git a/eeschema/dialogs/dialog_increment_annotations_base.h b/eeschema/dialogs/dialog_increment_annotations_base.h new file mode 100644 index 0000000000..37a03e7d05 --- /dev/null +++ b/eeschema/dialogs/dialog_increment_annotations_base.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_INCREMENT_ANNOTATIONS_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_INCREMENT_ANNOTATIONS_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxStaticText* m_firstRefDesLabel; + wxStaticText* m_incrementLabel; + wxStdDialogButtonSizer* m_sdbSizer; + wxButton* m_sdbSizerOK; + wxButton* m_sdbSizerCancel; + + public: + wxTextCtrl* m_FirstRefDes; + wxSpinCtrl* m_Increment; + wxRadioButton* m_CurrentSheet; + wxRadioButton* m_AllSheets; + + DIALOG_INCREMENT_ANNOTATIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Increment Annotations From"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + ~DIALOG_INCREMENT_ANNOTATIONS_BASE(); + +}; + diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 45a1825643..dbf7f98277 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -318,6 +318,7 @@ void SCH_EDIT_FRAME::doReCreateMenuBar() toolsMenu->AppendSeparator(); toolsMenu->Add( EE_ACTIONS::annotate ); + toolsMenu->Add( EE_ACTIONS::incrementAnnotations ); toolsMenu->AppendSeparator(); toolsMenu->Add( EE_ACTIONS::assignFootprints ); diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 211a3cdcf7..ba7a9fe238 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1135,7 +1135,7 @@ void SCH_EDIT_FRAME::OnModify() } -void SCH_EDIT_FRAME::OnUpdatePCB( wxCommandEvent& event ) +void SCH_EDIT_FRAME::OnUpdatePCB() { if( Kiface().IsSingle() ) { @@ -1356,7 +1356,7 @@ void SCH_EDIT_FRAME::LoadProject() } -void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event ) +void SCH_EDIT_FRAME::OnOpenPcbnew() { wxFileName kicad_board = Prj().AbsolutePath( Schematic().GetFileName() ); @@ -1409,7 +1409,7 @@ void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event ) } -void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event ) +void SCH_EDIT_FRAME::OnOpenCvpcb() { wxFileName fn = Prj().AbsolutePath( Schematic().GetFileName() ); fn.SetExt( FILEEXT::NetlistFileExtension ); diff --git a/eeschema/sch_edit_frame.h b/eeschema/sch_edit_frame.h index 379efb4a9c..e29959db74 100644 --- a/eeschema/sch_edit_frame.h +++ b/eeschema/sch_edit_frame.h @@ -528,10 +528,10 @@ public: */ bool TrimWire( SCH_COMMIT* aCommit, const VECTOR2I& aStart, const VECTOR2I& aEnd ); - void OnOpenPcbnew( wxCommandEvent& event ); - void OnOpenCvpcb( wxCommandEvent& event ); - void OnUpdatePCB( wxCommandEvent& event ); - void OnAnnotate( wxCommandEvent& event ); + void OnOpenPcbnew(); + void OnOpenCvpcb(); + void OnUpdatePCB(); + void OnAnnotate(); /** * Verify that \a aSheet will not cause a recursion error in \a aCurrentSheet. diff --git a/eeschema/sch_reference_list.h b/eeschema/sch_reference_list.h index 86d7314030..09f56a6f93 100644 --- a/eeschema/sch_reference_list.h +++ b/eeschema/sch_reference_list.h @@ -188,7 +188,7 @@ public: // To avoid a risk of duplicate, for power symbols the ref number is 0nnn instead of nnn. // Just because sometimes only power symbols are annotated - if( GetLibPart() && GetLibPart()->IsPower() ) + if( GetSymbol() && GetLibPart() && GetLibPart()->IsPower() ) ref = wxT( "0" ); return ref << m_numRef; diff --git a/eeschema/tools/ee_actions.cpp b/eeschema/tools/ee_actions.cpp index 739569571b..d3adc6828f 100644 --- a/eeschema/tools/ee_actions.cpp +++ b/eeschema/tools/ee_actions.cpp @@ -983,6 +983,12 @@ TOOL_ACTION EE_ACTIONS::annotate( TOOL_ACTION_ARGS() .Tooltip( _( "Fill in schematic symbol reference designators" ) ) .Icon( BITMAPS::annotate ) ); +TOOL_ACTION EE_ACTIONS::incrementAnnotations( TOOL_ACTION_ARGS() + .Name( "eeschema.EditorControl.incrementAnnotations" ) + .Scope( AS_GLOBAL ) + .FriendlyName( _( "Increment Annotations From..." ) ) + .Tooltip( _( "Increment a subset of reference designators starting at a particular symbol" ) ) ); + TOOL_ACTION EE_ACTIONS::schematicSetup( TOOL_ACTION_ARGS() .Name( "eeschema.EditorControl.schematicSetup" ) .Scope( AS_GLOBAL ) diff --git a/eeschema/tools/ee_actions.h b/eeschema/tools/ee_actions.h index acd975bd85..0ba2d4a6e1 100644 --- a/eeschema/tools/ee_actions.h +++ b/eeschema/tools/ee_actions.h @@ -150,6 +150,7 @@ public: static TOOL_ACTION showDatasheet; static TOOL_ACTION runERC; static TOOL_ACTION annotate; + static TOOL_ACTION incrementAnnotations; static TOOL_ACTION editSymbolFields; static TOOL_ACTION editSymbolLibraryLinks; static TOOL_ACTION symbolProperties; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 71e614975d..9d7600769d 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -2243,16 +2244,71 @@ int SCH_EDITOR_CONTROL::EditWithSymbolEditor( const TOOL_EVENT& aEvent ) int SCH_EDITOR_CONTROL::Annotate( const TOOL_EVENT& aEvent ) { - wxCommandEvent dummy; - m_frame->OnAnnotate( dummy ); + m_frame->OnAnnotate(); + return 0; +} + + +int SCH_EDITOR_CONTROL::IncrementAnnotations( const TOOL_EVENT& aEvent ) +{ + DIALOG_INCREMENT_ANNOTATIONS_BASE dlg( m_frame ); + + dlg.SetInitialFocus( dlg.m_FirstRefDes ); + + if( dlg.ShowModal() == wxID_OK ) + { + SCH_REFERENCE startRef; + startRef.SetRef( dlg.m_FirstRefDes->GetValue() ); + + if( startRef.IsSplitNeeded() ) + startRef.Split(); + else + return 0; + + int startNum = atoi( startRef.GetRefNumber() ); + + SCH_COMMIT commit( m_frame ); + SCHEMATIC* schematic = m_frame->m_schematic; + SCH_REFERENCE_LIST references; + + if( dlg.m_AllSheets->GetValue() ) + schematic->BuildSheetListSortedByPageNumbers().GetSymbols( references ); + else + schematic->CurrentSheet().GetSymbols( references ); + + references.SplitReferences(); + + for( SCH_REFERENCE& ref : references ) + { + if( ref.GetRef() == startRef.GetRef() ) + { + int num = atoi( ref.GetRefNumber() ); + + if( num >= startNum ) + { + const SCH_SHEET_PATH& sheet = ref.GetSheetPath(); + wxString fullRef = ref.GetRef(); + + num += dlg.m_Increment->GetValue(); + fullRef << num; + + commit.Modify( ref.GetSymbol(), sheet.LastScreen() ); + ref.GetSymbol()->SetRef( &sheet, From_UTF8( fullRef.c_str() ) ); + } + } + } + + if( !commit.Empty() ) + commit.Push( _( "Increment Annotations" ) ); + } + return 0; } int SCH_EDITOR_CONTROL::ShowCvpcb( const TOOL_EVENT& aEvent ) { - wxCommandEvent dummy; - m_frame->OnOpenCvpcb( dummy ); + m_frame->OnOpenCvpcb(); return 0; } @@ -2286,16 +2342,14 @@ int SCH_EDITOR_CONTROL::EditSymbolLibraryLinks( const TOOL_EVENT& aEvent ) int SCH_EDITOR_CONTROL::ShowPcbNew( const TOOL_EVENT& aEvent ) { - wxCommandEvent dummy; - m_frame->OnOpenPcbnew( dummy ); + m_frame->OnOpenPcbnew(); return 0; } int SCH_EDITOR_CONTROL::UpdatePCB( const TOOL_EVENT& aEvent ) { - wxCommandEvent dummy; - m_frame->OnUpdatePCB( dummy ); + m_frame->OnUpdatePCB(); return 0; } @@ -2739,6 +2793,7 @@ void SCH_EDITOR_CONTROL::setTransitions() Go( &SCH_EDITOR_CONTROL::ShowCvpcb, EE_ACTIONS::assignFootprints.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::ImportFPAssignments, EE_ACTIONS::importFPAssignments.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::Annotate, EE_ACTIONS::annotate.MakeEvent() ); + Go( &SCH_EDITOR_CONTROL::IncrementAnnotations, EE_ACTIONS::incrementAnnotations.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::EditSymbolFields, EE_ACTIONS::editSymbolFields.MakeEvent() ); Go( &SCH_EDITOR_CONTROL::EditSymbolLibraryLinks, EE_ACTIONS::editSymbolLibraryLinks.MakeEvent() ); diff --git a/eeschema/tools/sch_editor_control.h b/eeschema/tools/sch_editor_control.h index 16916ec3a4..eb1d698890 100644 --- a/eeschema/tools/sch_editor_control.h +++ b/eeschema/tools/sch_editor_control.h @@ -114,6 +114,7 @@ public: int EditWithSymbolEditor( const TOOL_EVENT& aEvent ); int ShowCvpcb( const TOOL_EVENT& aEvent ); int Annotate( const TOOL_EVENT& aEvent ); + int IncrementAnnotations( const TOOL_EVENT& aEvent ); int EditSymbolFields( const TOOL_EVENT& aEvent ); int EditSymbolLibraryLinks( const TOOL_EVENT& aEvent ); int ShowPcbNew( const TOOL_EVENT& aEvent );