diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index e57c45f419..b96b93d08a 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -196,6 +196,7 @@ set( COMMON_WIDGET_SRCS widgets/search_pane_base.cpp widgets/search_pane_tab.cpp widgets/split_button.cpp + widgets/std_bitmap_button.cpp widgets/stepped_slider.cpp widgets/text_ctrl_eval.cpp widgets/ui_common.cpp diff --git a/common/dialogs/dialog_configure_paths.cpp b/common/dialogs/dialog_configure_paths.cpp index 1380f7293c..480bc32b69 100644 --- a/common/dialogs/dialog_configure_paths.cpp +++ b/common/dialogs/dialog_configure_paths.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KICAD, a free EDA CAD application. * * Copyright (C) 2015 Wayne Stambaugh - * Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2015-2022 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 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/common/dialogs/dialog_configure_paths_base.cpp b/common/dialogs/dialog_configure_paths_base.cpp index cad4e2017b..a63c73ad08 100644 --- a/common/dialogs/dialog_configure_paths_base.cpp +++ b/common/dialogs/dialog_configure_paths_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_configure_paths_base.h" @@ -56,13 +57,13 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi wxBoxSizer* bSizerEnvVarBtns; bSizerEnvVarBtns = new wxBoxSizer( wxHORIZONTAL ); - m_btnAddEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_btnAddEnvVar = new STD_BITMAP_BUTTON( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizerEnvVarBtns->Add( m_btnAddEnvVar, 0, wxBOTTOM|wxLEFT, 5 ); bSizerEnvVarBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_btnDeleteEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_btnDeleteEnvVar = new STD_BITMAP_BUTTON( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizerEnvVarBtns->Add( m_btnDeleteEnvVar, 0, wxBOTTOM, 5 ); diff --git a/common/dialogs/dialog_configure_paths_base.fbp b/common/dialogs/dialog_configure_paths_base.fbp index 9fa11c52b2..1d17375c0b 100644 --- a/common/dialogs/dialog_configure_paths_base.fbp +++ b/common/dialogs/dialog_configure_paths_base.fbp @@ -233,7 +233,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -317,7 +317,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/common/dialogs/dialog_configure_paths_base.h b/common/dialogs/dialog_configure_paths_base.h index 6ab5ae66ea..7828bc293e 100644 --- a/common/dialogs/dialog_configure_paths_base.h +++ b/common/dialogs/dialog_configure_paths_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include "dialog_shim.h" @@ -40,8 +41,8 @@ class DIALOG_CONFIGURE_PATHS_BASE : public DIALOG_SHIM protected: WX_GRID* m_EnvVars; - wxBitmapButton* m_btnAddEnvVar; - wxBitmapButton* m_btnDeleteEnvVar; + STD_BITMAP_BUTTON* m_btnAddEnvVar; + STD_BITMAP_BUTTON* m_btnDeleteEnvVar; wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; diff --git a/common/dialogs/dialog_migrate_settings.cpp b/common/dialogs/dialog_migrate_settings.cpp index bdcb4d8b58..be943a4024 100644 --- a/common/dialogs/dialog_migrate_settings.cpp +++ b/common/dialogs/dialog_migrate_settings.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2020 Jon Evans - * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2022 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 @@ -21,6 +21,7 @@ #include #include #include +#include #include diff --git a/common/dialogs/dialog_migrate_settings_base.cpp b/common/dialogs/dialog_migrate_settings_base.cpp index 9602a2997e..7537dcd2a4 100644 --- a/common/dialogs/dialog_migrate_settings_base.cpp +++ b/common/dialogs/dialog_migrate_settings_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 9 2019) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_migrate_settings_base.h" /////////////////////////////////////////////////////////////////////////// @@ -20,7 +22,7 @@ DIALOG_MIGRATE_SETTINGS_BASE::DIALOG_MIGRATE_SETTINGS_BASE( wxWindow* parent, wx m_lblWelcome = new wxStaticText( this, wxID_ANY, _("Welcome to KiCad %s!"), wxDefaultPosition, wxDefaultSize, 0 ); m_lblWelcome->Wrap( -1 ); - m_lblWelcome->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + m_lblWelcome->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); bSizer6->Add( m_lblWelcome, 0, wxALL|wxEXPAND, 5 ); @@ -45,7 +47,7 @@ DIALOG_MIGRATE_SETTINGS_BASE::DIALOG_MIGRATE_SETTINGS_BASE( wxWindow* parent, wx bSizer5->Add( m_cbPath, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_btnCustomPath = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_btnCustomPath = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_btnCustomPath->SetToolTip( _("Choose a different path") ); bSizer5->Add( m_btnCustomPath, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); diff --git a/common/dialogs/dialog_migrate_settings_base.fbp b/common/dialogs/dialog_migrate_settings_base.fbp index 11235e2f78..331029757c 100644 --- a/common/dialogs/dialog_migrate_settings_base.fbp +++ b/common/dialogs/dialog_migrate_settings_base.fbp @@ -1,6 +1,6 @@ - + ; C++ @@ -52,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h; forward_declare Configure KiCad Settings Path + 0 @@ -366,6 +367,7 @@ + 0 @@ -413,7 +415,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Choose a different path diff --git a/common/dialogs/dialog_migrate_settings_base.h b/common/dialogs/dialog_migrate_settings_base.h index 6c8073c504..75087aee82 100644 --- a/common/dialogs/dialog_migrate_settings_base.h +++ b/common/dialogs/dialog_migrate_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 9 2019) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "dialog_shim.h" #include #include @@ -45,7 +47,7 @@ class DIALOG_MIGRATE_SETTINGS_BASE : public DIALOG_SHIM wxStaticText* m_staticText2; wxRadioButton* m_btnPrevVer; wxComboBox* m_cbPath; - wxBitmapButton* m_btnCustomPath; + STD_BITMAP_BUTTON* m_btnCustomPath; wxStaticText* m_lblPathError; wxCheckBox* m_cbCopyLibraryTables; wxRadioButton* m_btnUseDefaults; @@ -65,6 +67,7 @@ class DIALOG_MIGRATE_SETTINGS_BASE : public DIALOG_SHIM public: DIALOG_MIGRATE_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure KiCad Settings Path"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION ); + ~DIALOG_MIGRATE_SETTINGS_BASE(); }; diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 0c8239eb54..3bb1fe774d 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2021-2022 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 @@ -32,12 +32,12 @@ #include #include // for KiROUND, Clamp #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/common/dialogs/dialog_page_settings_base.cpp b/common/dialogs/dialog_page_settings_base.cpp index 6aa3705efb..ff68e6497d 100644 --- a/common/dialogs/dialog_page_settings_base.cpp +++ b/common/dialogs/dialog_page_settings_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_page_settings_base.h" /////////////////////////////////////////////////////////////////////////// @@ -157,8 +159,8 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind m_textCtrlFilePicker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); bSizerfileSelection->Add( m_textCtrlFilePicker, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizerfileSelection->Add( m_browseButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizerfileSelection->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); bSizerFilename->Add( bSizerfileSelection, 1, wxEXPAND, 5 ); diff --git a/common/dialogs/dialog_page_settings_base.fbp b/common/dialogs/dialog_page_settings_base.fbp index b878e1a19e..87d686dbe7 100644 --- a/common/dialogs/dialog_page_settings_base.fbp +++ b/common/dialogs/dialog_page_settings_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_page_settings_base 1000 none + 1 dialog_page_settings_base @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Page Settings + 0 @@ -1456,7 +1459,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -1467,6 +1470,7 @@ + 0 @@ -1514,7 +1518,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -1967,6 +1971,7 @@ + 0 diff --git a/common/dialogs/dialog_page_settings_base.h b/common/dialogs/dialog_page_settings_base.h index 107079181c..bc42aedb21 100644 --- a/common/dialogs/dialog_page_settings_base.h +++ b/common/dialogs/dialog_page_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "dialog_shim.h" #include #include @@ -65,7 +67,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM wxStaticLine* m_staticline4; wxStaticText* m_staticText30; wxTextCtrl* m_textCtrlFilePicker; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxStaticText* m_staticTextTitleBlock; wxStaticLine* m_staticline3; wxStaticText* m_TextSheetCount; @@ -143,6 +145,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM public: DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Page Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_PAGES_SETTINGS_BASE(); }; diff --git a/common/dialogs/panel_common_settings.cpp b/common/dialogs/panel_common_settings.cpp index 5fad4edafe..b70fb051b2 100644 --- a/common/dialogs/panel_common_settings.cpp +++ b/common/dialogs/panel_common_settings.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2018-2022 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 @@ -34,6 +34,7 @@ #include #include #include +#include #include /* diff --git a/common/dialogs/panel_common_settings_base.cpp b/common/dialogs/panel_common_settings_base.cpp index 20b74aa9e4..982cc482ed 100644 --- a/common/dialogs/panel_common_settings_base.cpp +++ b/common/dialogs/panel_common_settings_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "panel_common_settings_base.h" /////////////////////////////////////////////////////////////////////////// @@ -69,9 +71,9 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind m_textEditorPath = new wxTextCtrl( sizerHelperApps->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textEditorPath->SetMinSize( wxSize( 280,-1 ) ); - bSizer61->Add( m_textEditorPath, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizer61->Add( m_textEditorPath, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_textEditorBtn = new wxBitmapButton( sizerHelperApps->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_textEditorBtn = new STD_BITMAP_BUTTON( sizerHelperApps->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer61->Add( m_textEditorBtn, 0, wxALIGN_CENTER_VERTICAL, 5 ); @@ -98,9 +100,9 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind m_PDFViewerPath = new wxTextCtrl( sizerHelperApps->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_PDFViewerPath->SetMinSize( wxSize( 280,-1 ) ); - bSizer7->Add( m_PDFViewerPath, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + bSizer7->Add( m_PDFViewerPath, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_pdfViewerBtn = new wxBitmapButton( sizerHelperApps->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_pdfViewerBtn = new STD_BITMAP_BUTTON( sizerHelperApps->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer7->Add( m_pdfViewerBtn, 0, wxALIGN_CENTER_VERTICAL, 5 ); diff --git a/common/dialogs/panel_common_settings_base.fbp b/common/dialogs/panel_common_settings_base.fbp index 0650316a1c..2c3a849e7e 100644 --- a/common/dialogs/panel_common_settings_base.fbp +++ b/common/dialogs/panel_common_settings_base.fbp @@ -443,7 +443,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT + wxALIGN_CENTER_VERTICAL 1 1 @@ -566,7 +566,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -743,7 +743,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxLEFT 1 1 @@ -866,7 +866,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/common/dialogs/panel_common_settings_base.h b/common/dialogs/panel_common_settings_base.h index 6bb670674a..04608d8fec 100644 --- a/common/dialogs/panel_common_settings_base.h +++ b/common/dialogs/panel_common_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "widgets/resettable_panel.h" #include #include @@ -46,11 +48,11 @@ class PANEL_COMMON_SETTINGS_BASE : public RESETTABLE_PANEL wxStaticText* m_antialiasingFallbackLabel; wxChoice* m_antialiasingFallback; wxTextCtrl* m_textEditorPath; - wxBitmapButton* m_textEditorBtn; + STD_BITMAP_BUTTON* m_textEditorBtn; wxRadioButton* m_defaultPDFViewer; wxRadioButton* m_otherPDFViewer; wxTextCtrl* m_PDFViewerPath; - wxBitmapButton* m_pdfViewerBtn; + STD_BITMAP_BUTTON* m_pdfViewerBtn; wxStaticBoxSizer* m_sbUserInterface; wxGridBagSizer* m_gbUserInterface; wxCheckBox* m_checkBoxIconsInMenus; diff --git a/common/dialogs/panel_setup_netclasses.cpp b/common/dialogs/panel_setup_netclasses.cpp index c4dc74f7c3..257c8a3322 100644 --- a/common/dialogs/panel_setup_netclasses.cpp +++ b/common/dialogs/panel_setup_netclasses.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/common/dialogs/panel_setup_netclasses_base.cpp b/common/dialogs/panel_setup_netclasses_base.cpp index 5bf794ec50..f6bd5e5a12 100644 --- a/common/dialogs/panel_setup_netclasses_base.cpp +++ b/common/dialogs/panel_setup_netclasses_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "widgets/wx_html_report_box.h" @@ -70,13 +71,13 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi wxBoxSizer* buttonBoxSizer; buttonBoxSizer = new wxBoxSizer( wxHORIZONTAL ); - m_addButton = new wxBitmapButton( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_addButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); buttonBoxSizer->Add( m_addButton, 0, wxBOTTOM|wxLEFT, 2 ); buttonBoxSizer->Add( 5, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_removeButton = new wxBitmapButton( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_removeButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); buttonBoxSizer->Add( m_removeButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -149,13 +150,13 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi wxBoxSizer* buttonBoxSizer1; buttonBoxSizer1 = new wxBoxSizer( wxHORIZONTAL ); - m_addAssignmentButton = new wxBitmapButton( m_membershipPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_addAssignmentButton = new STD_BITMAP_BUTTON( m_membershipPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); buttonBoxSizer1->Add( m_addAssignmentButton, 0, 0, 2 ); buttonBoxSizer1->Add( 5, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_removeAssignmentButton = new wxBitmapButton( m_membershipPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_removeAssignmentButton = new STD_BITMAP_BUTTON( m_membershipPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); buttonBoxSizer1->Add( m_removeAssignmentButton, 0, wxRIGHT|wxLEFT, 5 ); diff --git a/common/dialogs/panel_setup_netclasses_base.fbp b/common/dialogs/panel_setup_netclasses_base.fbp index 56dbe2204c..9a94b7b529 100644 --- a/common/dialogs/panel_setup_netclasses_base.fbp +++ b/common/dialogs/panel_setup_netclasses_base.fbp @@ -344,7 +344,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -428,7 +428,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -876,7 +876,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -960,7 +960,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/common/dialogs/panel_setup_netclasses_base.h b/common/dialogs/panel_setup_netclasses_base.h index 8dbe66510b..3ea5903758 100644 --- a/common/dialogs/panel_setup_netclasses_base.h +++ b/common/dialogs/panel_setup_netclasses_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; class WX_HTML_REPORT_BOX; @@ -43,15 +44,15 @@ class PANEL_SETUP_NETCLASSES_BASE : public wxPanel wxSplitterWindow* m_splitter; wxPanel* m_netclassesPane; WX_GRID* m_netclassGrid; - wxBitmapButton* m_addButton; - wxBitmapButton* m_removeButton; + STD_BITMAP_BUTTON* m_addButton; + STD_BITMAP_BUTTON* m_removeButton; wxStaticText* m_colorDefaultHelpText; wxPanel* m_membershipPane; wxStaticText* m_staticText5; WX_GRID* m_assignmentGrid; WX_HTML_REPORT_BOX* m_matchingNets; - wxBitmapButton* m_addAssignmentButton; - wxBitmapButton* m_removeAssignmentButton; + STD_BITMAP_BUTTON* m_addAssignmentButton; + STD_BITMAP_BUTTON* m_removeAssignmentButton; // Virtual event handlers, override them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } diff --git a/common/dialogs/panel_text_variables.cpp b/common/dialogs/panel_text_variables.cpp index 3ef443cdbc..32cb37a605 100644 --- a/common/dialogs/panel_text_variables.cpp +++ b/common/dialogs/panel_text_variables.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KICAD, a free EDA CAD application. * - * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2022 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 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include diff --git a/common/dialogs/panel_text_variables_base.cpp b/common/dialogs/panel_text_variables_base.cpp index 59e89b32a6..6a1c6c43d3 100644 --- a/common/dialogs/panel_text_variables_base.cpp +++ b/common/dialogs/panel_text_variables_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_text_variables_base.h" @@ -33,9 +34,9 @@ PANEL_TEXT_VARIABLES_BASE::PANEL_TEXT_VARIABLES_BASE( wxWindow* parent, wxWindow m_TextVars->SetColSize( 1, 454 ); m_TextVars->EnableDragColMove( false ); m_TextVars->EnableDragColSize( true ); - m_TextVars->SetColLabelSize( 22 ); m_TextVars->SetColLabelValue( 0, _("Variable Name") ); m_TextVars->SetColLabelValue( 1, _("Text Substitution") ); + m_TextVars->SetColLabelSize( 22 ); m_TextVars->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -54,13 +55,13 @@ PANEL_TEXT_VARIABLES_BASE::PANEL_TEXT_VARIABLES_BASE( wxWindow* parent, wxWindow wxBoxSizer* bSizerEnvVarBtns; bSizerEnvVarBtns = new wxBoxSizer( wxHORIZONTAL ); - m_btnAddTextVar = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_btnAddTextVar = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizerEnvVarBtns->Add( m_btnAddTextVar, 0, wxRIGHT, 5 ); bSizerEnvVarBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_btnDeleteTextVar = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_btnDeleteTextVar = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizerEnvVarBtns->Add( m_btnDeleteTextVar, 0, wxRIGHT|wxLEFT, 5 ); diff --git a/common/dialogs/panel_text_variables_base.fbp b/common/dialogs/panel_text_variables_base.fbp index 161511f2fc..8c6c6b169e 100644 --- a/common/dialogs/panel_text_variables_base.fbp +++ b/common/dialogs/panel_text_variables_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ panel_text_variables_base 1000 none + 1 PanelTextVariables @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -46,6 +48,7 @@ -1,-1 ; forward_declare + 0 wxTAB_TRAVERSAL @@ -176,6 +179,7 @@ + 0 @@ -223,7 +227,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -259,6 +263,7 @@ + 0 @@ -306,7 +311,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/common/dialogs/panel_text_variables_base.h b/common/dialogs/panel_text_variables_base.h index c2f7383ec4..99f9428ea7 100644 --- a/common/dialogs/panel_text_variables_base.h +++ b/common/dialogs/panel_text_variables_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include @@ -37,8 +38,8 @@ class PANEL_TEXT_VARIABLES_BASE : public wxPanel protected: WX_GRID* m_TextVars; - wxBitmapButton* m_btnAddTextVar; - wxBitmapButton* m_btnDeleteTextVar; + STD_BITMAP_BUTTON* m_btnAddTextVar; + STD_BITMAP_BUTTON* m_btnDeleteTextVar; // Virtual event handlers, override them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } @@ -51,6 +52,7 @@ class PANEL_TEXT_VARIABLES_BASE : public wxPanel public: PANEL_TEXT_VARIABLES_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_TEXT_VARIABLES_BASE(); }; diff --git a/common/widgets/std_bitmap_button.cpp b/common/widgets/std_bitmap_button.cpp new file mode 100644 index 0000000000..420b3d7d2c --- /dev/null +++ b/common/widgets/std_bitmap_button.cpp @@ -0,0 +1,220 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2016 Anil8735(https://stackoverflow.com/users/3659387/anil8753) + * from https://stackoverflow.com/a/37274011 + * Copyright (C) 2020-2022 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 2 + * 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, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +STD_BITMAP_BUTTON::STD_BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId, + const wxBitmap& aDummyBitmap, const wxPoint& aPos, + const wxSize& aSize, int aStyle ) : + wxPanel( aParent, aId, aPos, aSize, aStyle, "StdBitmapButton" ) +{ + if( aSize == wxDefaultSize ) + { + wxSize defaultSize = wxButton::GetDefaultSize(); + + SetMinSize( wxSize( defaultSize.GetWidth() + 1, defaultSize.GetHeight() + 1 ) ); + } + + Bind( wxEVT_PAINT, &STD_BITMAP_BUTTON::OnPaint, this ); + Bind( wxEVT_LEFT_UP, &STD_BITMAP_BUTTON::OnLeftButtonUp, this ); + Bind( wxEVT_LEFT_DOWN, &STD_BITMAP_BUTTON::OnLeftButtonDown, this ); + Bind( wxEVT_KILL_FOCUS, &STD_BITMAP_BUTTON::OnKillFocus, this ); + Bind( wxEVT_LEAVE_WINDOW, &STD_BITMAP_BUTTON::OnMouseLeave, this ); + Bind( wxEVT_ENTER_WINDOW, &STD_BITMAP_BUTTON::OnMouseEnter, this ); + + Bind( wxEVT_SYS_COLOUR_CHANGED, + wxSysColourChangedEventHandler( STD_BITMAP_BUTTON::onThemeChanged ), + this ); +} + + +STD_BITMAP_BUTTON::~STD_BITMAP_BUTTON() +{ +} + + +void STD_BITMAP_BUTTON::onThemeChanged( wxSysColourChangedEvent &aEvent ) +{ + Refresh(); +} + + +void STD_BITMAP_BUTTON::SetBitmap( const wxBitmap& aBmp ) +{ + m_bitmap = aBmp; + + SetMinSize( wxSize( m_bitmap.GetWidth() + 8, m_bitmap.GetHeight() + 8 ) ); +} + + +void STD_BITMAP_BUTTON::OnKillFocus( wxFocusEvent& aEvent ) +{ + m_stateButton = wxCONTROL_CURRENT; + Refresh(); + + aEvent.Skip(); +} + + +void STD_BITMAP_BUTTON::OnMouseLeave( wxMouseEvent& aEvent ) +{ + m_stateButton = 0; + Refresh(); + + aEvent.Skip(); +} + + +void STD_BITMAP_BUTTON::OnMouseEnter( wxMouseEvent& aEvent ) +{ + m_stateButton = wxCONTROL_CURRENT; + Refresh(); + + aEvent.Skip(); +} + + +void STD_BITMAP_BUTTON::OnLeftButtonUp( wxMouseEvent& aEvent ) +{ + m_stateButton = 0; + + Refresh(); + + wxEvtHandler* pEventHandler = GetEventHandler(); + wxASSERT( pEventHandler ); + + pEventHandler->CallAfter( + [=]() + { + wxCommandEvent evt( wxEVT_BUTTON, GetId() ); + evt.SetEventObject( this ); + GetEventHandler()->ProcessEvent( evt ); + } ); + + aEvent.Skip(); +} + + +void STD_BITMAP_BUTTON::OnLeftButtonDown( wxMouseEvent& aEvent ) +{ + m_stateButton = wxCONTROL_PRESSED; + Refresh(); + + aEvent.Skip(); +} + + +void STD_BITMAP_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) ) +{ + wxPaintDC dc( this ); + wxSize size = GetSize(); + +#ifdef __WXMAC__ + auto drawBackground = + [&]( wxRect aRect ) + { + // wxWidgets doesn't have much support for dark mode on OSX; none of the + // system colours return the right values, nor does wxRendererNative draw + // the borders correctly. So we add some empirically chosen hacks here. + + wxColor fg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT ); + wxColor bg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ); + + aRect.width += 1; + aRect.height += 1; + + if( KIPLATFORM::UI::IsDarkTheme() ) + { + bg = bg.ChangeLightness( m_bIsEnable ? 130 : 120 ); + dc.SetBrush( bg ); + dc.SetPen( bg ); + } + else + { + bg = bg.ChangeLightness( m_bIsEnable ? 200 : 160 ); + dc.SetBrush( bg ); + fg = fg.ChangeLightness( 180 ); + dc.SetPen( fg ); + } + + dc.DrawRoundedRectangle( aRect, aRect.height / 4 ); + }; +#endif + + wxRect r1; + r1.x = 0; + r1.y = 0; + r1.width = size.GetWidth(); + r1.height = size.GetHeight(); + +#ifdef __WXMAC__ + // wxRendereNative doesn't handle dark mode on OSX. + drawBackground( r1 ); +#else + r1.width += 2; + wxRendererNative::Get().DrawPushButton( this, dc, r1, m_stateButton ); +#endif + + SetForegroundColour( m_bIsEnable ? wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT ) + : wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) ); + + if( m_bitmap.IsOk() ) + { + wxMemoryDC mdc( m_bitmap ); + + r1.x = ( size.GetWidth() - m_bitmap.GetWidth() ) / 2; + + if( r1.x < 0 ) + r1.x = 0; + + r1.y += ( size.GetHeight() - m_bitmap.GetHeight() ) / 2; + + dc.Blit( wxPoint( r1.x, r1.y ), m_bitmap.GetSize(), &mdc, wxPoint( 0, 0 ), wxCOPY, true ); + } +} + + +bool STD_BITMAP_BUTTON::Enable( bool aEnable ) +{ + m_bIsEnable = aEnable; + wxPanel::Enable( m_bIsEnable ); + + if( m_bIsEnable ) + m_stateButton = 0; + else + m_stateButton = wxCONTROL_DISABLED; + + Refresh(); + + return aEnable; +} diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp index cb8cfb3a1c..025e6ff951 100644 --- a/eeschema/dialogs/dialog_bom.cpp +++ b/eeschema/dialogs/dialog_bom.cpp @@ -29,6 +29,7 @@ #include +#include #include #include #include diff --git a/eeschema/dialogs/dialog_bom_base.cpp b/eeschema/dialogs/dialog_bom_base.cpp index 23e01a8c28..f47e6f5437 100644 --- a/eeschema/dialogs/dialog_bom_base.cpp +++ b/eeschema/dialogs/dialog_bom_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_bom_base.h" /////////////////////////////////////////////////////////////////////////// @@ -64,13 +66,13 @@ DIALOG_BOM_BASE::DIALOG_BOM_BASE( wxWindow* parent, wxWindowID id, const wxStrin wxBoxSizer* bGeneratorButtons; bGeneratorButtons = new wxBoxSizer( wxHORIZONTAL ); - m_buttonAddGenerator = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_buttonAddGenerator = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_buttonAddGenerator->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); m_buttonAddGenerator->SetToolTip( _("Add a new BOM generator and its command line to the list") ); bGeneratorButtons->Add( m_buttonAddGenerator, 0, wxRIGHT|wxLEFT, 5 ); - m_buttonEdit = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_buttonEdit = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_buttonEdit->SetToolTip( _("Edit the script file in the text editor") ); bGeneratorButtons->Add( m_buttonEdit, 0, wxRIGHT, 5 ); @@ -78,7 +80,7 @@ DIALOG_BOM_BASE::DIALOG_BOM_BASE( wxWindow* parent, wxWindowID id, const wxStrin bGeneratorButtons->Add( 20, 0, 0, 0, 5 ); - m_buttonDelGenerator = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_buttonDelGenerator = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_buttonDelGenerator->SetToolTip( _("Remove the current generator script from list") ); bGeneratorButtons->Add( m_buttonDelGenerator, 0, wxRIGHT, 5 ); diff --git a/eeschema/dialogs/dialog_bom_base.fbp b/eeschema/dialogs/dialog_bom_base.fbp index 60b6f28676..2003dd7360 100644 --- a/eeschema/dialogs/dialog_bom_base.fbp +++ b/eeschema/dialogs/dialog_bom_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_bom_base 1000 none + 1 dialog_bom_base @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Bill of Materials + 0 @@ -440,6 +443,7 @@ + 0 @@ -487,7 +491,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add a new BOM generator and its command line to the list @@ -513,6 +517,7 @@ + 0 @@ -560,7 +565,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Edit the script file in the text editor @@ -596,6 +601,7 @@ + 0 @@ -643,7 +649,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Remove the current generator script from list @@ -940,6 +946,7 @@ + 0 diff --git a/eeschema/dialogs/dialog_bom_base.h b/eeschema/dialogs/dialog_bom_base.h index 82d08e19e8..489f67527a 100644 --- a/eeschema/dialogs/dialog_bom_base.h +++ b/eeschema/dialogs/dialog_bom_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "dialog_shim.h" #include #include @@ -50,9 +52,9 @@ class DIALOG_BOM_BASE : public DIALOG_SHIM wxStaticText* m_staticTextName; wxTextCtrl* m_textCtrlName; wxTextCtrl* m_Messages; - wxBitmapButton* m_buttonAddGenerator; - wxBitmapButton* m_buttonEdit; - wxBitmapButton* m_buttonDelGenerator; + STD_BITMAP_BUTTON* m_buttonAddGenerator; + STD_BITMAP_BUTTON* m_buttonEdit; + STD_BITMAP_BUTTON* m_buttonDelGenerator; wxStaticText* m_staticTextCmd; wxTextCtrl* m_textCtrlCommand; wxCheckBox* m_checkBoxShowConsole; @@ -63,7 +65,7 @@ class DIALOG_BOM_BASE : public DIALOG_SHIM wxButton* m_sdbSizerCancel; wxButton* m_sdbSizerHelp; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } virtual void OnGeneratorSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnNameEdited( wxCommandEvent& event ) { event.Skip(); } @@ -79,6 +81,7 @@ class DIALOG_BOM_BASE : public DIALOG_SHIM public: DIALOG_BOM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Bill of Materials"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_BOM_BASE(); }; diff --git a/eeschema/dialogs/dialog_label_properties.cpp b/eeschema/dialogs/dialog_label_properties.cpp index bc34ff7456..9887944ee3 100644 --- a/eeschema/dialogs/dialog_label_properties.cpp +++ b/eeschema/dialogs/dialog_label_properties.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/eeschema/dialogs/dialog_label_properties_base.cpp b/eeschema/dialogs/dialog_label_properties_base.cpp index df7f9cdec7..dd196fc221 100644 --- a/eeschema/dialogs/dialog_label_properties_base.cpp +++ b/eeschema/dialogs/dialog_label_properties_base.cpp @@ -8,6 +8,7 @@ #include "widgets/bitmap_button.h" #include "widgets/color_swatch.h" #include "widgets/font_choice.h" +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_label_properties_base.h" @@ -114,17 +115,17 @@ DIALOG_LABEL_PROPERTIES_BASE::DIALOG_LABEL_PROPERTIES_BASE( wxWindow* parent, wx wxBoxSizer* bButtonSize; bButtonSize = new wxBoxSizer( wxHORIZONTAL ); - m_bpAdd = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAdd = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpAdd->SetToolTip( _("Add field") ); bButtonSize->Add( m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_bpMoveUp = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpMoveUp = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpMoveUp->SetToolTip( _("Move up") ); bButtonSize->Add( m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_bpMoveDown = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpMoveDown = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpMoveDown->SetToolTip( _("Move down") ); bButtonSize->Add( m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); @@ -132,7 +133,7 @@ DIALOG_LABEL_PROPERTIES_BASE::DIALOG_LABEL_PROPERTIES_BASE( wxWindow* parent, wx bButtonSize->Add( 20, 0, 0, wxEXPAND, 10 ); - m_bpDelete = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDelete = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpDelete->SetToolTip( _("Delete field") ); bButtonSize->Add( m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/dialog_label_properties_base.fbp b/eeschema/dialogs/dialog_label_properties_base.fbp index e1f21a27ff..42ed523d9e 100644 --- a/eeschema/dialogs/dialog_label_properties_base.fbp +++ b/eeschema/dialogs/dialog_label_properties_base.fbp @@ -580,7 +580,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add field @@ -654,7 +654,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move up @@ -728,7 +728,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move down @@ -812,7 +812,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Delete field diff --git a/eeschema/dialogs/dialog_label_properties_base.h b/eeschema/dialogs/dialog_label_properties_base.h index 48cb18cd92..d82beb0ce5 100644 --- a/eeschema/dialogs/dialog_label_properties_base.h +++ b/eeschema/dialogs/dialog_label_properties_base.h @@ -13,6 +13,7 @@ class BITMAP_BUTTON; class COLOR_SWATCH; class FONT_CHOICE; +class STD_BITMAP_BUTTON; class WX_GRID; #include "dialog_shim.h" @@ -62,10 +63,10 @@ class DIALOG_LABEL_PROPERTIES_BASE : public DIALOG_SHIM wxComboBox* m_valueCombo; wxHyperlinkCtrl* m_syntaxHelp; WX_GRID* m_grid; - wxBitmapButton* m_bpAdd; - wxBitmapButton* m_bpMoveUp; - wxBitmapButton* m_bpMoveDown; - wxBitmapButton* m_bpDelete; + STD_BITMAP_BUTTON* m_bpAdd; + STD_BITMAP_BUTTON* m_bpMoveUp; + STD_BITMAP_BUTTON* m_bpMoveDown; + STD_BITMAP_BUTTON* m_bpDelete; wxStaticBoxSizer* m_shapeSizer; wxRadioButton* m_input; wxRadioButton* m_output; diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp index 814734068f..9dc228dd58 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table_base.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table_base.cpp index d41f8f7b98..0bdf4030cc 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table_base.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table_base.cpp @@ -1,11 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "widgets/bitmap_button.h" +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_lib_edit_pin_table_base.h" @@ -83,7 +84,6 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent m_grid->SetColSize( 12, 66 ); m_grid->EnableDragColMove( false ); m_grid->EnableDragColSize( true ); - m_grid->SetColLabelSize( 24 ); m_grid->SetColLabelValue( 0, _("Count") ); m_grid->SetColLabelValue( 1, _("Number") ); m_grid->SetColLabelValue( 2, _("Name") ); @@ -98,6 +98,7 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent m_grid->SetColLabelValue( 11, _("Visible") ); m_grid->SetColLabelValue( 12, _("Unit") ); m_grid->SetColLabelValue( 13, _("De Morgan") ); + m_grid->SetColLabelSize( 24 ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -122,10 +123,10 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent wxBoxSizer* bSizer5; bSizer5 = new wxBoxSizer( wxHORIZONTAL ); - m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_addButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer5->Add( m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_deleteButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer5->Add( m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 ); m_divider1 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); @@ -139,7 +140,7 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent m_groupSelected = new wxButton( this, wxID_ANY, _("Group Selected"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer5->Add( m_groupSelected, 0, wxALL|wxALIGN_CENTER_VERTICAL, 7 ); - m_refreshButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_refreshButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer5->Add( m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 ); m_divider2 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table_base.fbp b/eeschema/dialogs/dialog_lib_edit_pin_table_base.fbp index 28cb685939..1aac172991 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table_base.fbp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_lib_edit_pin_table_base 1000 none + 1 dialog_lib_edit_pin_table @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Pin Table + 0 @@ -589,6 +592,7 @@ + 0 @@ -636,7 +640,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -662,6 +666,7 @@ + 0 @@ -709,7 +714,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -735,6 +740,7 @@ + 0 @@ -872,6 +878,7 @@ + 0 @@ -945,6 +952,7 @@ + 0 @@ -992,7 +1000,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -1018,6 +1026,7 @@ + 0 diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table_base.h b/eeschema/dialogs/dialog_lib_edit_pin_table_base.h index 4b22db42a4..95dca0fcde 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table_base.h +++ b/eeschema/dialogs/dialog_lib_edit_pin_table_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -11,6 +11,7 @@ #include #include class BITMAP_BUTTON; +class STD_BITMAP_BUTTON; class WX_GRID; #include "dialog_shim.h" @@ -49,12 +50,12 @@ class DIALOG_LIB_EDIT_PIN_TABLE_BASE : public DIALOG_SHIM wxStaticText* m_staticTextDuplicatePins; wxStaticText* m_duplicate_pins; WX_GRID* m_grid; - wxBitmapButton* m_addButton; - wxBitmapButton* m_deleteButton; + STD_BITMAP_BUTTON* m_addButton; + STD_BITMAP_BUTTON* m_deleteButton; BITMAP_BUTTON* m_divider1; wxCheckBox* m_cbGroup; wxButton* m_groupSelected; - wxBitmapButton* m_refreshButton; + STD_BITMAP_BUTTON* m_refreshButton; BITMAP_BUTTON* m_divider2; wxCheckBox* m_cbFilterByUnit; wxChoice* m_unitFilter; @@ -62,7 +63,7 @@ class DIALOG_LIB_EDIT_PIN_TABLE_BASE : public DIALOG_SHIM wxButton* m_ButtonsOK; wxButton* m_ButtonsCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnClose( wxCloseEvent& event ) = 0; virtual void OnUpdateUI( wxUpdateUIEvent& event ) = 0; virtual void OnCellEdited( wxGridEvent& event ) = 0; @@ -79,6 +80,7 @@ class DIALOG_LIB_EDIT_PIN_TABLE_BASE : public DIALOG_SHIM public: DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pin Table"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_LIB_EDIT_PIN_TABLE_BASE(); }; diff --git a/eeschema/dialogs/dialog_lib_symbol_properties.cpp b/eeschema/dialogs/dialog_lib_symbol_properties.cpp index 76bdf594a8..e9eee6d441 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #ifdef KICAD_SPICE diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp b/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp index 4c588ed868..1e1d2bb18a 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_lib_symbol_properties_base.h" @@ -85,17 +86,17 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* bButtonSize = new wxBoxSizer( wxHORIZONTAL ); - m_bpAdd = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAdd = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpAdd->SetToolTip( _("Add field") ); bButtonSize->Add( m_bpAdd, 0, wxRIGHT|wxLEFT, 5 ); - m_bpMoveUp = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpMoveUp = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpMoveUp->SetToolTip( _("Move up") ); bButtonSize->Add( m_bpMoveUp, 0, wxRIGHT, 5 ); - m_bpMoveDown = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpMoveDown = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpMoveDown->SetToolTip( _("Move down") ); bButtonSize->Add( m_bpMoveDown, 0, wxRIGHT, 5 ); @@ -103,7 +104,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 ); - m_bpDelete = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDelete = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpDelete->SetToolTip( _("Delete field") ); bButtonSize->Add( m_bpDelete, 0, wxRIGHT|wxLEFT, 10 ); @@ -293,12 +294,12 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* wxBoxSizer* bFpFilterRightBoxSizer; bFpFilterRightBoxSizer = new wxBoxSizer( wxHORIZONTAL ); - m_addFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_addFilterButton = new STD_BITMAP_BUTTON( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_addFilterButton->SetToolTip( _("Add footprint filter") ); bFpFilterRightBoxSizer->Add( m_addFilterButton, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_editFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_editFilterButton = new STD_BITMAP_BUTTON( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_editFilterButton->SetToolTip( _("Edit footprint filter") ); bFpFilterRightBoxSizer->Add( m_editFilterButton, 0, wxALL, 5 ); @@ -306,7 +307,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* bFpFilterRightBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 ); - m_deleteFilterButton = new wxBitmapButton( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_deleteFilterButton = new STD_BITMAP_BUTTON( m_PanelFootprintFilter, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_deleteFilterButton->SetToolTip( _("Delete footprint filter") ); bFpFilterRightBoxSizer->Add( m_deleteFilterButton, 0, wxALL, 5 ); diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp b/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp index 3816cbea5f..18256abfcc 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp @@ -359,7 +359,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add field @@ -433,7 +433,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move up @@ -507,7 +507,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move down @@ -591,7 +591,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Delete field @@ -2347,7 +2347,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add footprint filter @@ -2421,7 +2421,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Edit footprint filter @@ -2505,7 +2505,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Delete footprint filter diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.h b/eeschema/dialogs/dialog_lib_symbol_properties_base.h index 8b2f9e72d0..706b96d598 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.h +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include "dialog_shim.h" @@ -52,10 +53,10 @@ class DIALOG_LIB_SYMBOL_PROPERTIES_BASE : public DIALOG_SHIM wxPanel* m_PanelBasic; WX_GRID* m_grid; wxBoxSizer* bButtonSize; - wxBitmapButton* m_bpAdd; - wxBitmapButton* m_bpMoveUp; - wxBitmapButton* m_bpMoveDown; - wxBitmapButton* m_bpDelete; + STD_BITMAP_BUTTON* m_bpAdd; + STD_BITMAP_BUTTON* m_bpMoveUp; + STD_BITMAP_BUTTON* m_bpMoveDown; + STD_BITMAP_BUTTON* m_bpDelete; wxTextCtrl* m_SymbolNameCtrl; wxTextCtrl* m_DescCtrl; wxStaticText* staticKeywordsLabel; @@ -79,9 +80,9 @@ class DIALOG_LIB_SYMBOL_PROPERTIES_BASE : public DIALOG_SHIM wxPanel* m_PanelFootprintFilter; wxStaticText* m_staticTextFootprints; wxListBox* m_FootprintFilterListBox; - wxBitmapButton* m_addFilterButton; - wxBitmapButton* m_editFilterButton; - wxBitmapButton* m_deleteFilterButton; + STD_BITMAP_BUTTON* m_addFilterButton; + STD_BITMAP_BUTTON* m_editFilterButton; + STD_BITMAP_BUTTON* m_deleteFilterButton; wxButton* m_spiceFieldsButton; wxStdDialogButtonSizer* m_stdSizerButton; wxButton* m_stdSizerButtonOK; diff --git a/eeschema/dialogs/dialog_pin_properties.cpp b/eeschema/dialogs/dialog_pin_properties.cpp index 61bc65c2d1..5261b86ee9 100644 --- a/eeschema/dialogs/dialog_pin_properties.cpp +++ b/eeschema/dialogs/dialog_pin_properties.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include class ALT_PIN_DATA_MODEL : public wxGridTableBase, public std::vector @@ -432,12 +433,6 @@ void DIALOG_PIN_PROPERTIES::OnPropertiesChange( wxCommandEvent& event ) m_panelShowPin->Refresh(); } -void DIALOG_PIN_PROPERTIES::OnCollapsiblePaneChanged( wxCollapsiblePaneEvent& event ) -{ - s_alternatesTurndownOpen = !event.GetCollapsed(); -} - - wxString DIALOG_PIN_PROPERTIES::getSyncPinsMessage() { if( m_checkApplyToAllParts->GetValue() ) diff --git a/eeschema/dialogs/dialog_pin_properties.h b/eeschema/dialogs/dialog_pin_properties.h index 7851919827..f04bdebc72 100644 --- a/eeschema/dialogs/dialog_pin_properties.h +++ b/eeschema/dialogs/dialog_pin_properties.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2014-2021 KiCad Developers, see AUTHOR.txt for contributors. + * Copyright (C) 2014-2022 KiCad Developers, see AUTHOR.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 @@ -22,8 +22,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __dialog_lib_edit_pin__ -#define __dialog_lib_edit_pin__ +#ifndef DIALOG_PIN_PROPERTIES_H +#define DIALOG_PIN_PROPERTIES_H #include #include @@ -61,7 +61,6 @@ public: void OnPaintShowPanel( wxPaintEvent& event ) override; void OnPropertiesChange( wxCommandEvent& event ) override; - void OnCollapsiblePaneChanged( wxCollapsiblePaneEvent& event ) override; void OnAddAlternate( wxCommandEvent& event ) override; void OnDeleteAlternate( wxCommandEvent& event ) override; void OnSize( wxSizeEvent& event ) override; @@ -97,4 +96,4 @@ private: inline static bool s_alternatesTurndownOpen = false; }; -#endif // __dialog_lib_edit_pin__ +#endif // DIALOG_PIN_PROPERTIES_H diff --git a/eeschema/dialogs/dialog_pin_properties_base.cpp b/eeschema/dialogs/dialog_pin_properties_base.cpp index 358a915709..192b9e6532 100644 --- a/eeschema/dialogs/dialog_pin_properties_base.cpp +++ b/eeschema/dialogs/dialog_pin_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -8,6 +8,7 @@ #include "pin_shape_combobox.h" #include "pin_type_combobox.h" #include "widgets/infobar.h" +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "wx/bmpcbox.h" @@ -208,10 +209,10 @@ DIALOG_PIN_PROPERTIES_BASE::DIALOG_PIN_PROPERTIES_BASE( wxWindow* parent, wxWind m_alternatesGrid->SetColSize( 2, 140 ); m_alternatesGrid->EnableDragColMove( false ); m_alternatesGrid->EnableDragColSize( false ); - m_alternatesGrid->SetColLabelSize( 22 ); m_alternatesGrid->SetColLabelValue( 0, _("Alternate Pin Name") ); m_alternatesGrid->SetColLabelValue( 1, _("Electrical Type") ); m_alternatesGrid->SetColLabelValue( 2, _("Graphic Style") ); + m_alternatesGrid->SetColLabelSize( 22 ); m_alternatesGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -233,13 +234,13 @@ DIALOG_PIN_PROPERTIES_BASE::DIALOG_PIN_PROPERTIES_BASE( wxWindow* parent, wxWind wxBoxSizer* bButtonSizer; bButtonSizer = new wxBoxSizer( wxHORIZONTAL ); - m_addAlternate = new wxBitmapButton( m_alternatesTurndown->GetPane(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_addAlternate = new STD_BITMAP_BUTTON( m_alternatesTurndown->GetPane(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSizer->Add( m_addAlternate, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); bButtonSizer->Add( 20, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_deleteAlternate = new wxBitmapButton( m_alternatesTurndown->GetPane(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_deleteAlternate = new STD_BITMAP_BUTTON( m_alternatesTurndown->GetPane(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSizer->Add( m_deleteAlternate, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); @@ -288,7 +289,6 @@ DIALOG_PIN_PROPERTIES_BASE::DIALOG_PIN_PROPERTIES_BASE( wxWindow* parent, wxWind m_checkApplyToAllConversions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnPropertiesChange ), NULL, this ); m_checkShow->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnPropertiesChange ), NULL, this ); m_panelShowPin->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this ); - m_alternatesTurndown->Connect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnCollapsiblePaneChanged ), NULL, this ); m_addAlternate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnAddAlternate ), NULL, this ); m_deleteAlternate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnDeleteAlternate ), NULL, this ); } @@ -310,7 +310,6 @@ DIALOG_PIN_PROPERTIES_BASE::~DIALOG_PIN_PROPERTIES_BASE() m_checkApplyToAllConversions->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnPropertiesChange ), NULL, this ); m_checkShow->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnPropertiesChange ), NULL, this ); m_panelShowPin->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this ); - m_alternatesTurndown->Disconnect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnCollapsiblePaneChanged ), NULL, this ); m_addAlternate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnAddAlternate ), NULL, this ); m_deleteAlternate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PIN_PROPERTIES_BASE::OnDeleteAlternate ), NULL, this ); diff --git a/eeschema/dialogs/dialog_pin_properties_base.fbp b/eeschema/dialogs/dialog_pin_properties_base.fbp index d2a17bfa0f..f3e58b912b 100644 --- a/eeschema/dialogs/dialog_pin_properties_base.fbp +++ b/eeschema/dialogs/dialog_pin_properties_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_pin_properties_base 1000 none + 1 dialog_pin_properties @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Pin Properties + 0 @@ -2218,7 +2221,6 @@ - OnCollapsiblePaneChanged bAlternatesSizer wxVERTICAL @@ -2344,6 +2346,7 @@ + 0 @@ -2391,7 +2394,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -2427,6 +2430,7 @@ + 0 @@ -2474,7 +2478,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/eeschema/dialogs/dialog_pin_properties_base.h b/eeschema/dialogs/dialog_pin_properties_base.h index 3ac88e096a..2fe8ff6da4 100644 --- a/eeschema/dialogs/dialog_pin_properties_base.h +++ b/eeschema/dialogs/dialog_pin_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -12,6 +12,7 @@ #include class PinShapeComboBox; class PinTypeComboBox; +class STD_BITMAP_BUTTON; class WX_GRID; class WX_INFOBAR; class wxBitmapComboBox; @@ -83,8 +84,8 @@ class DIALOG_PIN_PROPERTIES_BASE : public DIALOG_SHIM wxPanel* m_panelShowPin; wxCollapsiblePane* m_alternatesTurndown; WX_GRID* m_alternatesGrid; - wxBitmapButton* m_addAlternate; - wxBitmapButton* m_deleteAlternate; + STD_BITMAP_BUTTON* m_addAlternate; + STD_BITMAP_BUTTON* m_deleteAlternate; wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_sdbSizerButtons; wxButton* m_sdbSizerButtonsOK; @@ -95,7 +96,6 @@ class DIALOG_PIN_PROPERTIES_BASE : public DIALOG_SHIM virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnPropertiesChange( wxCommandEvent& event ) { event.Skip(); } virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); } - virtual void OnCollapsiblePaneChanged( wxCollapsiblePaneEvent& event ) { event.Skip(); } virtual void OnAddAlternate( wxCommandEvent& event ) { event.Skip(); } virtual void OnDeleteAlternate( wxCommandEvent& event ) { event.Skip(); } diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index d965167c7b..d36697d627 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -27,6 +27,7 @@ #include #include // For ExpandEnvVarSubstitutions #include "widgets/wx_html_report_panel.h" +#include #include #include #include diff --git a/eeschema/dialogs/dialog_plot_schematic_base.cpp b/eeschema/dialogs/dialog_plot_schematic_base.cpp index 474f25c0f5..01553112af 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_html_report_panel.h" #include "dialog_plot_schematic_base.h" @@ -28,9 +29,9 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the schematic main file location.") ); - bSizerDir->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 4 ); + bSizerDir->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 4 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizerDir->Add( m_browseButton, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); diff --git a/eeschema/dialogs/dialog_plot_schematic_base.fbp b/eeschema/dialogs/dialog_plot_schematic_base.fbp index 6c7678f4fe..be91faa116 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.fbp +++ b/eeschema/dialogs/dialog_plot_schematic_base.fbp @@ -1,1645 +1,1645 @@ - - - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - dialog_plot_schematic_base - 1000 - none - - - 1 - Dialog_plot_schematic_base - - . - - 1 - 1 - 1 - 1 - UI - 0 - 1 - 0 - - 0 - wxAUI_MGR_DEFAULT - - - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - - -1,-1 - DIALOG_PLOT_SCHEMATIC_BASE - - -1,-1 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h - Plot Schematic Options - - 0 - - - - OnCloseWindow - OnUpdateUI - - - bMainSizer - wxVERTICAL - none - - 7 - wxALL|wxEXPAND - 0 - - - bSizerDir - wxHORIZONTAL - none - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Output directory: - 0 - - 0 - - - 0 - - 1 - m_staticTextOutputDirectory - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 4 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_outputDirectoryName - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Target directory for plot files. Can be absolute or relative to the schematic main file location. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxRIGHT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Browse - - 0 - - 0 - - - 0 - -1,-1 - 1 - m_browseButton - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnOutputDirectoryBrowseClicked - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - - m_optionsSizer - wxHORIZONTAL - protected - - 5 - wxALIGN_TOP|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Postscript" "PDF" "SVG" "DXF" "HPGL" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Output Format - 1 - - 0 - - - 0 - - 1 - m_plotFormatOpt - 1 - - - protected - 1 - - Resizable - 2 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnPlotFormatSelection - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - wxID_ANY - Options - - sbOptions - wxVERTICAL - 1 - none - - 5 - wxEXPAND - 1 - - - wxBOTH - 1 - - 0 - - gbSizer1 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Page size: - 0 - - 0 - - - 0 - - 1 - m_staticText4 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxEXPAND|wxRIGHT|wxLEFT - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Schematic size" "A4" "A" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_paperSizeOption - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnPageSizeSelected - - - - 5 - 2 - 0 - wxALL - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot drawing sheet - - 0 - - - 0 - - 1 - m_plotDrawingSheet - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Plot the drawing sheet border and title block - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxLEFT - 2 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Output mode: - 0 - - 0 - - - 0 - - 1 - bOutputModeLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxALL - 2 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Color" "Black and White" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_ModeColorOption - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 3 - 0 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 3 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Plot background color - - 0 - - - 0 - - 1 - m_plotBackgroundColor - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Plot the background color if the output format supports it - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxALL - 4 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Color theme: - 0 - - 0 - - - 0 - - 1 - m_staticText9 - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxALL|wxEXPAND - 4 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_colorTheme - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; ; forward_declare - 0 - Select the color theme to use for plotting - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxLEFT - 5 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Default line width: - 0 - - 0 - - - 0 - - 1 - m_lineWidthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxEXPAND|wxALL - 5 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_lineWidthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Selection of the default pen thickness used to draw items, when their thickness is set to 0. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP - 5 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mm - 0 - - 0 - - - 0 - - 1 - m_lineWidthUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - - - -1 - - - - - - - - 5 - wxEXPAND - 1 - - - bOptionsRight - wxVERTICAL - none - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - wxID_ANY - HPGL Options - - m_HPGLOptionsSizer - wxVERTICAL - 1 - protected - - 5 - wxEXPAND - 1 - - - wxBOTH - 1 - - 0 - - gbSizer2 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Position and units: - 0 - - 0 - - - 0 - - 1 - m_plotOriginTitle - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Bottom left, plotter units" "Centered, plotter units" "Page fit, user units" "Content fit, user units" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_plotOriginOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pen width: - 0 - - 0 - - - 0 - - 1 - m_penWidthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxEXPAND|wxALL - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_penWidthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 1 - 2 - wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mm - 0 - - 0 - - - 0 - - 1 - m_penWidthUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - - - -1 - - - - - - - - 5 - wxEXPAND|wxLEFT|wxRIGHT - 1 - - wxID_ANY - Other options - - m_otherOptions - wxVERTICAL - 1 - protected - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - - 1 - - 0 - 0 - wxID_ANY - Open file after plot - - 0 - - - 0 - - 1 - m_openFileAfterPlot - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Open output file with associated application after successful plot - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 1 - - - bSizerMsgPanel - wxVERTICAL - none - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - 300,150 - 1 - m_MessagesBox - 1 - - - protected - 1 - - Resizable - 1 - - WX_HTML_REPORT_PANEL; wx_html_report_panel.h - 0 - - - - wxTAB_TRAVERSAL - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizer1 - protected - OnPlotCurrent - OnPlotAll - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_plot_schematic_base + 1000 + none + + + 1 + Dialog_plot_schematic_base + + . + + 1 + 1 + 1 + 1 + UI + 0 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + -1,-1 + DIALOG_PLOT_SCHEMATIC_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Plot Schematic Options + + 0 + + + + OnCloseWindow + OnUpdateUI + + + bMainSizer + wxVERTICAL + none + + 7 + wxALL|wxEXPAND + 0 + + + bSizerDir + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Output directory: + 0 + + 0 + + + 0 + + 1 + m_staticTextOutputDirectory + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 4 + wxALIGN_CENTER_VERTICAL|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_outputDirectoryName + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Target directory for plot files. Can be absolute or relative to the schematic main file location. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxRIGHT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Browse + + 0 + + 0 + + + 0 + -1,-1 + 1 + m_browseButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnOutputDirectoryBrowseClicked + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + + m_optionsSizer + wxHORIZONTAL + protected + + 5 + wxALIGN_TOP|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Postscript" "PDF" "SVG" "DXF" "HPGL" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Output Format + 1 + + 0 + + + 0 + + 1 + m_plotFormatOpt + 1 + + + protected + 1 + + Resizable + 2 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnPlotFormatSelection + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Options + + sbOptions + wxVERTICAL + 1 + none + + 5 + wxEXPAND + 1 + + + wxBOTH + 1 + + 0 + + gbSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Page size: + 0 + + 0 + + + 0 + + 1 + m_staticText4 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxEXPAND|wxRIGHT|wxLEFT + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Schematic size" "A4" "A" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_paperSizeOption + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnPageSizeSelected + + + + 5 + 2 + 0 + wxALL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot drawing sheet + + 0 + + + 0 + + 1 + m_plotDrawingSheet + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Plot the drawing sheet border and title block + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxLEFT + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Output mode: + 0 + + 0 + + + 0 + + 1 + bOutputModeLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxALL + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Color" "Black and White" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_ModeColorOption + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 3 + 0 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Plot background color + + 0 + + + 0 + + 1 + m_plotBackgroundColor + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Plot the background color if the output format supports it + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxALL + 4 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Color theme: + 0 + + 0 + + + 0 + + 1 + m_staticText9 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxALL|wxEXPAND + 4 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_colorTheme + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + Select the color theme to use for plotting + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxLEFT + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default line width: + 0 + + 0 + + + 0 + + 1 + m_lineWidthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxEXPAND|wxALL + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_lineWidthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Selection of the default pen thickness used to draw items, when their thickness is set to 0. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + 0 + + 0 + + + 0 + + 1 + m_lineWidthUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + 5 + wxEXPAND + 1 + + + bOptionsRight + wxVERTICAL + none + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + wxID_ANY + HPGL Options + + m_HPGLOptionsSizer + wxVERTICAL + 1 + protected + + 5 + wxEXPAND + 1 + + + wxBOTH + 1 + + 0 + + gbSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Position and units: + 0 + + 0 + + + 0 + + 1 + m_plotOriginTitle + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Bottom left, plotter units" "Centered, plotter units" "Page fit, user units" "Content fit, user units" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_plotOriginOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pen width: + 0 + + 0 + + + 0 + + 1 + m_penWidthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxEXPAND|wxALL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_penWidthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + 1 + 2 + wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + 0 + + 0 + + + 0 + + 1 + m_penWidthUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + 5 + wxEXPAND|wxLEFT|wxRIGHT + 1 + + wxID_ANY + Other options + + m_otherOptions + wxVERTICAL + 1 + protected + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + Open file after plot + + 0 + + + 0 + + 1 + m_openFileAfterPlot + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Open output file with associated application after successful plot + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + + bSizerMsgPanel + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + 300,150 + 1 + m_MessagesBox + 1 + + + protected + 1 + + Resizable + 1 + + WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare + 0 + + + + wxTAB_TRAVERSAL + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer1 + protected + OnPlotCurrent + OnPlotAll + + + + + + diff --git a/eeschema/dialogs/dialog_plot_schematic_base.h b/eeschema/dialogs/dialog_plot_schematic_base.h index 25572e4e22..44f6038ebc 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.h +++ b/eeschema/dialogs/dialog_plot_schematic_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_HTML_REPORT_PANEL; #include "dialog_shim.h" @@ -46,7 +47,7 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM protected: wxStaticText* m_staticTextOutputDirectory; wxTextCtrl* m_outputDirectoryName; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxBoxSizer* m_optionsSizer; wxRadioBox* m_plotFormatOpt; wxStaticText* m_staticText4; diff --git a/eeschema/dialogs/dialog_sch_import_settings.cpp b/eeschema/dialogs/dialog_sch_import_settings.cpp index dabf2b870e..952eb24433 100644 --- a/eeschema/dialogs/dialog_sch_import_settings.cpp +++ b/eeschema/dialogs/dialog_sch_import_settings.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2022 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 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/eeschema/dialogs/dialog_sch_import_settings_base.cpp b/eeschema/dialogs/dialog_sch_import_settings_base.cpp index ad6d7f3646..2fe70399d0 100644 --- a/eeschema/dialogs/dialog_sch_import_settings_base.cpp +++ b/eeschema/dialogs/dialog_sch_import_settings_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Aug 10 2021) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_sch_import_settings_base.h" /////////////////////////////////////////////////////////////////////////// @@ -29,10 +31,8 @@ DIALOG_SCH_IMPORT_SETTINGS_BASE::DIALOG_SCH_IMPORT_SETTINGS_BASE( wxWindow* pare bupperSizer->Add( m_filePathCtrl, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - m_browseButton->SetMinSize( wxSize( 29,29 ) ); - - bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_MainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/dialog_sch_import_settings_base.fbp b/eeschema/dialogs/dialog_sch_import_settings_base.fbp index 7766d594a1..6f9c12ab51 100644 --- a/eeschema/dialogs/dialog_sch_import_settings_base.fbp +++ b/eeschema/dialogs/dialog_sch_import_settings_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -197,7 +197,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -241,7 +241,7 @@ 0 - 29,29 + -1,-1 1 m_browseButton 1 @@ -256,7 +256,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/eeschema/dialogs/dialog_sch_import_settings_base.h b/eeschema/dialogs/dialog_sch_import_settings_base.h index a84144440c..852bf4553a 100644 --- a/eeschema/dialogs/dialog_sch_import_settings_base.h +++ b/eeschema/dialogs/dialog_sch_import_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Aug 10 2021) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "dialog_shim.h" #include #include @@ -39,7 +41,7 @@ class DIALOG_SCH_IMPORT_SETTINGS_BASE : public DIALOG_SHIM protected: wxBoxSizer* m_MainSizer; wxTextCtrl* m_filePathCtrl; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxBoxSizer* m_buttonsSizer; wxButton* m_selectAllButton; wxStdDialogButtonSizer* m_sdbSizer1; diff --git a/eeschema/dialogs/dialog_sheet_properties.cpp b/eeschema/dialogs/dialog_sheet_properties.cpp index 24ccb79f73..eba2dd47f9 100644 --- a/eeschema/dialogs/dialog_sheet_properties.cpp +++ b/eeschema/dialogs/dialog_sheet_properties.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/eeschema/dialogs/dialog_sheet_properties_base.cpp b/eeschema/dialogs/dialog_sheet_properties_base.cpp index 81065a657c..9120335711 100644 --- a/eeschema/dialogs/dialog_sheet_properties_base.cpp +++ b/eeschema/dialogs/dialog_sheet_properties_base.cpp @@ -1,11 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "widgets/infobar.h" +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_sheet_properties_base.h" @@ -56,7 +57,6 @@ DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wx m_grid->SetColSize( 12, 48 ); m_grid->EnableDragColMove( false ); m_grid->EnableDragColSize( true ); - m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelValue( 0, _("Name") ); m_grid->SetColLabelValue( 1, _("Value") ); m_grid->SetColLabelValue( 2, _("Show") ); @@ -70,6 +70,7 @@ DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wx m_grid->SetColLabelValue( 10, _("Y Position") ); m_grid->SetColLabelValue( 11, _("Font") ); m_grid->SetColLabelValue( 12, _("Color") ); + m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -88,17 +89,17 @@ DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wx wxBoxSizer* bButtonSize; bButtonSize = new wxBoxSizer( wxHORIZONTAL ); - m_bpAdd = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAdd = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpAdd->SetToolTip( _("Add field") ); bButtonSize->Add( m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_bpMoveUp = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpMoveUp = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpMoveUp->SetToolTip( _("Move up") ); bButtonSize->Add( m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_bpMoveDown = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpMoveDown = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpMoveDown->SetToolTip( _("Move down") ); bButtonSize->Add( m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); @@ -106,7 +107,7 @@ DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wx bButtonSize->Add( 20, 0, 0, wxEXPAND, 10 ); - m_bpDelete = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDelete = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpDelete->SetToolTip( _("Delete field") ); bButtonSize->Add( m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/dialog_sheet_properties_base.fbp b/eeschema/dialogs/dialog_sheet_properties_base.fbp index 9a3726553f..eb2019e63a 100644 --- a/eeschema/dialogs/dialog_sheet_properties_base.fbp +++ b/eeschema/dialogs/dialog_sheet_properties_base.fbp @@ -1,6 +1,6 @@ - + ; C++ @@ -14,6 +14,7 @@ dialog_sheet_properties_base 1000 none + 1 dialog_sheet_properties_base @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Sheet Properties + 0 @@ -252,6 +255,7 @@ + 0 @@ -299,7 +303,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add field @@ -325,6 +329,7 @@ + 0 @@ -372,7 +377,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move up @@ -398,6 +403,7 @@ + 0 @@ -445,7 +451,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move down @@ -481,6 +487,7 @@ + 0 @@ -528,7 +535,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Delete field diff --git a/eeschema/dialogs/dialog_sheet_properties_base.h b/eeschema/dialogs/dialog_sheet_properties_base.h index 4605f49c05..1e53140cc4 100644 --- a/eeschema/dialogs/dialog_sheet_properties_base.h +++ b/eeschema/dialogs/dialog_sheet_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; class WX_INFOBAR; @@ -48,10 +49,10 @@ class DIALOG_SHEET_PROPERTIES_BASE : public DIALOG_SHIM WX_INFOBAR* m_infoBar; wxBoxSizer* m_longForm; WX_GRID* m_grid; - wxBitmapButton* m_bpAdd; - wxBitmapButton* m_bpMoveUp; - wxBitmapButton* m_bpMoveDown; - wxBitmapButton* m_bpDelete; + STD_BITMAP_BUTTON* m_bpAdd; + STD_BITMAP_BUTTON* m_bpMoveUp; + STD_BITMAP_BUTTON* m_bpMoveDown; + STD_BITMAP_BUTTON* m_bpDelete; wxStaticText* m_borderWidthLabel; wxTextCtrl* m_borderWidthCtrl; wxStaticText* m_borderWidthUnits; @@ -69,7 +70,7 @@ class DIALOG_SHEET_PROPERTIES_BASE : public DIALOG_SHIM wxButton* m_stdDialogButtonSizerOK; wxButton* m_stdDialogButtonSizerCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnSizeGrid( wxSizeEvent& event ) { event.Skip(); } @@ -82,6 +83,7 @@ class DIALOG_SHEET_PROPERTIES_BASE : public DIALOG_SHIM public: DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sheet Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); + ~DIALOG_SHEET_PROPERTIES_BASE(); }; diff --git a/eeschema/dialogs/dialog_sim_model.cpp b/eeschema/dialogs/dialog_sim_model.cpp index 230d96740d..3f080667d3 100644 --- a/eeschema/dialogs/dialog_sim_model.cpp +++ b/eeschema/dialogs/dialog_sim_model.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/dialogs/dialog_sim_model_base.cpp b/eeschema/dialogs/dialog_sim_model_base.cpp index 83d876ff54..b350d8f787 100644 --- a/eeschema/dialogs/dialog_sim_model_base.cpp +++ b/eeschema/dialogs/dialog_sim_model_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_sim_model_base.h" @@ -42,9 +43,9 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c bSizer7 = new wxBoxSizer( wxHORIZONTAL ); m_libraryPathText = new wxTextCtrl( m_modelPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - bSizer7->Add( m_libraryPathText, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); + bSizer7->Add( m_libraryPathText, 1, wxALIGN_CENTER_VERTICAL, 3 ); - m_browseButton = new wxBitmapButton( m_modelPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_browseButton = new STD_BITMAP_BUTTON( m_modelPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer7->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); diff --git a/eeschema/dialogs/dialog_sim_model_base.fbp b/eeschema/dialogs/dialog_sim_model_base.fbp index a11e68ec28..29cb7fceed 100644 --- a/eeschema/dialogs/dialog_sim_model_base.fbp +++ b/eeschema/dialogs/dialog_sim_model_base.fbp @@ -346,7 +346,7 @@ none 3 - wxALIGN_CENTER_VERTICAL|wxRIGHT + wxALIGN_CENTER_VERTICAL 1 1 @@ -471,7 +471,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/eeschema/dialogs/dialog_sim_model_base.h b/eeschema/dialogs/dialog_sim_model_base.h index 7898f08266..92eb7c06e9 100644 --- a/eeschema/dialogs/dialog_sim_model_base.h +++ b/eeschema/dialogs/dialog_sim_model_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include "dialog_shim.h" @@ -56,7 +57,7 @@ class DIALOG_SIM_MODEL_BASE : public DIALOG_SHIM wxRadioButton* m_useLibraryModelRadioButton; wxStaticText* m_pathLabel; wxTextCtrl* m_libraryPathText; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxStaticText* m_modelNameLabel; wxComboBox* m_modelNameCombobox; wxStaticText* m_ibisPinLabel; diff --git a/eeschema/dialogs/dialog_symbol_properties.cpp b/eeschema/dialogs/dialog_symbol_properties.cpp index 07f781ddf1..d77fd8c655 100644 --- a/eeschema/dialogs/dialog_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_symbol_properties.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/eeschema/dialogs/dialog_symbol_properties_base.cpp b/eeschema/dialogs/dialog_symbol_properties_base.cpp index 143e1f5e56..379bc9fbae 100644 --- a/eeschema/dialogs/dialog_symbol_properties_base.cpp +++ b/eeschema/dialogs/dialog_symbol_properties_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_symbol_properties_base.h" @@ -83,17 +84,17 @@ DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, wxBoxSizer* bButtonSize; bButtonSize = new wxBoxSizer( wxHORIZONTAL ); - m_bpAdd = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAdd = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpAdd->SetToolTip( _("Add field") ); bButtonSize->Add( m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_bpMoveUp = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpMoveUp = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpMoveUp->SetToolTip( _("Move up") ); bButtonSize->Add( m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_bpMoveDown = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpMoveDown = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpMoveDown->SetToolTip( _("Move down") ); bButtonSize->Add( m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); @@ -101,7 +102,7 @@ DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, bButtonSize->Add( 20, 0, 0, wxEXPAND, 10 ); - m_bpDelete = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDelete = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpDelete->SetToolTip( _("Delete field") ); bButtonSize->Add( m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); diff --git a/eeschema/dialogs/dialog_symbol_properties_base.fbp b/eeschema/dialogs/dialog_symbol_properties_base.fbp index 0b772a47e3..1356b48b61 100644 --- a/eeschema/dialogs/dialog_symbol_properties_base.fbp +++ b/eeschema/dialogs/dialog_symbol_properties_base.fbp @@ -353,7 +353,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add field @@ -427,7 +427,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move up @@ -501,7 +501,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move down @@ -585,7 +585,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Delete field diff --git a/eeschema/dialogs/dialog_symbol_properties_base.h b/eeschema/dialogs/dialog_symbol_properties_base.h index 7259f81e6b..e5cdeb6749 100644 --- a/eeschema/dialogs/dialog_symbol_properties_base.h +++ b/eeschema/dialogs/dialog_symbol_properties_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include "dialog_shim.h" @@ -49,10 +50,10 @@ class DIALOG_SYMBOL_PROPERTIES_BASE : public DIALOG_SHIM wxNotebook* m_notebook1; wxPanel* generalPage; WX_GRID* m_fieldsGrid; - wxBitmapButton* m_bpAdd; - wxBitmapButton* m_bpMoveUp; - wxBitmapButton* m_bpMoveDown; - wxBitmapButton* m_bpDelete; + STD_BITMAP_BUTTON* m_bpAdd; + STD_BITMAP_BUTTON* m_bpMoveUp; + STD_BITMAP_BUTTON* m_bpMoveDown; + STD_BITMAP_BUTTON* m_bpDelete; wxStaticText* m_unitLabel; wxChoice* m_unitChoice; wxCheckBox* m_cbAlternateSymbol; diff --git a/eeschema/dialogs/panel_setup_buses.cpp b/eeschema/dialogs/panel_setup_buses.cpp index 4775737fed..c57eea4fd6 100644 --- a/eeschema/dialogs/panel_setup_buses.cpp +++ b/eeschema/dialogs/panel_setup_buses.cpp @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/eeschema/dialogs/panel_setup_buses_base.cpp b/eeschema/dialogs/panel_setup_buses_base.cpp index 59ac2841f9..a1c5a85ca3 100644 --- a/eeschema/dialogs/panel_setup_buses_base.cpp +++ b/eeschema/dialogs/panel_setup_buses_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_setup_buses_base.h" @@ -57,13 +58,13 @@ PANEL_SETUP_BUSES_BASE::PANEL_SETUP_BUSES_BASE( wxWindow* parent, wxWindowID id, wxBoxSizer* bSizer10; bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - m_addAlias = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_addAlias = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer10->Add( m_addAlias, 0, wxTOP, 5 ); bSizer10->Add( 20, 0, 0, wxEXPAND, 5 ); - m_deleteAlias = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_deleteAlias = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer10->Add( m_deleteAlias, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -124,13 +125,13 @@ PANEL_SETUP_BUSES_BASE::PANEL_SETUP_BUSES_BASE( wxWindow* parent, wxWindowID id, wxBoxSizer* bSizer101; bSizer101 = new wxBoxSizer( wxHORIZONTAL ); - m_addMember = new wxBitmapButton( membersPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_addMember = new STD_BITMAP_BUTTON( membersPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer101->Add( m_addMember, 0, wxTOP, 5 ); bSizer101->Add( 20, 0, 0, wxEXPAND, 5 ); - m_removeMember = new wxBitmapButton( membersPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_removeMember = new STD_BITMAP_BUTTON( membersPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer101->Add( m_removeMember, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/panel_setup_buses_base.fbp b/eeschema/dialogs/panel_setup_buses_base.fbp index b2fe55b21a..f2dd9e76e2 100644 --- a/eeschema/dialogs/panel_setup_buses_base.fbp +++ b/eeschema/dialogs/panel_setup_buses_base.fbp @@ -296,7 +296,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -380,7 +380,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -811,7 +811,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -895,7 +895,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/eeschema/dialogs/panel_setup_buses_base.h b/eeschema/dialogs/panel_setup_buses_base.h index 4e06f78ce7..5b0a2dc9dc 100644 --- a/eeschema/dialogs/panel_setup_buses_base.h +++ b/eeschema/dialogs/panel_setup_buses_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include @@ -26,7 +27,6 @@ class WX_GRID; #include #include #include -#include #include /////////////////////////////////////////////////////////////////////////// @@ -43,15 +43,15 @@ class PANEL_SETUP_BUSES_BASE : public wxPanel wxBoxSizer* bLeftCol; wxStaticText* m_busesLabel; WX_GRID* m_aliasesGrid; - wxBitmapButton* m_addAlias; - wxBitmapButton* m_deleteAlias; + STD_BITMAP_BUTTON* m_addAlias; + STD_BITMAP_BUTTON* m_deleteAlias; wxStaticText* m_source; wxSimplebook* m_membersBook; wxPanel* membersPanel; wxStaticText* m_membersLabel; WX_GRID* m_membersGrid; - wxBitmapButton* m_addMember; - wxBitmapButton* m_removeMember; + STD_BITMAP_BUTTON* m_addMember; + STD_BITMAP_BUTTON* m_removeMember; wxPanel* emptyPanel; // Virtual event handlers, override them in your derived class diff --git a/eeschema/dialogs/panel_sym_lib_table.cpp b/eeschema/dialogs/panel_sym_lib_table.cpp index 360ef540a6..ee90886565 100644 --- a/eeschema/dialogs/panel_sym_lib_table.cpp +++ b/eeschema/dialogs/panel_sym_lib_table.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include diff --git a/eeschema/dialogs/panel_sym_lib_table_base.cpp b/eeschema/dialogs/panel_sym_lib_table_base.cpp index 964d30085e..af2b73b520 100644 --- a/eeschema/dialogs/panel_sym_lib_table_base.cpp +++ b/eeschema/dialogs/panel_sym_lib_table_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_sym_lib_table_base.h" @@ -101,22 +102,22 @@ PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE( wxWindow* parent, wxWindowID wxBoxSizer* bSizer51; bSizer51 = new wxBoxSizer( wxHORIZONTAL ); - m_append_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_append_button = new STD_BITMAP_BUTTON( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_append_button->SetToolTip( _("Add empty row to table") ); bSizer51->Add( m_append_button, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); - m_browse_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_browse_button = new STD_BITMAP_BUTTON( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_browse_button->SetToolTip( _("Add existing library to table") ); bSizer51->Add( m_browse_button, 0, wxBOTTOM|wxRIGHT, 5 ); - m_move_up_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_move_up_button = new STD_BITMAP_BUTTON( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_move_up_button->SetToolTip( _("Move up") ); bSizer51->Add( m_move_up_button, 0, wxBOTTOM|wxRIGHT, 5 ); - m_move_down_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_move_down_button = new STD_BITMAP_BUTTON( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_move_down_button->SetToolTip( _("Move down") ); bSizer51->Add( m_move_down_button, 0, wxBOTTOM|wxRIGHT, 5 ); @@ -124,7 +125,7 @@ PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE( wxWindow* parent, wxWindowID bSizer51->Add( 20, 0, 0, wxEXPAND, 5 ); - m_delete_button = new wxBitmapButton( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_delete_button = new STD_BITMAP_BUTTON( m_top_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_delete_button->SetToolTip( _("Remove library from table") ); bSizer51->Add( m_delete_button, 0, wxBOTTOM|wxRIGHT, 5 ); diff --git a/eeschema/dialogs/panel_sym_lib_table_base.fbp b/eeschema/dialogs/panel_sym_lib_table_base.fbp index 986bd5b5a4..767269bda7 100644 --- a/eeschema/dialogs/panel_sym_lib_table_base.fbp +++ b/eeschema/dialogs/panel_sym_lib_table_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ panel_sym_lib_table_base 1000 none + 1 sym_lib_table @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -46,6 +48,7 @@ -1,-1 ; forward_declare + 0 wxTAB_TRAVERSAL @@ -450,6 +453,7 @@ + 0 @@ -497,7 +501,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add empty row to table @@ -523,6 +527,7 @@ + 0 @@ -570,7 +575,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add existing library to table @@ -596,6 +601,7 @@ + 0 @@ -643,7 +649,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move up @@ -669,6 +675,7 @@ + 0 @@ -716,7 +723,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move down @@ -752,6 +759,7 @@ + 0 @@ -799,7 +807,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Remove library from table @@ -835,6 +843,7 @@ + 0 diff --git a/eeschema/dialogs/panel_sym_lib_table_base.h b/eeschema/dialogs/panel_sym_lib_table_base.h index 27098ea3f1..bbf423f180 100644 --- a/eeschema/dialogs/panel_sym_lib_table_base.h +++ b/eeschema/dialogs/panel_sym_lib_table_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include @@ -44,15 +45,15 @@ class PANEL_SYM_LIB_TABLE_BASE : public wxPanel WX_GRID* m_global_grid; wxPanel* m_project_panel; WX_GRID* m_project_grid; - wxBitmapButton* m_append_button; - wxBitmapButton* m_browse_button; - wxBitmapButton* m_move_up_button; - wxBitmapButton* m_move_down_button; - wxBitmapButton* m_delete_button; + STD_BITMAP_BUTTON* m_append_button; + STD_BITMAP_BUTTON* m_browse_button; + STD_BITMAP_BUTTON* m_move_up_button; + STD_BITMAP_BUTTON* m_move_down_button; + STD_BITMAP_BUTTON* m_delete_button; wxButton* m_convertLegacy; WX_GRID* m_path_subs_grid; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void appendRowHandler( wxCommandEvent& event ) { event.Skip(); } virtual void browseLibrariesHandler( wxCommandEvent& event ) { event.Skip(); } @@ -66,6 +67,7 @@ class PANEL_SYM_LIB_TABLE_BASE : public wxPanel public: PANEL_SYM_LIB_TABLE_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_SYM_LIB_TABLE_BASE(); }; diff --git a/eeschema/dialogs/panel_template_fieldnames.cpp b/eeschema/dialogs/panel_template_fieldnames.cpp index 0833982b2d..5c467d4ab2 100644 --- a/eeschema/dialogs/panel_template_fieldnames.cpp +++ b/eeschema/dialogs/panel_template_fieldnames.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/eeschema/dialogs/panel_template_fieldnames_base.cpp b/eeschema/dialogs/panel_template_fieldnames_base.cpp index 460b9e4fed..e4d668b4df 100644 --- a/eeschema/dialogs/panel_template_fieldnames_base.cpp +++ b/eeschema/dialogs/panel_template_fieldnames_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_template_fieldnames_base.h" @@ -39,10 +40,10 @@ PANEL_TEMPLATE_FIELDNAMES_BASE::PANEL_TEMPLATE_FIELDNAMES_BASE( wxWindow* parent m_grid->SetColSize( 2, 60 ); m_grid->EnableDragColMove( false ); m_grid->EnableDragColSize( true ); - m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelValue( 0, _("Name") ); m_grid->SetColLabelValue( 1, _("Visible") ); m_grid->SetColLabelValue( 2, _("URL") ); + m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -61,13 +62,13 @@ PANEL_TEMPLATE_FIELDNAMES_BASE::PANEL_TEMPLATE_FIELDNAMES_BASE( wxWindow* parent wxBoxSizer* bSizer10; bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - m_addFieldButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_addFieldButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer10->Add( m_addFieldButton, 0, wxTOP|wxRIGHT, 5 ); bSizer10->Add( 20, 0, 0, wxEXPAND, 5 ); - m_deleteFieldButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_deleteFieldButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer10->Add( m_deleteFieldButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/panel_template_fieldnames_base.fbp b/eeschema/dialogs/panel_template_fieldnames_base.fbp index 16b098eff2..0c52923a5c 100644 --- a/eeschema/dialogs/panel_template_fieldnames_base.fbp +++ b/eeschema/dialogs/panel_template_fieldnames_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ panel_template_fieldnames_base 1000 none + 1 PanelTemplateFieldnames @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -46,6 +48,7 @@ -1,-1 ; forward_declare + 0 wxTAB_TRAVERSAL @@ -244,6 +247,7 @@ + 0 @@ -291,7 +295,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -327,6 +331,7 @@ + 0 @@ -374,7 +379,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/eeschema/dialogs/panel_template_fieldnames_base.h b/eeschema/dialogs/panel_template_fieldnames_base.h index acbcce7863..2fd0bb09c1 100644 --- a/eeschema/dialogs/panel_template_fieldnames_base.h +++ b/eeschema/dialogs/panel_template_fieldnames_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include @@ -41,10 +42,10 @@ class PANEL_TEMPLATE_FIELDNAMES_BASE : public wxPanel wxBoxSizer* m_topMargin; wxStaticText* m_title; WX_GRID* m_grid; - wxBitmapButton* m_addFieldButton; - wxBitmapButton* m_deleteFieldButton; + STD_BITMAP_BUTTON* m_addFieldButton; + STD_BITMAP_BUTTON* m_deleteFieldButton; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnSizeGrid( wxSizeEvent& event ) { event.Skip(); } virtual void OnAddButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnDeleteButtonClick( wxCommandEvent& event ) { event.Skip(); } @@ -53,6 +54,7 @@ class PANEL_TEMPLATE_FIELDNAMES_BASE : public wxPanel public: PANEL_TEMPLATE_FIELDNAMES_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_TEMPLATE_FIELDNAMES_BASE(); }; diff --git a/include/dialogs/dialog_page_settings.h b/include/dialogs/dialog_page_settings.h index 5bac1b992f..5704fe264c 100644 --- a/include/dialogs/dialog_page_settings.h +++ b/include/dialogs/dialog_page_settings.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2022 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 @@ -23,6 +23,7 @@ #include #include #include +#include #include class DS_DATA_MODEL; diff --git a/include/widgets/std_bitmap_button.h b/include/widgets/std_bitmap_button.h new file mode 100644 index 0000000000..dbe34b4cdb --- /dev/null +++ b/include/widgets/std_bitmap_button.h @@ -0,0 +1,68 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2020-2022 Kicad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2016 Anil8735(https://stackoverflow.com/users/3659387/anil8753) from https://stackoverflow.com/a/37274011 + * + * 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 2 + * 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, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef STD_BITMAP_BUTTON_H +#define STD_BITMAP_BUTTON_H + +#include +#include + +class wxButton; + +/** + * A bitmap button widget that behaves like a standard dialog button except with an icon. + * Specifically: + * * It has a border + * * It has no hover/focused state + */ + +class STD_BITMAP_BUTTON : public wxPanel +{ +public: + // For use with wxFormBuilder on a sub-classed wxBitmapButton + STD_BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId, const wxBitmap& aDummyBitmap, + const wxPoint& aPos = wxDefaultPosition, const wxSize& aSize = wxDefaultSize, + int aStyle = 0 ); + + ~STD_BITMAP_BUTTON(); + + void SetBitmap( const wxBitmap& aBmp ); + bool Enable( bool aEnable = true ) override; + +protected: + void OnKillFocus( wxFocusEvent& aEvent ); + void OnMouseLeave( wxMouseEvent& aEvent ); + void OnMouseEnter( wxMouseEvent& aEvent ); + void OnLeftButtonUp( wxMouseEvent& aEvent ); + void OnLeftButtonDown( wxMouseEvent& aEvent ); + void OnPaint( wxPaintEvent& WXUNUSED( aEvent ) ); + void onThemeChanged( wxSysColourChangedEvent &aEvent ); + +private: + int m_stateButton = 0; + bool m_bIsEnable = true; + wxBitmap m_bitmap; +}; + +#endif /*STD_BITMAP_BUTTON_H*/ diff --git a/kicad/dialogs/dialog_template_selector.cpp b/kicad/dialogs/dialog_template_selector.cpp index d56cd81b55..d9ab020715 100644 --- a/kicad/dialogs/dialog_template_selector.cpp +++ b/kicad/dialogs/dialog_template_selector.cpp @@ -24,6 +24,7 @@ #include "dialog_template_selector.h" #include +#include #include #include #include diff --git a/kicad/dialogs/dialog_template_selector_base.cpp b/kicad/dialogs/dialog_template_selector_base.cpp index 553cdb72b4..51db24743d 100644 --- a/kicad/dialogs/dialog_template_selector_base.cpp +++ b/kicad/dialogs/dialog_template_selector_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_template_selector_base.h" /////////////////////////////////////////////////////////////////////////// @@ -26,10 +28,10 @@ DIALOG_TEMPLATE_SELECTOR_BASE::DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, m_tcTemplatePath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); bsizerTemplateSelector->Add( m_tcTemplatePath, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bsizerTemplateSelector->Add( m_browseButton, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 ); - m_reloadButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_reloadButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bsizerTemplateSelector->Add( m_reloadButton, 0, wxALL, 5 ); diff --git a/kicad/dialogs/dialog_template_selector_base.fbp b/kicad/dialogs/dialog_template_selector_base.fbp index d46f24f092..5a851b042a 100644 --- a/kicad/dialogs/dialog_template_selector_base.fbp +++ b/kicad/dialogs/dialog_template_selector_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_template_selector_base 1000 none + 1 DIALOG_TEMPLATE_SELECTOR_BASE @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Project Template Selector + 0 @@ -205,6 +208,7 @@ + 0 @@ -252,7 +256,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -278,6 +282,7 @@ + 0 @@ -325,7 +330,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -556,6 +561,7 @@ -1,140 + 0 wxTAB_TRAVERSAL|wxBORDER_NONE @@ -664,6 +670,7 @@ 108,-1 + 0 wxTAB_TRAVERSAL diff --git a/kicad/dialogs/dialog_template_selector_base.h b/kicad/dialogs/dialog_template_selector_base.h index 3c44f6cbbf..1655f79a08 100644 --- a/kicad/dialogs/dialog_template_selector_base.h +++ b/kicad/dialogs/dialog_template_selector_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "html_window.h" #include "dialog_shim.h" #include @@ -46,8 +48,8 @@ class DIALOG_TEMPLATE_SELECTOR_BASE : public DIALOG_SHIM protected: wxStaticText* m_staticTextTpath; wxTextCtrl* m_tcTemplatePath; - wxBitmapButton* m_browseButton; - wxBitmapButton* m_reloadButton; + STD_BITMAP_BUTTON* m_browseButton; + STD_BITMAP_BUTTON* m_reloadButton; wxNotebook* m_notebook; HTML_WINDOW* m_htmlWin; wxStaticLine* m_staticline; @@ -55,7 +57,7 @@ class DIALOG_TEMPLATE_SELECTOR_BASE : public DIALOG_SHIM wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void onDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); } virtual void onReload( wxCommandEvent& event ) { event.Skip(); } virtual void OnPageChange( wxNotebookEvent& event ) { event.Skip(); } @@ -65,6 +67,7 @@ class DIALOG_TEMPLATE_SELECTOR_BASE : public DIALOG_SHIM public: DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Project Template Selector"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_TEMPLATE_SELECTOR_BASE(); }; @@ -84,6 +87,7 @@ class TEMPLATE_SELECTION_PANEL_BASE : public wxPanel wxGridSizer* m_SizerChoice; TEMPLATE_SELECTION_PANEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,140 ), long style = wxTAB_TRAVERSAL|wxBORDER_NONE, const wxString& name = wxEmptyString ); + ~TEMPLATE_SELECTION_PANEL_BASE(); }; @@ -102,6 +106,7 @@ class TEMPLATE_WIDGET_BASE : public wxPanel public: TEMPLATE_WIDGET_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 108,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + ~TEMPLATE_WIDGET_BASE(); }; diff --git a/kicad/pcm/dialogs/dialog_manage_repositories.cpp b/kicad/pcm/dialogs/dialog_manage_repositories.cpp index 665561d342..ef069ec75c 100644 --- a/kicad/pcm/dialogs/dialog_manage_repositories.cpp +++ b/kicad/pcm/dialogs/dialog_manage_repositories.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2021 Andrew Lutsenko, anlutsenko at gmail dot com - * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2022 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 @@ -19,11 +19,12 @@ */ #include "dialog_manage_repositories.h" -#include "bitmaps/bitmap_types.h" -#include "bitmaps/bitmaps_list.h" -#include "grid_tricks.h" -#include "settings/kicad_settings.h" -#include "widgets/wx_grid.h" +#include +#include +#include +#include +#include +#include #define GRID_CELL_MARGIN 4 diff --git a/kicad/pcm/dialogs/dialog_manage_repositories_base.cpp b/kicad/pcm/dialogs/dialog_manage_repositories_base.cpp index 5a330d8be8..b59bd79000 100644 --- a/kicad/pcm/dialogs/dialog_manage_repositories_base.cpp +++ b/kicad/pcm/dialogs/dialog_manage_repositories_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_manage_repositories_base.h" @@ -57,16 +58,16 @@ DIALOG_MANAGE_REPOSITORIES_BASE::DIALOG_MANAGE_REPOSITORIES_BASE( wxWindow* pare m_buttonAdd = new SPLIT_BUTTON( this, wxID_ANY, _( "Add Existing" ) ); bButtonsSizer->Add( m_buttonAdd, 0, wxRIGHT, 5 ); - m_buttonMoveUp = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_buttonMoveUp = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonsSizer->Add( m_buttonMoveUp, 0, wxRIGHT, 5 ); - m_buttonMoveDown = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_buttonMoveDown = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonsSizer->Add( m_buttonMoveDown, 0, wxRIGHT, 5 ); bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 ); - m_buttonRemove = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_buttonRemove = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonsSizer->Add( m_buttonRemove, 0, 0, 5 ); diff --git a/kicad/pcm/dialogs/dialog_manage_repositories_base.fbp b/kicad/pcm/dialogs/dialog_manage_repositories_base.fbp index fc530e0d57..105136cc13 100644 --- a/kicad/pcm/dialogs/dialog_manage_repositories_base.fbp +++ b/kicad/pcm/dialogs/dialog_manage_repositories_base.fbp @@ -291,7 +291,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -365,7 +365,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -449,7 +449,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/kicad/pcm/dialogs/dialog_manage_repositories_base.h b/kicad/pcm/dialogs/dialog_manage_repositories_base.h index 6a26c5aeb0..3e719f675c 100644 --- a/kicad/pcm/dialogs/dialog_manage_repositories_base.h +++ b/kicad/pcm/dialogs/dialog_manage_repositories_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include "dialog_shim.h" @@ -41,9 +42,9 @@ class DIALOG_MANAGE_REPOSITORIES_BASE : public DIALOG_SHIM protected: WX_GRID* m_grid; SPLIT_BUTTON* m_buttonAdd; - wxBitmapButton* m_buttonMoveUp; - wxBitmapButton* m_buttonMoveDown; - wxBitmapButton* m_buttonRemove; + STD_BITMAP_BUTTON* m_buttonMoveUp; + STD_BITMAP_BUTTON* m_buttonMoveDown; + STD_BITMAP_BUTTON* m_buttonRemove; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1Save; wxButton* m_sdbSizer1Cancel; diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d4d2a156ae..ab97da7f52 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -122,8 +122,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_move_exact_base.cpp dialogs/dialog_net_inspector.cpp dialogs/dialog_net_inspector_base.cpp - dialogs/dialog_netlist.cpp - dialogs/dialog_netlist_base.cpp + dialogs/dialog_import_netlist.cpp + dialogs/dialog_import_netlist_base.cpp dialogs/dialog_non_copper_zones_properties.cpp dialogs/dialog_non_copper_zones_properties_base.cpp dialogs/dialog_pad_basicshapes_properties.cpp diff --git a/pcbnew/dialogs/dialog_export_svg.cpp b/pcbnew/dialogs/dialog_export_svg.cpp index d4b0adf7a0..080fd29b03 100644 --- a/pcbnew/dialogs/dialog_export_svg.cpp +++ b/pcbnew/dialogs/dialog_export_svg.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_export_svg_base.cpp b/pcbnew/dialogs/dialog_export_svg_base.cpp index 955f787a73..2895a9c05c 100644 --- a/pcbnew/dialogs/dialog_export_svg_base.cpp +++ b/pcbnew/dialogs/dialog_export_svg_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_html_report_panel.h" #include "dialog_export_svg_base.h" @@ -31,8 +32,8 @@ DIALOG_EXPORT_SVG_BASE::DIALOG_EXPORT_SVG_BASE( wxWindow* parent, wxWindowID id, bSizer4->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer4->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizer4->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 ); bMainSizer->Add( bSizer4, 0, wxEXPAND|wxALL, 10 ); diff --git a/pcbnew/dialogs/dialog_export_svg_base.fbp b/pcbnew/dialogs/dialog_export_svg_base.fbp index 3b108ed2b5..8cfb3bf0ce 100644 --- a/pcbnew/dialogs/dialog_export_svg_base.fbp +++ b/pcbnew/dialogs/dialog_export_svg_base.fbp @@ -197,7 +197,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT + wxALIGN_CENTER_VERTICAL 0 1 @@ -254,9 +254,9 @@ Resizable 1 - + -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_export_svg_base.h b/pcbnew/dialogs/dialog_export_svg_base.h index 05ce72328b..b82dbd5d9d 100644 --- a/pcbnew/dialogs/dialog_export_svg_base.h +++ b/pcbnew/dialogs/dialog_export_svg_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_HTML_REPORT_PANEL; #include "dialog_shim.h" @@ -45,7 +46,7 @@ class DIALOG_EXPORT_SVG_BASE : public DIALOG_SHIM protected: wxStaticText* m_staticTextDir; wxTextCtrl* m_outputDirectoryName; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxStaticText* m_staticTextCopperLayers; wxCheckListBox* m_CopperLayersList; wxStaticText* m_staticTextTechLayers; diff --git a/pcbnew/dialogs/dialog_footprint_properties.cpp b/pcbnew/dialogs/dialog_footprint_properties.cpp index 3c20b8bed2..41833cbebb 100644 --- a/pcbnew/dialogs/dialog_footprint_properties.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties.cpp @@ -39,13 +39,11 @@ #include #include #include +#include #include - #include - -#include "dialogs/3d_cache_dialogs.h" -#include "dialogs/panel_preview_3d_model.h" - +#include +#include #include diff --git a/pcbnew/dialogs/dialog_footprint_properties_base.cpp b/pcbnew/dialogs/dialog_footprint_properties_base.cpp index 52b77dcd63..089b835507 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_base.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/text_ctrl_eval.h" #include "widgets/wx_grid.h" @@ -81,13 +82,13 @@ DIALOG_FOOTPRINT_PROPERTIES_BASE::DIALOG_FOOTPRINT_PROPERTIES_BASE( wxWindow* pa wxBoxSizer* bButtonSize; bButtonSize = new wxBoxSizer( wxHORIZONTAL ); - m_bpAdd = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAdd = new STD_BITMAP_BUTTON( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSize->Add( m_bpAdd, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 ); - m_bpDelete = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDelete = new STD_BITMAP_BUTTON( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSize->Add( m_bpDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); diff --git a/pcbnew/dialogs/dialog_footprint_properties_base.fbp b/pcbnew/dialogs/dialog_footprint_properties_base.fbp index c0ca8fb313..9a7188990b 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_base.fbp +++ b/pcbnew/dialogs/dialog_footprint_properties_base.fbp @@ -352,7 +352,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -436,7 +436,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_footprint_properties_base.h b/pcbnew/dialogs/dialog_footprint_properties_base.h index 1c069cd581..e1ca8347fe 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_base.h +++ b/pcbnew/dialogs/dialog_footprint_properties_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class TEXT_CTRL_EVAL; class WX_GRID; @@ -54,8 +55,8 @@ class DIALOG_FOOTPRINT_PROPERTIES_BASE : public DIALOG_SHIM wxNotebook* m_NoteBook; wxPanel* m_PanelGeneral; WX_GRID* m_itemsGrid; - wxBitmapButton* m_bpAdd; - wxBitmapButton* m_bpDelete; + STD_BITMAP_BUTTON* m_bpAdd; + STD_BITMAP_BUTTON* m_bpDelete; wxStaticText* m_XPosLabel; wxTextCtrl* m_ModPositionX; wxStaticText* m_XPosUnit; diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp index 5730162885..8963973595 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.cpp index 4ef9e62754..d19e73232b 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/text_ctrl_eval.h" #include "widgets/wx_grid.h" @@ -81,13 +82,13 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITO wxBoxSizer* bButtonSize; bButtonSize = new wxBoxSizer( wxHORIZONTAL ); - m_bpAdd = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAdd = new STD_BITMAP_BUTTON( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSize->Add( m_bpAdd, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 ); - m_bpDelete = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDelete = new STD_BITMAP_BUTTON( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSize->Add( m_bpDelete, 0, wxRIGHT, 5 ); @@ -164,13 +165,13 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITO wxBoxSizer* bButtonSize1; bButtonSize1 = new wxBoxSizer( wxHORIZONTAL ); - m_bpAddLayer = new wxBitmapButton( bSizerPrivateLayers->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAddLayer = new STD_BITMAP_BUTTON( bSizerPrivateLayers->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSize1->Add( m_bpAddLayer, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); bButtonSize1->Add( 20, 0, 0, wxEXPAND, 5 ); - m_bpDeleteLayer = new wxBitmapButton( bSizerPrivateLayers->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDeleteLayer = new STD_BITMAP_BUTTON( bSizerPrivateLayers->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSize1->Add( m_bpDeleteLayer, 0, wxRIGHT, 5 ); @@ -373,13 +374,13 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITO wxBoxSizer* bButtonSize2; bButtonSize2 = new wxBoxSizer( wxHORIZONTAL ); - m_bpAddPadGroup = new wxBitmapButton( sbSizerNetTies->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAddPadGroup = new STD_BITMAP_BUTTON( sbSizerNetTies->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSize2->Add( m_bpAddPadGroup, 0, wxRIGHT|wxLEFT, 5 ); bButtonSize2->Add( 20, 0, 0, wxEXPAND, 5 ); - m_bpRemovePadGroup = new wxBitmapButton( sbSizerNetTies->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpRemovePadGroup = new STD_BITMAP_BUTTON( sbSizerNetTies->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bButtonSize2->Add( m_bpRemovePadGroup, 0, wxRIGHT, 5 ); diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.fbp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.fbp index 64312b1228..1e20060b3a 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.fbp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.fbp @@ -351,7 +351,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -435,7 +435,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -1026,7 +1026,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -1110,7 +1110,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -3048,7 +3048,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -3132,7 +3132,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.h b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.h index 4e5eefc8a1..232715dc37 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.h +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class TEXT_CTRL_EVAL; class WX_GRID; @@ -52,15 +53,15 @@ class DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE : public DIALOG_SHIM wxNotebook* m_NoteBook; wxPanel* m_PanelGeneral; WX_GRID* m_itemsGrid; - wxBitmapButton* m_bpAdd; - wxBitmapButton* m_bpDelete; + STD_BITMAP_BUTTON* m_bpAdd; + STD_BITMAP_BUTTON* m_bpDelete; wxTextCtrl* m_FootprintNameCtrl; wxTextCtrl* m_DocCtrl; wxStaticText* staticKeywordsLabel; wxTextCtrl* m_KeywordCtrl; WX_GRID* m_privateLayersGrid; - wxBitmapButton* m_bpAddLayer; - wxBitmapButton* m_bpDeleteLayer; + STD_BITMAP_BUTTON* m_bpAddLayer; + STD_BITMAP_BUTTON* m_bpDeleteLayer; wxStaticText* m_componentTypeLabel; wxChoice* m_componentType; wxCheckBox* m_boardOnly; @@ -88,8 +89,8 @@ class DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE : public DIALOG_SHIM wxChoice* m_ZoneConnectionChoice; wxStaticText* m_padGroupsLabel; WX_GRID* m_padGroupsGrid; - wxBitmapButton* m_bpAddPadGroup; - wxBitmapButton* m_bpRemovePadGroup; + STD_BITMAP_BUTTON* m_bpAddPadGroup; + STD_BITMAP_BUTTON* m_bpRemovePadGroup; wxStdDialogButtonSizer* m_sdbSizerStdButtons; wxButton* m_sdbSizerStdButtonsOK; wxButton* m_sdbSizerStdButtonsCancel; diff --git a/pcbnew/dialogs/dialog_fp_plugin_options.cpp b/pcbnew/dialogs/dialog_fp_plugin_options.cpp index 2a4a336c13..cf12feb48b 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options.cpp +++ b/pcbnew/dialogs/dialog_fp_plugin_options.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2013 CERN - * Copyright (C) 2013-2016 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2013-2022 KiCad Developers, see change_log.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 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include diff --git a/pcbnew/dialogs/dialog_fp_plugin_options_base.cpp b/pcbnew/dialogs/dialog_fp_plugin_options_base.cpp index 27d6c65cd7..96bd20a02a 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options_base.cpp +++ b/pcbnew/dialogs/dialog_fp_plugin_options_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_fp_plugin_options_base.h" @@ -58,13 +59,13 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent, wxBoxSizer* bButtonsSizer; bButtonsSizer = new wxBoxSizer( wxHORIZONTAL ); - m_append_button = new wxBitmapButton( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_append_button = new STD_BITMAP_BUTTON( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bButtonsSizer->Add( m_append_button, 0, wxRIGHT|wxLEFT, 5 ); bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 ); - m_delete_button = new wxBitmapButton( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_delete_button = new STD_BITMAP_BUTTON( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bButtonsSizer->Add( m_delete_button, 0, wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_fp_plugin_options_base.fbp b/pcbnew/dialogs/dialog_fp_plugin_options_base.fbp index f98c8cbfac..56a97b1cd9 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options_base.fbp +++ b/pcbnew/dialogs/dialog_fp_plugin_options_base.fbp @@ -243,7 +243,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -327,7 +327,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_fp_plugin_options_base.h b/pcbnew/dialogs/dialog_fp_plugin_options_base.h index 545852c5aa..f3e3a49737 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options_base.h +++ b/pcbnew/dialogs/dialog_fp_plugin_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include "html_window.h" @@ -43,8 +44,8 @@ class DIALOG_FP_PLUGIN_OPTIONS_BASE : public DIALOG_SHIM protected: WX_GRID* m_grid; - wxBitmapButton* m_append_button; - wxBitmapButton* m_delete_button; + STD_BITMAP_BUTTON* m_append_button; + STD_BITMAP_BUTTON* m_delete_button; wxListBox* m_listbox; wxButton* m_append_choice_button; HTML_WINDOW* m_html; diff --git a/pcbnew/dialogs/dialog_gen_footprint_position.cpp b/pcbnew/dialogs/dialog_gen_footprint_position.cpp index d60fa63a58..df2d8c6c48 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position.cpp +++ b/pcbnew/dialogs/dialog_gen_footprint_position.cpp @@ -37,7 +37,8 @@ #include #include #include -#include "widgets/wx_html_report_panel.h" +#include +#include #include #include #include "gerber_placefile_writer.h" diff --git a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.cpp b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.cpp index 3f3dab6b53..3c0cb1f95d 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.cpp +++ b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_html_report_panel.h" #include "dialog_gen_footprint_position_file_base.h" @@ -33,8 +34,8 @@ DIALOG_GEN_FOOTPRINT_POSITION_BASE::DIALOG_GEN_FOOTPRINT_POSITION_BASE( wxWindow bSizerdirBrowse->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 ); bUpperSizer->Add( bSizerdirBrowse, 1, wxEXPAND|wxALL, 10 ); diff --git a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.fbp b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.fbp index e6844f1ff1..ea7033a617 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.fbp +++ b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.fbp @@ -206,7 +206,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT + wxALIGN_CENTER_VERTICAL 0 1 @@ -263,9 +263,9 @@ Resizable 1 - + -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -876,7 +876,7 @@ Resizable 1 - WX_HTML_REPORT_PANEL; wx_html_report_panel.h + WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.h b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.h index de5607a847..41eff8c952 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.h +++ b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_HTML_REPORT_PANEL; #include "dialog_shim.h" @@ -45,7 +46,7 @@ class DIALOG_GEN_FOOTPRINT_POSITION_BASE : public DIALOG_SHIM wxBoxSizer* m_MainSizer; wxStaticText* m_staticTextDir; wxTextCtrl* m_outputDirectoryName; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxRadioBox* m_rbFormat; wxRadioBox* m_radioBoxUnits; wxRadioBox* m_radioBoxFilesCount; diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index 2eb72fcbdf..5ca5eef840 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -315,7 +316,8 @@ void DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { if( !dirName.MakeRelativeTo( defaultPath ) ) { - wxMessageBox( _( "Cannot make path relative (target volume different from file volume)!" ), + wxMessageBox( _( "Cannot make path relative (target volume different from board " + "file volume)!" ), _( "Plot Output Directory" ), wxOK | wxICON_ERROR ); } } diff --git a/pcbnew/dialogs/dialog_gendrill_base.cpp b/pcbnew/dialogs/dialog_gendrill_base.cpp index c3bee8fe50..9294e80585 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.cpp +++ b/pcbnew/dialogs/dialog_gendrill_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_gendrill_base.h" /////////////////////////////////////////////////////////////////////////// @@ -21,16 +23,16 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con staticTextOutputDir = new wxStaticText( this, wxID_ANY, _("Output folder:"), wxDefaultPosition, wxDefaultSize, 0 ); staticTextOutputDir->Wrap( -1 ); - bupperSizer->Add( staticTextOutputDir, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 10 ); + bupperSizer->Add( staticTextOutputDir, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 ); m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); bupperSizer->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 0 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 7 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 7 ); - bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP, 10 ); + bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); wxBoxSizer* bmiddlerSizer; bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL ); @@ -196,7 +198,7 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con bmiddlerSizer->Add( bRightBoxSizer, 0, wxEXPAND|wxTOP, 5 ); - bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 2 ); + bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 ); wxStaticBoxSizer* bMsgSizer; bMsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages") ), wxVERTICAL ); diff --git a/pcbnew/dialogs/dialog_gendrill_base.fbp b/pcbnew/dialogs/dialog_gendrill_base.fbp index 5815d5056d..72476e1fc5 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.fbp +++ b/pcbnew/dialogs/dialog_gendrill_base.fbp @@ -64,7 +64,7 @@ none 10 - wxEXPAND|wxTOP + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 @@ -73,7 +73,7 @@ none 10 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -198,7 +198,7 @@ 7 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL 0 1 @@ -255,9 +255,9 @@ Resizable 1 - + -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -273,7 +273,7 @@ - 2 + 8 wxEXPAND|wxTOP 0 diff --git a/pcbnew/dialogs/dialog_gendrill_base.h b/pcbnew/dialogs/dialog_gendrill_base.h index c1352615ba..511324c866 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.h +++ b/pcbnew/dialogs/dialog_gendrill_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "dialog_shim.h" #include #include @@ -43,7 +45,7 @@ class DIALOG_GENDRILL_BASE : public DIALOG_SHIM protected: wxStaticText* staticTextOutputDir; wxTextCtrl* m_outputDirectoryName; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxRadioButton* m_rbExcellon; wxCheckBox* m_Check_Mirror; wxCheckBox* m_Check_Minimal; diff --git a/pcbnew/dialogs/dialog_group_properties.cpp b/pcbnew/dialogs/dialog_group_properties.cpp index 17211f5bb7..3fa96e2e09 100644 --- a/pcbnew/dialogs/dialog_group_properties.cpp +++ b/pcbnew/dialogs/dialog_group_properties.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2022 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 @@ -29,6 +29,7 @@ #include #include #include +#include #include diff --git a/pcbnew/dialogs/dialog_group_properties_base.cpp b/pcbnew/dialogs/dialog_group_properties_base.cpp index 0e4fa6eca7..73cb66099b 100644 --- a/pcbnew/dialogs/dialog_group_properties_base.cpp +++ b/pcbnew/dialogs/dialog_group_properties_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_group_properties_base.h" /////////////////////////////////////////////////////////////////////////// @@ -52,10 +54,13 @@ DIALOG_GROUP_PROPERTIES_BASE::DIALOG_GROUP_PROPERTIES_BASE( wxWindow* parent, wx wxBoxSizer* bMembershipButtons; bMembershipButtons = new wxBoxSizer( wxHORIZONTAL ); - m_bpAddMember = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAddMember = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bMembershipButtons->Add( m_bpAddMember, 0, wxALL, 5 ); - m_bpRemoveMember = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + + bMembershipButtons->Add( 10, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_bpRemoveMember = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bMembershipButtons->Add( m_bpRemoveMember, 0, wxALL, 5 ); diff --git a/pcbnew/dialogs/dialog_group_properties_base.fbp b/pcbnew/dialogs/dialog_group_properties_base.fbp index 892deb7f0c..fb57e7e299 100644 --- a/pcbnew/dialogs/dialog_group_properties_base.fbp +++ b/pcbnew/dialogs/dialog_group_properties_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_group_properties_base 1000 none + 1 dialog_group_properties @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Group Properties + 0 @@ -422,6 +425,7 @@ + 0 @@ -469,7 +473,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -482,6 +486,16 @@ OnAddMember + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 0 + protected + 10 + + 5 wxALL @@ -495,6 +509,7 @@ + 0 @@ -542,7 +557,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_group_properties_base.h b/pcbnew/dialogs/dialog_group_properties_base.h index baccce9adf..905edbdbef 100644 --- a/pcbnew/dialogs/dialog_group_properties_base.h +++ b/pcbnew/dialogs/dialog_group_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "dialog_shim.h" #include #include @@ -45,14 +47,14 @@ class DIALOG_GROUP_PROPERTIES_BASE : public DIALOG_SHIM wxCheckBox* m_locked; wxStaticText* m_membersLabel; wxListBox* m_membersList; - wxBitmapButton* m_bpAddMember; - wxBitmapButton* m_bpRemoveMember; + STD_BITMAP_BUTTON* m_bpAddMember; + STD_BITMAP_BUTTON* m_bpRemoveMember; wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void onClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnMemberSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnAddMember( wxCommandEvent& event ) { event.Skip(); } @@ -62,6 +64,7 @@ class DIALOG_GROUP_PROPERTIES_BASE : public DIALOG_SHIM public: DIALOG_GROUP_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Group Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_GROUP_PROPERTIES_BASE(); }; diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_import_netlist.cpp similarity index 88% rename from pcbnew/dialogs/dialog_netlist.cpp rename to pcbnew/dialogs/dialog_import_netlist.cpp index a9ef5986af..5163adb852 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_import_netlist.cpp @@ -32,10 +32,11 @@ #include #include #include +#include #include #include #include // LAST_PATH_TYPE -#include +#include #include #include @@ -44,18 +45,19 @@ void PCB_EDIT_FRAME::InstallNetlistFrame() { wxString netlistName = GetLastPath( LAST_PATH_NETLIST ); - DIALOG_NETLIST_IMPORT dlg( this, netlistName ); + DIALOG_IMPORT_NETLIST dlg( this, netlistName ); dlg.ShowModal(); SetLastPath( LAST_PATH_NETLIST, netlistName ); } -bool DIALOG_NETLIST_IMPORT::m_matchByUUID = false; +bool DIALOG_IMPORT_NETLIST::m_matchByUUID = false; -DIALOG_NETLIST_IMPORT::DIALOG_NETLIST_IMPORT( PCB_EDIT_FRAME* aParent, wxString& aNetlistFullFilename ) - : DIALOG_NETLIST_IMPORT_BASE( aParent ), +DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST( PCB_EDIT_FRAME* aParent, + wxString& aNetlistFullFilename ) + : DIALOG_IMPORT_NETLIST_BASE( aParent ), m_parent( aParent ), m_netlistPath( aNetlistFullFilename ), m_initialized( false ), @@ -85,7 +87,7 @@ DIALOG_NETLIST_IMPORT::DIALOG_NETLIST_IMPORT( PCB_EDIT_FRAME* aParent, wxString& m_initialized = true; } -DIALOG_NETLIST_IMPORT::~DIALOG_NETLIST_IMPORT() +DIALOG_IMPORT_NETLIST::~DIALOG_IMPORT_NETLIST() { m_matchByUUID = m_matchByTimestamp->GetSelection() == 0; @@ -105,7 +107,7 @@ DIALOG_NETLIST_IMPORT::~DIALOG_NETLIST_IMPORT() } -void DIALOG_NETLIST_IMPORT::onBrowseNetlistFiles( wxCommandEvent& event ) +void DIALOG_IMPORT_NETLIST::onBrowseNetlistFiles( wxCommandEvent& event ) { wxString dirPath = wxFileName( Prj().GetProjectFullName() ).GetPath(); @@ -129,13 +131,14 @@ void DIALOG_NETLIST_IMPORT::onBrowseNetlistFiles( wxCommandEvent& event ) } -void DIALOG_NETLIST_IMPORT::onImportNetlist( wxCommandEvent& event ) + +void DIALOG_IMPORT_NETLIST::onImportNetlist( wxCommandEvent& event ) { onFilenameChanged( true ); } -void DIALOG_NETLIST_IMPORT::onUpdatePCB( wxCommandEvent& event ) +void DIALOG_IMPORT_NETLIST::onUpdatePCB( wxCommandEvent& event ) { wxFileName fn = m_NetlistFilenameCtrl->GetValue(); @@ -159,13 +162,13 @@ void DIALOG_NETLIST_IMPORT::onUpdatePCB( wxCommandEvent& event ) } -void DIALOG_NETLIST_IMPORT::OnFilenameKillFocus( wxFocusEvent& event ) +void DIALOG_IMPORT_NETLIST::OnFilenameKillFocus( wxFocusEvent& event ) { event.Skip(); } -void DIALOG_NETLIST_IMPORT::onFilenameChanged( bool aLoadNetlist ) +void DIALOG_IMPORT_NETLIST::onFilenameChanged( bool aLoadNetlist ) { if( m_initialized ) { @@ -191,21 +194,21 @@ void DIALOG_NETLIST_IMPORT::onFilenameChanged( bool aLoadNetlist ) } -void DIALOG_NETLIST_IMPORT::OnMatchChanged( wxCommandEvent& event ) +void DIALOG_IMPORT_NETLIST::OnMatchChanged( wxCommandEvent& event ) { if( m_initialized ) loadNetlist( true ); } -void DIALOG_NETLIST_IMPORT::OnOptionChanged( wxCommandEvent& event ) +void DIALOG_IMPORT_NETLIST::OnOptionChanged( wxCommandEvent& event ) { if( m_initialized ) loadNetlist( true ); } -void DIALOG_NETLIST_IMPORT::loadNetlist( bool aDryRun ) +void DIALOG_IMPORT_NETLIST::loadNetlist( bool aDryRun ) { wxString netlistFileName = m_NetlistFilenameCtrl->GetValue(); wxFileName fn = netlistFileName; diff --git a/pcbnew/dialogs/dialog_export_netlist.h b/pcbnew/dialogs/dialog_import_netlist.h similarity index 85% rename from pcbnew/dialogs/dialog_export_netlist.h rename to pcbnew/dialogs/dialog_import_netlist.h index 3c691f79da..244acc9e76 100644 --- a/pcbnew/dialogs/dialog_export_netlist.h +++ b/pcbnew/dialogs/dialog_import_netlist.h @@ -1,7 +1,3 @@ -/** - * @file pcbnew/dialogs/dialog_netlist.h - */ - /* * This program source code file is part of KiCad, a free EDA CAD application. * @@ -25,21 +21,21 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef _DIALOG_NETLIST_IMPORT_H_ -#define _DIALOG_NETLIST_IMPORT_H_ +#ifndef DIALOG_IMPORT_NETLIST_H +#define DIALOG_IMPORT_NETLIST_H -#include +#include class FOOTPRINT; class NETLIST; -class DIALOG_NETLIST_IMPORT : public DIALOG_NETLIST_IMPORT_BASE +class DIALOG_IMPORT_NETLIST : public DIALOG_IMPORT_NETLIST_BASE { public: - DIALOG_NETLIST_IMPORT( PCB_EDIT_FRAME* aParent, wxString& aNetlistFullFilename ); - ~DIALOG_NETLIST_IMPORT(); + DIALOG_IMPORT_NETLIST( PCB_EDIT_FRAME* aParent, wxString& aNetlistFullFilename ); + ~DIALOG_IMPORT_NETLIST(); private: void onFilenameChanged( bool aLoadNetlist ); @@ -65,4 +61,4 @@ private: }; -#endif // _DIALOG_NETLIST_IMPORT_H_ +#endif // DIALOG_IMPORT_NETLIST_H diff --git a/pcbnew/dialogs/dialog_netlist_base.cpp b/pcbnew/dialogs/dialog_import_netlist_base.cpp similarity index 78% rename from pcbnew/dialogs/dialog_netlist_base.cpp rename to pcbnew/dialogs/dialog_import_netlist_base.cpp index abe06bab8f..90b8f76f4e 100644 --- a/pcbnew/dialogs/dialog_netlist_base.cpp +++ b/pcbnew/dialogs/dialog_import_netlist_base.cpp @@ -5,13 +5,14 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_html_report_panel.h" -#include "dialog_netlist_base.h" +#include "dialog_import_netlist_base.h" /////////////////////////////////////////////////////////////////////////// -DIALOG_NETLIST_IMPORT_BASE::DIALOG_NETLIST_IMPORT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +DIALOG_IMPORT_NETLIST_BASE::DIALOG_IMPORT_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 ); @@ -27,15 +28,13 @@ DIALOG_NETLIST_IMPORT_BASE::DIALOG_NETLIST_IMPORT_BASE( wxWindow* parent, wxWind 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, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxALIGN_CENTER_VERTICAL, 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, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerNetlistFilename->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 2 ); - bMainSizer->Add( bSizerNetlistFilename, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); + bMainSizer->Add( bSizerNetlistFilename, 0, wxEXPAND|wxALL, 10 ); wxBoxSizer* bUpperSizer; bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); @@ -98,26 +97,26 @@ DIALOG_NETLIST_IMPORT_BASE::DIALOG_NETLIST_IMPORT_BASE( wxWindow* parent, wxWind bMainSizer->Fit( this ); // Connect Events - m_NetlistFilenameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnFilenameKillFocus ), NULL, this ); - m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onBrowseNetlistFiles ), NULL, this ); - m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnMatchChanged ), NULL, this ); - m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this ); - m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this ); - m_cbDeleteShortingTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this ); - m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onUpdatePCB ), NULL, this ); - m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onImportNetlist ), NULL, this ); + m_NetlistFilenameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnFilenameKillFocus ), NULL, this ); + m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onBrowseNetlistFiles ), NULL, this ); + m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnMatchChanged ), NULL, this ); + m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this ); + m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this ); + m_cbDeleteShortingTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this ); + m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onUpdatePCB ), NULL, this ); + m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onImportNetlist ), NULL, this ); } -DIALOG_NETLIST_IMPORT_BASE::~DIALOG_NETLIST_IMPORT_BASE() +DIALOG_IMPORT_NETLIST_BASE::~DIALOG_IMPORT_NETLIST_BASE() { // Disconnect Events - m_NetlistFilenameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnFilenameKillFocus ), NULL, this ); - m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onBrowseNetlistFiles ), NULL, this ); - m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnMatchChanged ), NULL, this ); - m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this ); - m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this ); - m_cbDeleteShortingTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this ); - m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onUpdatePCB ), NULL, this ); - m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onImportNetlist ), NULL, this ); + m_NetlistFilenameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnFilenameKillFocus ), NULL, this ); + m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onBrowseNetlistFiles ), NULL, this ); + m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnMatchChanged ), NULL, this ); + m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this ); + m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this ); + m_cbDeleteShortingTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this ); + m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onUpdatePCB ), NULL, this ); + m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onImportNetlist ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_netlist_base.fbp b/pcbnew/dialogs/dialog_import_netlist_base.fbp similarity index 98% rename from pcbnew/dialogs/dialog_netlist_base.fbp rename to pcbnew/dialogs/dialog_import_netlist_base.fbp index 315574a82a..58ed41ba35 100644 --- a/pcbnew/dialogs/dialog_netlist_base.fbp +++ b/pcbnew/dialogs/dialog_import_netlist_base.fbp @@ -11,7 +11,7 @@ res UTF-8 connect - dialog_netlist_base + dialog_import_netlist_base 1000 none @@ -45,7 +45,7 @@ wxID_ANY - DIALOG_NETLIST_IMPORT_BASE + DIALOG_IMPORT_NETLIST_BASE -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER @@ -63,7 +63,7 @@ none 10 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT + wxEXPAND|wxALL 0 @@ -133,7 +133,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT + wxALIGN_CENTER_VERTICAL 1 1 @@ -198,7 +198,7 @@ 2 - wxALIGN_CENTER_VERTICAL|wxRIGHT + wxALIGN_CENTER_VERTICAL 0 1 @@ -242,7 +242,7 @@ 0 - 30,28 + -1,-1 1 m_browseButton 1 @@ -255,9 +255,9 @@ Resizable 1 - + -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_netlist_base.h b/pcbnew/dialogs/dialog_import_netlist_base.h similarity index 89% rename from pcbnew/dialogs/dialog_netlist_base.h rename to pcbnew/dialogs/dialog_import_netlist_base.h index fe7149e3bc..fd516c1be0 100644 --- a/pcbnew/dialogs/dialog_netlist_base.h +++ b/pcbnew/dialogs/dialog_import_netlist_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_HTML_REPORT_PANEL; #include "dialog_shim.h" @@ -35,15 +36,15 @@ class WX_HTML_REPORT_PANEL; /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_NETLIST_IMPORT_BASE +/// Class DIALOG_IMPORT_NETLIST_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_NETLIST_IMPORT_BASE : public DIALOG_SHIM +class DIALOG_IMPORT_NETLIST_BASE : public DIALOG_SHIM { private: protected: wxTextCtrl* m_NetlistFilenameCtrl; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxRadioBox* m_matchByTimestamp; wxCheckBox* m_cbUpdateFootprints; wxCheckBox* m_cbDeleteExtraFootprints; @@ -66,9 +67,9 @@ class DIALOG_NETLIST_IMPORT_BASE : public DIALOG_SHIM public: - DIALOG_NETLIST_IMPORT_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_IMPORT_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_IMPORT_BASE(); + ~DIALOG_IMPORT_NETLIST_BASE(); }; diff --git a/pcbnew/dialogs/dialog_import_settings.cpp b/pcbnew/dialogs/dialog_import_settings.cpp index da966705d4..7d33128957 100644 --- a/pcbnew/dialogs/dialog_import_settings.cpp +++ b/pcbnew/dialogs/dialog_import_settings.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2018-2022 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 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/pcbnew/dialogs/dialog_import_settings_base.cpp b/pcbnew/dialogs/dialog_import_settings_base.cpp index 3ce7550105..031e401734 100644 --- a/pcbnew/dialogs/dialog_import_settings_base.cpp +++ b/pcbnew/dialogs/dialog_import_settings_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_import_settings_base.h" /////////////////////////////////////////////////////////////////////////// @@ -29,8 +31,8 @@ DIALOG_IMPORT_SETTINGS_BASE::DIALOG_IMPORT_SETTINGS_BASE( wxWindow* parent, wxWi bUpperSizer->Add( m_filePathCtrl, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bUpperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bUpperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_MainSizer->Add( bUpperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_import_settings_base.fbp b/pcbnew/dialogs/dialog_import_settings_base.fbp index 6c77725a78..19bcb180b2 100644 --- a/pcbnew/dialogs/dialog_import_settings_base.fbp +++ b/pcbnew/dialogs/dialog_import_settings_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_import_settings_base 1000 none + 1 dialog_import_settings_base @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Import Settings + 0 @@ -194,7 +197,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -205,6 +208,7 @@ + 0 @@ -250,9 +254,9 @@ Resizable 1 - + -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -949,6 +953,7 @@ + 0 diff --git a/pcbnew/dialogs/dialog_import_settings_base.h b/pcbnew/dialogs/dialog_import_settings_base.h index 8ab191c4f7..32b50c5c83 100644 --- a/pcbnew/dialogs/dialog_import_settings_base.h +++ b/pcbnew/dialogs/dialog_import_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "dialog_shim.h" #include #include @@ -40,7 +42,7 @@ class DIALOG_IMPORT_SETTINGS_BASE : public DIALOG_SHIM protected: wxBoxSizer* m_MainSizer; wxTextCtrl* m_filePathCtrl; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxStaticLine* m_staticline1; wxBoxSizer* m_buttonsSizer; wxButton* m_selectAllButton; @@ -48,7 +50,7 @@ class DIALOG_IMPORT_SETTINGS_BASE : public DIALOG_SHIM wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1Cancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnBrowseClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnCheckboxClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnSelectAll( wxCommandEvent& event ) { event.Skip(); } @@ -65,6 +67,7 @@ class DIALOG_IMPORT_SETTINGS_BASE : public DIALOG_SHIM wxCheckBox* m_SeveritiesOpt; DIALOG_IMPORT_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Import Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_IMPORT_SETTINGS_BASE(); }; diff --git a/pcbnew/dialogs/dialog_net_inspector.cpp b/pcbnew/dialogs/dialog_net_inspector.cpp index b4a3107af5..8712ecda94 100644 --- a/pcbnew/dialogs/dialog_net_inspector.cpp +++ b/pcbnew/dialogs/dialog_net_inspector.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2020 Oleg Endo * Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2022 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 @@ -39,6 +39,7 @@ #include #include #include +#include #include #include diff --git a/pcbnew/dialogs/dialog_net_inspector_base.cpp b/pcbnew/dialogs/dialog_net_inspector_base.cpp index 539c435152..a63f197018 100644 --- a/pcbnew/dialogs/dialog_net_inspector_base.cpp +++ b/pcbnew/dialogs/dialog_net_inspector_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" + #include "dialog_net_inspector_base.h" /////////////////////////////////////////////////////////////////////////// @@ -70,16 +72,16 @@ DIALOG_NET_INSPECTOR_BASE::DIALOG_NET_INSPECTOR_BASE( wxWindow* parent, wxWindow wxBoxSizer* bSizerListButtons; bSizerListButtons = new wxBoxSizer( wxHORIZONTAL ); - m_addNet = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_addNet = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizerListButtons->Add( m_addNet, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_renameNet = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_renameNet = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizerListButtons->Add( m_renameNet, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); bSizerListButtons->Add( 20, 0, 0, wxEXPAND, 5 ); - m_deleteNet = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_deleteNet = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizerListButtons->Add( m_deleteNet, 0, wxALL, 5 ); diff --git a/pcbnew/dialogs/dialog_net_inspector_base.fbp b/pcbnew/dialogs/dialog_net_inspector_base.fbp index a08030980d..3d3dbde9d5 100644 --- a/pcbnew/dialogs/dialog_net_inspector_base.fbp +++ b/pcbnew/dialogs/dialog_net_inspector_base.fbp @@ -588,7 +588,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -662,7 +662,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -746,7 +746,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_net_inspector_base.h b/pcbnew/dialogs/dialog_net_inspector_base.h index 390fc392ab..528b4c7b07 100644 --- a/pcbnew/dialogs/dialog_net_inspector_base.h +++ b/pcbnew/dialogs/dialog_net_inspector_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,8 @@ #include #include #include +class STD_BITMAP_BUTTON; + #include "dialog_shim.h" #include #include @@ -48,9 +50,9 @@ class DIALOG_NET_INSPECTOR_BASE : public DIALOG_SHIM wxTextCtrl* m_groupByText; wxComboBox* m_groupByKind; wxDataViewCtrl* m_netsList; - wxBitmapButton* m_addNet; - wxBitmapButton* m_renameNet; - wxBitmapButton* m_deleteNet; + STD_BITMAP_BUTTON* m_addNet; + STD_BITMAP_BUTTON* m_renameNet; + STD_BITMAP_BUTTON* m_deleteNet; wxButton* m_ReportButt; wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_sdbSizer; diff --git a/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp b/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp index b431efd406..517e95e549 100644 --- a/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp @@ -1,8 +1,3 @@ -/** - * @file dialog_pad_basicshapes_properties.cpp - * @brief basic shapes for pads crude editor. - */ - /* * This program source code file is part of KiCad, a free EDA CAD application. * @@ -34,6 +29,7 @@ #include #include #include +#include #include #include // for KiROUND diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index 1ae94d33b9..de36907d48 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/text_ctrl_eval.h" #include "widgets/wx_grid.h" @@ -1472,7 +1473,7 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi wxBoxSizer* bSizerRightButts; bSizerRightButts = new wxBoxSizer( wxHORIZONTAL ); - m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_addButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_addButton->SetMinSize( wxSize( 30,30 ) ); bSizerRightButts->Add( m_addButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -1480,7 +1481,7 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi bSizerRightButts->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_deleteButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_deleteButton->SetMinSize( wxSize( 30,30 ) ); bSizerRightButts->Add( m_deleteButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp index b706f828bb..ac273577a2 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -14745,7 +14745,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -14829,7 +14829,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index 812024c737..e72dfa1cac 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -11,6 +11,7 @@ #include #include class DIALOG_SHIM; +class STD_BITMAP_BUTTON; class TEXT_CTRL_EVAL; class WX_GRID; class wxListView; @@ -374,8 +375,8 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM protected: WX_GRID* m_gridCornersList; - wxBitmapButton* m_addButton; - wxBitmapButton* m_deleteButton; + STD_BITMAP_BUTTON* m_addButton; + STD_BITMAP_BUTTON* m_deleteButton; wxStaticText* m_thicknessLabel; TEXT_CTRL_EVAL* m_thicknessCtrl; wxStaticText* m_thicknessUnits; diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index f3e591e5bf..d087ef293a 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index ff770a16f2..4e7df2cc22 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_html_report_panel.h" #include "dialog_plot_base.h" @@ -42,8 +43,8 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bupperSizer->Add( m_outputDirectoryName, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); m_MainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 111078e2a1..3a36a596cc 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -335,7 +335,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -392,9 +392,9 @@ Resizable 1 - + -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 34f8d689e5..636db4be73 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_HTML_REPORT_PANEL; #include "dialog_shim.h" @@ -65,7 +66,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM wxChoice* m_plotFormatOpt; wxStaticText* m_staticTextDir; wxTextCtrl* m_outputDirectoryName; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxBoxSizer* bmiddleSizer; wxStaticBoxSizer* m_LayersSizer; wxCheckListBox* m_layerCheckListBox; diff --git a/pcbnew/dialogs/panel_fp_editor_defaults.cpp b/pcbnew/dialogs/panel_fp_editor_defaults.cpp index 45f92540fb..e9f2b3ac37 100644 --- a/pcbnew/dialogs/panel_fp_editor_defaults.cpp +++ b/pcbnew/dialogs/panel_fp_editor_defaults.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/panel_fp_editor_defaults_base.cpp b/pcbnew/dialogs/panel_fp_editor_defaults_base.cpp index c339e179e0..d8518399ad 100644 --- a/pcbnew/dialogs/panel_fp_editor_defaults_base.cpp +++ b/pcbnew/dialogs/panel_fp_editor_defaults_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_fp_editor_defaults_base.h" @@ -41,17 +42,17 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, m_textItemsGrid->SetColSize( 2, 120 ); m_textItemsGrid->EnableDragColMove( false ); m_textItemsGrid->EnableDragColSize( true ); - m_textItemsGrid->SetColLabelSize( 24 ); m_textItemsGrid->SetColLabelValue( 0, _("Text Items") ); m_textItemsGrid->SetColLabelValue( 1, _("Show") ); m_textItemsGrid->SetColLabelValue( 2, _("Layer") ); + m_textItemsGrid->SetColLabelSize( 24 ); m_textItemsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows m_textItemsGrid->EnableDragRowSize( false ); - m_textItemsGrid->SetRowLabelSize( 160 ); m_textItemsGrid->SetRowLabelValue( 0, _("Reference designator") ); m_textItemsGrid->SetRowLabelValue( 1, _("Value") ); + m_textItemsGrid->SetRowLabelSize( 160 ); m_textItemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER ); // Label Appearance @@ -65,7 +66,7 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, wxBoxSizer* bButtonSize; bButtonSize = new wxBoxSizer( wxHORIZONTAL ); - m_bpAdd = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpAdd = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpAdd->SetMinSize( wxSize( 30,29 ) ); bButtonSize->Add( m_bpAdd, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); @@ -73,7 +74,7 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, bButtonSize->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_bpDelete = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bpDelete = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_bpDelete->SetMinSize( wxSize( 30,29 ) ); bButtonSize->Add( m_bpDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); @@ -119,23 +120,23 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent, m_graphicsGrid->SetColSize( 4, 60 ); m_graphicsGrid->EnableDragColMove( false ); m_graphicsGrid->EnableDragColSize( true ); - m_graphicsGrid->SetColLabelSize( 22 ); m_graphicsGrid->SetColLabelValue( 0, _("Line Thickness") ); m_graphicsGrid->SetColLabelValue( 1, _("Text Width") ); m_graphicsGrid->SetColLabelValue( 2, _("Text Height") ); m_graphicsGrid->SetColLabelValue( 3, _("Text Thickness") ); m_graphicsGrid->SetColLabelValue( 4, _("Italic") ); + m_graphicsGrid->SetColLabelSize( 22 ); m_graphicsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows m_graphicsGrid->EnableDragRowSize( false ); - m_graphicsGrid->SetRowLabelSize( 125 ); m_graphicsGrid->SetRowLabelValue( 0, _("Silk Layers") ); m_graphicsGrid->SetRowLabelValue( 1, _("Copper Layers") ); m_graphicsGrid->SetRowLabelValue( 2, _("Edge Cuts") ); m_graphicsGrid->SetRowLabelValue( 3, _("Courtyards") ); m_graphicsGrid->SetRowLabelValue( 4, _("Fab Layers") ); m_graphicsGrid->SetRowLabelValue( 5, _("Other Layers") ); + m_graphicsGrid->SetRowLabelSize( 125 ); m_graphicsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER ); // Label Appearance diff --git a/pcbnew/dialogs/panel_fp_editor_defaults_base.fbp b/pcbnew/dialogs/panel_fp_editor_defaults_base.fbp index 0cd96faa9c..014ed7932f 100644 --- a/pcbnew/dialogs/panel_fp_editor_defaults_base.fbp +++ b/pcbnew/dialogs/panel_fp_editor_defaults_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ panel_fp_editor_defaults_base 1000 none + 1 PanelFPEditorDefaults @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -46,6 +48,7 @@ -1,-1 RESETTABLE_PANEL; widgets/resettable_panel.h; Not forward_declare + 0 wxTAB_TRAVERSAL @@ -244,6 +247,7 @@ + 0 @@ -291,7 +295,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -327,6 +331,7 @@ + 0 @@ -374,7 +379,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/panel_fp_editor_defaults_base.h b/pcbnew/dialogs/panel_fp_editor_defaults_base.h index 930aa6874c..fe821c7351 100644 --- a/pcbnew/dialogs/panel_fp_editor_defaults_base.h +++ b/pcbnew/dialogs/panel_fp_editor_defaults_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include "widgets/resettable_panel.h" @@ -41,12 +42,12 @@ class PANEL_FP_EDITOR_DEFAULTS_BASE : public RESETTABLE_PANEL protected: wxStaticText* defaultTextItemsLabel; WX_GRID* m_textItemsGrid; - wxBitmapButton* m_bpAdd; - wxBitmapButton* m_bpDelete; + STD_BITMAP_BUTTON* m_bpAdd; + STD_BITMAP_BUTTON* m_bpDelete; wxStaticText* m_staticTextInfo; WX_GRID* m_graphicsGrid; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnGridSize( wxSizeEvent& event ) { event.Skip(); } virtual void OnAddTextItem( wxCommandEvent& event ) { event.Skip(); } virtual void OnDeleteTextItem( wxCommandEvent& event ) { event.Skip(); } @@ -55,6 +56,7 @@ class PANEL_FP_EDITOR_DEFAULTS_BASE : public RESETTABLE_PANEL public: PANEL_FP_EDITOR_DEFAULTS_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_FP_EDITOR_DEFAULTS_BASE(); }; diff --git a/pcbnew/dialogs/panel_fp_lib_table.cpp b/pcbnew/dialogs/panel_fp_lib_table.cpp index 6e9fe3bc5b..eb8548cc8e 100644 --- a/pcbnew/dialogs/panel_fp_lib_table.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2013-2021 CERN - * Copyright (C) 2012-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012-2022 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 @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/panel_fp_lib_table_base.cpp b/pcbnew/dialogs/panel_fp_lib_table_base.cpp index fc3ab6389d..06cb2846f6 100644 --- a/pcbnew/dialogs/panel_fp_lib_table_base.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_fp_lib_table_base.h" @@ -99,7 +100,7 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i wxBoxSizer* bButtonsSizer; bButtonsSizer = new wxBoxSizer( wxHORIZONTAL ); - m_append_button = new wxBitmapButton( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_append_button = new STD_BITMAP_BUTTON( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_append_button->SetToolTip( _("Add empty row to table") ); bButtonsSizer->Add( m_append_button, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); @@ -107,12 +108,12 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i m_browseButton = new SPLIT_BUTTON( m_buttonsPanel, wxID_ANY, _( "Add Existing" ), wxDefaultPosition ); bButtonsSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); - m_move_up_button = new wxBitmapButton( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_move_up_button = new STD_BITMAP_BUTTON( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_move_up_button->SetToolTip( _("Move up") ); bButtonsSizer->Add( m_move_up_button, 0, wxBOTTOM|wxRIGHT, 5 ); - m_move_down_button = new wxBitmapButton( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_move_down_button = new STD_BITMAP_BUTTON( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_move_down_button->SetToolTip( _("Move down") ); bButtonsSizer->Add( m_move_down_button, 0, wxBOTTOM|wxRIGHT, 5 ); @@ -120,7 +121,7 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 ); - m_delete_button = new wxBitmapButton( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_delete_button = new STD_BITMAP_BUTTON( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); m_delete_button->SetToolTip( _("Remove library from table") ); bButtonsSizer->Add( m_delete_button, 0, wxBOTTOM|wxRIGHT, 5 ); diff --git a/pcbnew/dialogs/panel_fp_lib_table_base.fbp b/pcbnew/dialogs/panel_fp_lib_table_base.fbp index c4ace097ab..5f54e63ad0 100644 --- a/pcbnew/dialogs/panel_fp_lib_table_base.fbp +++ b/pcbnew/dialogs/panel_fp_lib_table_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ panel_fp_lib_table_base 1000 none + 1 panel_fp_lib_table @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -46,6 +48,7 @@ -1,-1 ; forward_declare + 0 wxTAB_TRAVERSAL @@ -501,6 +504,7 @@ + 0 @@ -548,7 +552,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Add empty row to table @@ -636,6 +640,7 @@ + 0 @@ -683,7 +688,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move up @@ -709,6 +714,7 @@ + 0 @@ -756,7 +762,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move down @@ -792,6 +798,7 @@ + 0 @@ -839,7 +846,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Remove library from table diff --git a/pcbnew/dialogs/panel_fp_lib_table_base.h b/pcbnew/dialogs/panel_fp_lib_table_base.h index 598e1c2ab6..019e17bb70 100644 --- a/pcbnew/dialogs/panel_fp_lib_table_base.h +++ b/pcbnew/dialogs/panel_fp_lib_table_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include @@ -46,14 +47,14 @@ class PANEL_FP_LIB_TABLE_BASE : public wxPanel wxPanel* m_project_panel; WX_GRID* m_project_grid; wxPanel* m_buttonsPanel; - wxBitmapButton* m_append_button; + STD_BITMAP_BUTTON* m_append_button; SPLIT_BUTTON* m_browseButton; - wxBitmapButton* m_move_up_button; - wxBitmapButton* m_move_down_button; - wxBitmapButton* m_delete_button; + STD_BITMAP_BUTTON* m_move_up_button; + STD_BITMAP_BUTTON* m_move_down_button; + STD_BITMAP_BUTTON* m_delete_button; WX_GRID* m_path_subs_grid; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void appendRowHandler( wxCommandEvent& event ) { event.Skip(); } virtual void moveUpHandler( wxCommandEvent& event ) { event.Skip(); } @@ -65,6 +66,7 @@ class PANEL_FP_LIB_TABLE_BASE : public wxPanel public: PANEL_FP_LIB_TABLE_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_FP_LIB_TABLE_BASE(); }; diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp index d96f18b744..d8091e4230 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model_base.cpp b/pcbnew/dialogs/panel_fp_properties_3d_model_base.cpp index eb50740e82..e43df3820c 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model_base.cpp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_fp_properties_3d_model_base.h" @@ -50,16 +51,16 @@ PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow* wxBoxSizer* bSizer3DButtons; bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL ); - m_button3DShapeAdd = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_button3DShapeAdd = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bSizer3DButtons->Add( m_button3DShapeAdd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_button3DShapeBrowse = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_button3DShapeBrowse = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bSizer3DButtons->Add( m_button3DShapeBrowse, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); bSizer3DButtons->Add( 20, 0, 0, 0, 5 ); - m_button3DShapeRemove = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_button3DShapeRemove = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bSizer3DButtons->Add( m_button3DShapeRemove, 0, wxALIGN_CENTER_VERTICAL, 5 ); @@ -69,12 +70,12 @@ PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow* bSizer3DButtons->Add( m_buttonConfig3DPaths, 0, wxALL, 5 ); - bSizerMain3D->Add( bSizer3DButtons, 0, wxEXPAND, 5 ); + bSizerMain3D->Add( bSizer3DButtons, 0, wxEXPAND|wxBOTTOM, 5 ); m_LowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); - bSizerMain3D->Add( m_LowerSizer3D, 0, wxEXPAND, 5 ); + bSizerMain3D->Add( m_LowerSizer3D, 0, wxEXPAND|wxTOP, 5 ); this->SetSizer( bSizerMain3D ); diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model_base.fbp b/pcbnew/dialogs/panel_fp_properties_3d_model_base.fbp index a3c7fc156a..c640415f2b 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model_base.fbp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model_base.fbp @@ -151,7 +151,7 @@ 5 - wxEXPAND + wxEXPAND|wxBOTTOM 0 @@ -219,7 +219,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -293,7 +293,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -377,7 +377,7 @@ 1 -1,-1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -478,7 +478,7 @@ 5 - wxEXPAND + wxEXPAND|wxTOP 0 diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model_base.h b/pcbnew/dialogs/panel_fp_properties_3d_model_base.h index 80be002d07..2a2680deb4 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model_base.h +++ b/pcbnew/dialogs/panel_fp_properties_3d_model_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include @@ -39,9 +40,9 @@ class PANEL_FP_PROPERTIES_3D_MODEL_BASE : public wxPanel protected: wxBoxSizer* bSizerMain3D; WX_GRID* m_modelsGrid; - wxBitmapButton* m_button3DShapeAdd; - wxBitmapButton* m_button3DShapeBrowse; - wxBitmapButton* m_button3DShapeRemove; + STD_BITMAP_BUTTON* m_button3DShapeAdd; + STD_BITMAP_BUTTON* m_button3DShapeBrowse; + STD_BITMAP_BUTTON* m_button3DShapeRemove; wxButton* m_buttonConfig3DPaths; wxBoxSizer* m_LowerSizer3D; diff --git a/pcbnew/dialogs/panel_pcbnew_action_plugins.cpp b/pcbnew/dialogs/panel_pcbnew_action_plugins.cpp index 04605e0c34..4b4c3d96a3 100644 --- a/pcbnew/dialogs/panel_pcbnew_action_plugins.cpp +++ b/pcbnew/dialogs/panel_pcbnew_action_plugins.cpp @@ -31,7 +31,7 @@ #include #include #include - +#include #define GRID_CELL_MARGIN 4 diff --git a/pcbnew/dialogs/panel_pcbnew_action_plugins_base.cpp b/pcbnew/dialogs/panel_pcbnew_action_plugins_base.cpp index bd12d51dcb..f9195cdc59 100644 --- a/pcbnew/dialogs/panel_pcbnew_action_plugins_base.cpp +++ b/pcbnew/dialogs/panel_pcbnew_action_plugins_base.cpp @@ -1,10 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_pcbnew_action_plugins_base.h" @@ -32,13 +33,13 @@ PANEL_PCBNEW_ACTION_PLUGINS_BASE::PANEL_PCBNEW_ACTION_PLUGINS_BASE( wxWindow* pa m_grid->AutoSizeColumns(); m_grid->EnableDragColMove( false ); m_grid->EnableDragColSize( true ); - m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelValue( 0, _("Icon") ); m_grid->SetColLabelValue( 1, _("Show button") ); m_grid->SetColLabelValue( 2, _("Name") ); m_grid->SetColLabelValue( 3, _("Category") ); m_grid->SetColLabelValue( 4, _("Description") ); m_grid->SetColLabelValue( 5, _("Path") ); + m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -58,12 +59,12 @@ PANEL_PCBNEW_ACTION_PLUGINS_BASE::PANEL_PCBNEW_ACTION_PLUGINS_BASE( wxWindow* pa wxBoxSizer* bButtonsSizer; bButtonsSizer = new wxBoxSizer( wxHORIZONTAL ); - m_moveUpButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_moveUpButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_moveUpButton->SetToolTip( _("Move Up") ); bButtonsSizer->Add( m_moveUpButton, 0, wxLEFT|wxRIGHT, 5 ); - m_moveDownButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_moveDownButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_moveDownButton->SetToolTip( _("Move Down") ); bButtonsSizer->Add( m_moveDownButton, 0, wxRIGHT, 5 ); @@ -71,17 +72,17 @@ PANEL_PCBNEW_ACTION_PLUGINS_BASE::PANEL_PCBNEW_ACTION_PLUGINS_BASE( wxWindow* pa bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 ); - m_openDirectoryButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_openDirectoryButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_openDirectoryButton->SetToolTip( _("Open Plugin Directory") ); bButtonsSizer->Add( m_openDirectoryButton, 0, wxLEFT|wxRIGHT, 5 ); - m_reloadButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_reloadButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_reloadButton->SetToolTip( _("Reload Plugins") ); bButtonsSizer->Add( m_reloadButton, 0, wxRIGHT, 5 ); - m_showErrorsButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_showErrorsButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_showErrorsButton->SetToolTip( _("Show Plugin Errors") ); bButtonsSizer->Add( m_showErrorsButton, 0, wxRIGHT, 5 ); diff --git a/pcbnew/dialogs/panel_pcbnew_action_plugins_base.fbp b/pcbnew/dialogs/panel_pcbnew_action_plugins_base.fbp index b1ec79ece2..49c6f9c8b8 100644 --- a/pcbnew/dialogs/panel_pcbnew_action_plugins_base.fbp +++ b/pcbnew/dialogs/panel_pcbnew_action_plugins_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ panel_pcbnew_action_plugins_base 1000 none + 0 1 PanelPcbnewActionPlugins @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -46,6 +48,7 @@ -1,-1 ; forward_declare + 0 wxTAB_TRAVERSAL @@ -176,6 +179,7 @@ + 0 @@ -223,7 +227,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move Up @@ -249,6 +253,7 @@ + 0 @@ -296,7 +301,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Move Down @@ -332,6 +337,7 @@ + 0 @@ -379,7 +385,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Open Plugin Directory @@ -405,6 +411,7 @@ + 0 @@ -452,7 +459,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Reload Plugins @@ -478,6 +485,7 @@ + 0 @@ -525,7 +533,7 @@ 1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 Show Plugin Errors diff --git a/pcbnew/dialogs/panel_pcbnew_action_plugins_base.h b/pcbnew/dialogs/panel_pcbnew_action_plugins_base.h index 3be6b4094c..5c6abe6ccb 100644 --- a/pcbnew/dialogs/panel_pcbnew_action_plugins_base.h +++ b/pcbnew/dialogs/panel_pcbnew_action_plugins_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include @@ -37,13 +38,13 @@ class PANEL_PCBNEW_ACTION_PLUGINS_BASE : public wxPanel protected: WX_GRID* m_grid; - wxBitmapButton* m_moveUpButton; - wxBitmapButton* m_moveDownButton; - wxBitmapButton* m_openDirectoryButton; - wxBitmapButton* m_reloadButton; - wxBitmapButton* m_showErrorsButton; + STD_BITMAP_BUTTON* m_moveUpButton; + STD_BITMAP_BUTTON* m_moveDownButton; + STD_BITMAP_BUTTON* m_openDirectoryButton; + STD_BITMAP_BUTTON* m_reloadButton; + STD_BITMAP_BUTTON* m_showErrorsButton; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnGridCellClick( wxGridEvent& event ) { event.Skip(); } virtual void OnMoveUpButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnMoveDownButtonClick( wxCommandEvent& event ) { event.Skip(); } @@ -55,6 +56,7 @@ class PANEL_PCBNEW_ACTION_PLUGINS_BASE : public wxPanel public: PANEL_PCBNEW_ACTION_PLUGINS_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_PCBNEW_ACTION_PLUGINS_BASE(); }; diff --git a/pcbnew/dialogs/panel_setup_tracks_and_vias.cpp b/pcbnew/dialogs/panel_setup_tracks_and_vias.cpp index 7c225070b5..52e1016d71 100644 --- a/pcbnew/dialogs/panel_setup_tracks_and_vias.cpp +++ b/pcbnew/dialogs/panel_setup_tracks_and_vias.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/pcbnew/dialogs/panel_setup_tracks_and_vias_base.cpp b/pcbnew/dialogs/panel_setup_tracks_and_vias_base.cpp index 4247a24387..b4be249dad 100644 --- a/pcbnew/dialogs/panel_setup_tracks_and_vias_base.cpp +++ b/pcbnew/dialogs/panel_setup_tracks_and_vias_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/std_bitmap_button.h" #include "widgets/wx_grid.h" #include "panel_setup_tracks_and_vias_base.h" @@ -64,16 +65,16 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa wxBoxSizer* bSizer3; bSizer3 = new wxBoxSizer( wxHORIZONTAL ); - m_trackWidthsAddButton = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_trackWidthsAddButton = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer3->Add( m_trackWidthsAddButton, 0, wxLEFT|wxRIGHT, 5 ); - m_trackWidthsSortButton = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_trackWidthsSortButton = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer3->Add( m_trackWidthsSortButton, 0, wxRIGHT|wxLEFT, 5 ); bSizer3->Add( 20, 0, 0, wxEXPAND, 5 ); - m_trackWidthsRemoveButton = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_trackWidthsRemoveButton = new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer3->Add( m_trackWidthsRemoveButton, 0, wxLEFT|wxRIGHT, 5 ); @@ -124,16 +125,16 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa wxBoxSizer* bSizer4; bSizer4 = new wxBoxSizer( wxHORIZONTAL ); - m_viaSizesAddButton = new wxBitmapButton( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_viaSizesAddButton = new STD_BITMAP_BUTTON( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer4->Add( m_viaSizesAddButton, 0, wxLEFT|wxRIGHT, 5 ); - m_viaSizesSortButton = new wxBitmapButton( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_viaSizesSortButton = new STD_BITMAP_BUTTON( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer4->Add( m_viaSizesSortButton, 0, wxRIGHT|wxLEFT, 5 ); bSizer4->Add( 20, 0, 0, wxEXPAND, 5 ); - m_viaSizesRemoveButton = new wxBitmapButton( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_viaSizesRemoveButton = new STD_BITMAP_BUTTON( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer4->Add( m_viaSizesRemoveButton, 0, wxLEFT|wxRIGHT, 5 ); @@ -186,16 +187,16 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa wxBoxSizer* bSizer5; bSizer5 = new wxBoxSizer( wxHORIZONTAL ); - m_diffPairsAddButton = new wxBitmapButton( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_diffPairsAddButton = new STD_BITMAP_BUTTON( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer5->Add( m_diffPairsAddButton, 0, wxLEFT|wxRIGHT, 5 ); - m_diffPairsSortButton = new wxBitmapButton( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_diffPairsSortButton = new STD_BITMAP_BUTTON( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer5->Add( m_diffPairsSortButton, 0, wxRIGHT|wxLEFT, 5 ); bSizer5->Add( 20, 0, 0, wxEXPAND, 5 ); - m_diffPairsRemoveButton = new wxBitmapButton( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_diffPairsRemoveButton = new STD_BITMAP_BUTTON( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); bSizer5->Add( m_diffPairsRemoveButton, 0, wxLEFT|wxRIGHT, 5 ); diff --git a/pcbnew/dialogs/panel_setup_tracks_and_vias_base.fbp b/pcbnew/dialogs/panel_setup_tracks_and_vias_base.fbp index c2abf1ff3b..fbe9a86378 100644 --- a/pcbnew/dialogs/panel_setup_tracks_and_vias_base.fbp +++ b/pcbnew/dialogs/panel_setup_tracks_and_vias_base.fbp @@ -297,7 +297,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -371,7 +371,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -455,7 +455,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -642,7 +642,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -716,7 +716,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -800,7 +800,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -987,7 +987,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -1061,7 +1061,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 @@ -1145,7 +1145,7 @@ 1 - ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/dialogs/panel_setup_tracks_and_vias_base.h b/pcbnew/dialogs/panel_setup_tracks_and_vias_base.h index 7414dc8db2..6b3a83aff9 100644 --- a/pcbnew/dialogs/panel_setup_tracks_and_vias_base.h +++ b/pcbnew/dialogs/panel_setup_tracks_and_vias_base.h @@ -10,6 +10,7 @@ #include #include #include +class STD_BITMAP_BUTTON; class WX_GRID; #include @@ -40,17 +41,17 @@ class PANEL_SETUP_TRACKS_AND_VIAS_BASE : public wxPanel protected: wxStaticText* m_label; WX_GRID* m_trackWidthsGrid; - wxBitmapButton* m_trackWidthsAddButton; - wxBitmapButton* m_trackWidthsSortButton; - wxBitmapButton* m_trackWidthsRemoveButton; + STD_BITMAP_BUTTON* m_trackWidthsAddButton; + STD_BITMAP_BUTTON* m_trackWidthsSortButton; + STD_BITMAP_BUTTON* m_trackWidthsRemoveButton; WX_GRID* m_viaSizesGrid; - wxBitmapButton* m_viaSizesAddButton; - wxBitmapButton* m_viaSizesSortButton; - wxBitmapButton* m_viaSizesRemoveButton; + STD_BITMAP_BUTTON* m_viaSizesAddButton; + STD_BITMAP_BUTTON* m_viaSizesSortButton; + STD_BITMAP_BUTTON* m_viaSizesRemoveButton; WX_GRID* m_diffPairsGrid; - wxBitmapButton* m_diffPairsAddButton; - wxBitmapButton* m_diffPairsSortButton; - wxBitmapButton* m_diffPairsRemoveButton; + STD_BITMAP_BUTTON* m_diffPairsAddButton; + STD_BITMAP_BUTTON* m_diffPairsSortButton; + STD_BITMAP_BUTTON* m_diffPairsRemoveButton; // Virtual event handlers, override them in your derived class virtual void OnAddTrackWidthsClick( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/import_gfx/dialog_import_gfx.cpp b/pcbnew/import_gfx/dialog_import_gfx.cpp index 6043421df1..48fddb34d7 100644 --- a/pcbnew/import_gfx/dialog_import_gfx.cpp +++ b/pcbnew/import_gfx/dialog_import_gfx.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "dxf_import_plugin.h" #include diff --git a/pcbnew/import_gfx/dialog_import_gfx_base.cpp b/pcbnew/import_gfx/dialog_import_gfx_base.cpp index 84375542d5..9e4e21cf6c 100644 --- a/pcbnew/import_gfx/dialog_import_gfx_base.cpp +++ b/pcbnew/import_gfx/dialog_import_gfx_base.cpp @@ -6,6 +6,7 @@ /////////////////////////////////////////////////////////////////////////// #include "pcb_layer_box_selector.h" +#include "widgets/std_bitmap_button.h" #include "dialog_import_gfx_base.h" @@ -31,10 +32,10 @@ DIALOG_IMPORT_GFX_BASE::DIALOG_IMPORT_GFX_BASE( wxWindow* parent, wxWindowID id, m_textCtrlFileName->SetToolTip( _("Only vectors will be imported. Bitmaps and fonts will be ignored.") ); m_textCtrlFileName->SetMinSize( wxSize( 300,-1 ) ); - bSizerFile->Add( m_textCtrlFileName, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bSizerFile->Add( m_textCtrlFileName, 1, wxALIGN_CENTER_VERTICAL, 5 ); - m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizerFile->Add( m_browseButton, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 ); + m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + bSizerFile->Add( m_browseButton, 0, wxTOP|wxBOTTOM, 5 ); bSizerMain->Add( bSizerFile, 0, wxALL|wxEXPAND, 10 ); diff --git a/pcbnew/import_gfx/dialog_import_gfx_base.fbp b/pcbnew/import_gfx/dialog_import_gfx_base.fbp index 0b731da712..23c24d1ccf 100644 --- a/pcbnew/import_gfx/dialog_import_gfx_base.fbp +++ b/pcbnew/import_gfx/dialog_import_gfx_base.fbp @@ -133,7 +133,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT + wxALIGN_CENTER_VERTICAL 1 1 @@ -197,7 +197,7 @@ 5 - wxTOP|wxBOTTOM|wxRIGHT + wxTOP|wxBOTTOM 0 1 @@ -254,9 +254,9 @@ Resizable 1 - + -1,-1 - ; ; forward_declare + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 diff --git a/pcbnew/import_gfx/dialog_import_gfx_base.h b/pcbnew/import_gfx/dialog_import_gfx_base.h index a48bc5eaaa..7130f6639c 100644 --- a/pcbnew/import_gfx/dialog_import_gfx_base.h +++ b/pcbnew/import_gfx/dialog_import_gfx_base.h @@ -11,6 +11,7 @@ #include #include class PCB_LAYER_BOX_SELECTOR; +class STD_BITMAP_BUTTON; #include "dialog_shim.h" #include @@ -48,7 +49,7 @@ class DIALOG_IMPORT_GFX_BASE : public DIALOG_SHIM protected: wxStaticText* m_staticTextFile; wxTextCtrl* m_textCtrlFileName; - wxBitmapButton* m_browseButton; + STD_BITMAP_BUTTON* m_browseButton; wxRadioButton* m_rbInteractivePlacement; wxRadioButton* m_rbAbsolutePlacement; wxStaticText* m_xLabel;