From 3ab69939f9107568a099958d5b73cb9b06788891 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Thu, 3 Jun 2021 02:19:20 +0100 Subject: [PATCH] Remove wx.h from many files --- common/dialogs/panel_color_settings.cpp | 2 ++ common/dialogs/panel_common_settings.cpp | 2 ++ common/dialogs/panel_hotkeys_editor.cpp | 1 + common/eda_base_frame.cpp | 2 ++ common/widgets/bitmap_toggle.cpp | 2 ++ common/widgets/indicator_icon.cpp | 7 +++++-- common/widgets/paged_dialog.cpp | 6 ++++-- eeschema/dialogs/panel_eeschema_color_settings.cpp | 1 + eeschema/dialogs/panel_setup_pinmap.cpp | 1 + eeschema/dialogs/panel_setup_pinmap.h | 1 + include/widgets/bitmap_toggle.h | 4 +++- include/widgets/footprint_select_widget.h | 1 - include/widgets/indicator_icon.h | 7 +++++-- include/widgets/resettable_panel.h | 2 +- kicad/kicad_manager_frame.cpp | 1 + pagelayout_editor/pl_editor_frame.cpp | 2 ++ pcbnew/footprint_edit_frame.cpp | 1 + 17 files changed, 34 insertions(+), 9 deletions(-) diff --git a/common/dialogs/panel_color_settings.cpp b/common/dialogs/panel_color_settings.cpp index dedb9f953a..4b4d0e8b57 100644 --- a/common/dialogs/panel_color_settings.cpp +++ b/common/dialogs/panel_color_settings.cpp @@ -31,6 +31,8 @@ #include #include +#include +#include // Button ID starting point constexpr int FIRST_BUTTON_ID = 1800; diff --git a/common/dialogs/panel_common_settings.cpp b/common/dialogs/panel_common_settings.cpp index 132dcafdda..edaae78fc1 100644 --- a/common/dialogs/panel_common_settings.cpp +++ b/common/dialogs/panel_common_settings.cpp @@ -33,6 +33,8 @@ #include #include +#include + static constexpr int dpi_scaling_precision = 1; static constexpr double dpi_scaling_increment = 0.5; diff --git a/common/dialogs/panel_hotkeys_editor.cpp b/common/dialogs/panel_hotkeys_editor.cpp index 8fe5cfc346..8b77a2994f 100644 --- a/common/dialogs/panel_hotkeys_editor.cpp +++ b/common/dialogs/panel_hotkeys_editor.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp index b63a997e6a..ff1b3f8f33 100644 --- a/common/eda_base_frame.cpp +++ b/common/eda_base_frame.cpp @@ -52,7 +52,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/common/widgets/bitmap_toggle.cpp b/common/widgets/bitmap_toggle.cpp index 4e5ea05968..1957d3f41a 100644 --- a/common/widgets/bitmap_toggle.cpp +++ b/common/widgets/bitmap_toggle.cpp @@ -24,6 +24,8 @@ #include +#include +#include wxDEFINE_EVENT( TOGGLE_CHANGED, wxCommandEvent ); diff --git a/common/widgets/indicator_icon.cpp b/common/widgets/indicator_icon.cpp index ef4dcc4eab..081b76e5ac 100644 --- a/common/widgets/indicator_icon.cpp +++ b/common/widgets/indicator_icon.cpp @@ -22,7 +22,10 @@ */ #include - +#include +#include +#include +#include INDICATOR_ICON::INDICATOR_ICON( wxWindow* aParent, ICON_PROVIDER& aIconProvider, ICON_ID aInitialIcon, int aID ): @@ -30,7 +33,7 @@ INDICATOR_ICON::INDICATOR_ICON( wxWindow* aParent, ICON_PROVIDER& aIconProvider, m_iconProvider( aIconProvider ), m_currentId( aInitialIcon ) { - auto sizer = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL ); SetSizer( sizer ); const wxBitmap& icon = m_iconProvider.GetIndicatorIcon( m_currentId ); diff --git a/common/widgets/paged_dialog.cpp b/common/widgets/paged_dialog.cpp index 8ba327b6b8..212977cb7e 100644 --- a/common/widgets/paged_dialog.cpp +++ b/common/widgets/paged_dialog.cpp @@ -19,10 +19,12 @@ #include #include +#include +#include +#include +#include #include #include -#include -#include #include #include diff --git a/eeschema/dialogs/panel_eeschema_color_settings.cpp b/eeschema/dialogs/panel_eeschema_color_settings.cpp index 2e11fea858..fe4388c55c 100644 --- a/eeschema/dialogs/panel_eeschema_color_settings.cpp +++ b/eeschema/dialogs/panel_eeschema_color_settings.cpp @@ -44,6 +44,7 @@ #include #include #include +#include PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS( SCH_BASE_FRAME* aFrame, diff --git a/eeschema/dialogs/panel_setup_pinmap.cpp b/eeschema/dialogs/panel_setup_pinmap.cpp index 480da55caf..9ba575939a 100644 --- a/eeschema/dialogs/panel_setup_pinmap.cpp +++ b/eeschema/dialogs/panel_setup_pinmap.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include diff --git a/eeschema/dialogs/panel_setup_pinmap.h b/eeschema/dialogs/panel_setup_pinmap.h index e721280d36..978c6d37c3 100644 --- a/eeschema/dialogs/panel_setup_pinmap.h +++ b/eeschema/dialogs/panel_setup_pinmap.h @@ -33,6 +33,7 @@ class SCH_EDIT_FRAME; class SCHEMATIC; +class wxBitmapButton; class PANEL_SETUP_PINMAP : public PANEL_SETUP_PINMAP_BASE diff --git a/include/widgets/bitmap_toggle.h b/include/widgets/bitmap_toggle.h index 26c6d2619f..9474c59707 100644 --- a/include/widgets/bitmap_toggle.h +++ b/include/widgets/bitmap_toggle.h @@ -25,10 +25,12 @@ #ifndef _BITMAP_TOGGLE_H #define _BITMAP_TOGGLE_H -#include +#include +#include #include +class wxStaticBitmap; wxDECLARE_EVENT( TOGGLE_CHANGED, wxCommandEvent ); diff --git a/include/widgets/footprint_select_widget.h b/include/widgets/footprint_select_widget.h index 45798c8286..e6629c495b 100644 --- a/include/widgets/footprint_select_widget.h +++ b/include/widgets/footprint_select_widget.h @@ -24,7 +24,6 @@ #include #include #include -#include class KIWAY; class PROJECT; diff --git a/include/widgets/indicator_icon.h b/include/widgets/indicator_icon.h index 63c8febcf9..ee347ec3f8 100644 --- a/include/widgets/indicator_icon.h +++ b/include/widgets/indicator_icon.h @@ -24,13 +24,16 @@ #ifndef ROW_INDICATOR__H_ #define ROW_INDICATOR__H_ -#include +#include +#include + +class wxStaticBitmap; /** * representing a row indicator icon for use in * places like the layer widget */ -class INDICATOR_ICON: public wxPanel +class INDICATOR_ICON : public wxPanel { public: diff --git a/include/widgets/resettable_panel.h b/include/widgets/resettable_panel.h index 0fd88ef708..bb82fc943b 100644 --- a/include/widgets/resettable_panel.h +++ b/include/widgets/resettable_panel.h @@ -20,7 +20,7 @@ #ifndef RESETTABLE_PANEL_H_ #define RESETTABLE_PANEL_H_ -#include +#include class PAGED_DIALOG; diff --git a/kicad/kicad_manager_frame.cpp b/kicad/kicad_manager_frame.cpp index 417eb08c96..3749509f1b 100644 --- a/kicad/kicad_manager_frame.cpp +++ b/kicad/kicad_manager_frame.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 0163e9a40a..3fd303bb75 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -62,6 +62,8 @@ #include "tools/pl_editor_control.h" #include +#include + BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME ) EVT_MENU( wxID_CLOSE, PL_EDITOR_FRAME::OnExit ) diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index e24e3d861c..ef87d4410e 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -77,6 +77,7 @@ #include #include #include +#include BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME )