Browse Source

Avoid include wx/wx.h in many files that do not actually use this include.

Including wx.h includes the full set of wxWidgets include files, that is not good,
and can create some conflicts with some Windows headers on msys2.
6.0.7
jean-pierre charras 5 years ago
parent
commit
f6b4b66a86
  1. 2
      3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp
  2. 3
      common/bitmap.cpp
  3. 1
      common/common.cpp
  4. 1
      common/confirm.cpp
  5. 2
      common/dialog_shim.cpp
  6. 1
      common/dialogs/dialog_configure_paths.cpp
  7. 1
      common/dialogs/dialog_edit_library_tables.cpp
  8. 1
      common/dialogs/dialog_image_editor.cpp
  9. 2
      common/dialogs/dialog_migrate_settings.cpp
  10. 4
      common/dialogs/dialog_text_entry.h
  11. 1
      common/dialogs/panel_setup_severities.cpp
  12. 2
      common/dialogs/panel_setup_severities.h
  13. 5
      common/eda_dde.cpp
  14. 2
      common/fp_lib_table.cpp
  15. 2
      common/gal/opengl/opengl_gal.cpp
  16. 3
      common/msgpanel.cpp
  17. 1
      common/pgm_base.cpp
  18. 15
      common/widgets/grid_text_button_helpers.cpp
  19. 2
      common/widgets/widget_hotkey_list.cpp
  20. 2
      demos/python_scripts_examples/gen_gerber_and_drill_files_board.py
  21. 4
      eeschema/sch_validators.cpp
  22. 1
      eeschema/sim/ngspice.cpp
  23. 2
      gerbview/DCodeSelectionbox.h
  24. 2
      include/class_board_item.h
  25. 3
      include/gal/color4d.h
  26. 2
      include/gr_basic.h
  27. 2
      include/kiway_player.h
  28. 1
      include/msgpanel.h
  29. 2
      include/painter.h
  30. 2
      include/render_settings.h
  31. 3
      include/widgets/ui_common.h
  32. 1
      kicad/dialogs/dialog_template_selector.cpp
  33. 2
      kicad/kicad.cpp
  34. 2
      pcbnew/board_stackup_manager/dialog_dielectric_list_manager.cpp
  35. 2
      pcbnew/dialogs/dialog_imported_layers.cpp
  36. 2
      pcbnew/swig/python_scripting.cpp
  37. 2
      qa/drc_proto/drc_proto_test.cpp
  38. 2
      qa/qa_utils/mock_pgm.cpp
  39. 119
      qa/qa_utils/mocks.cpp

2
3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp

@ -35,6 +35,8 @@
#include <filename_resolver.h>
#include <pcbnew/class_module.h>
#include <wx/filedlg.h>
#include <kiplatform/ui.h>

3
common/bitmap.cpp

@ -29,6 +29,9 @@
#include <wx/menu.h>
#include <wx/menuitem.h>
#include <wx/aui/auibar.h>
#include <wx/dc.h>
#include <wx/dcclient.h>
#include <wx/dcmemory.h>
#include <cstdint>
#include <mutex>

1
common/common.cpp

@ -34,6 +34,7 @@
#include <wx/utils.h>
#include <wx/stdpaths.h>
#include <wx/url.h>
#include <wx/wx.h>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/functional/hash.hpp>

1
common/confirm.cpp

@ -24,6 +24,7 @@
#include <wx/stockitem.h>
#include <wx/richmsgdlg.h>
#include <wx/choicdlg.h>
#include <confirm.h>
#include <bitmaps.h>
#include <html_messagebox.h>

2
common/dialog_shim.cpp

@ -32,6 +32,8 @@
#include <wx/display.h>
#include <wx/evtloop.h>
#include <wx/app.h>
#include <wx/event.h>
#include <wx/grid.h>
#include <algorithm>

1
common/dialogs/dialog_configure_paths.cpp

@ -35,6 +35,7 @@
#include <widgets/grid_text_button_helpers.h>
#include <algorithm>
#include <wx/dirdlg.h>
enum TEXT_VAR_GRID_COLUMNS
{

1
common/dialogs/dialog_edit_library_tables.cpp

@ -18,6 +18,7 @@
*/
#include <wx/statline.h>
#include <wx/button.h>
#include "dialog_edit_library_tables.h"

1
common/dialogs/dialog_image_editor.cpp

@ -22,6 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <wx/dcclient.h>
#include <confirm.h>
#include <bitmap_base.h>

2
common/dialogs/dialog_migrate_settings.cpp

@ -22,6 +22,8 @@
#include <dialogs/dialog_migrate_settings.h>
#include <settings/settings_manager.h>
#include <wx/dirdlg.h>
DIALOG_MIGRATE_SETTINGS::DIALOG_MIGRATE_SETTINGS( SETTINGS_MANAGER* aManager ) :
DIALOG_MIGRATE_SETTINGS_BASE( nullptr ), m_manager( aManager )

4
common/dialogs/dialog_text_entry.h

@ -32,9 +32,7 @@
#define _DIALOG_TEXT_ENTRY_H_
#include <dialog_text_entry_base.h>
class wxTextValidator;
#include <wx/valtext.h>
class WX_TEXT_ENTRY_DIALOG : public WX_TEXT_ENTRY_DIALOG_BASE

1
common/dialogs/panel_setup_severities.cpp

@ -25,6 +25,7 @@
#include <widgets/ui_common.h>
#include <rc_item.h>
#include "panel_setup_severities.h"
#include <wx/radiobut.h>
PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,

2
common/dialogs/panel_setup_severities.h

@ -28,10 +28,10 @@
#include <map>
#include <wx/panel.h>
class PAGED_DIALOG;
class EDA_DRAW_FRAME;
class wxRadioBox;
class wxRadioButton;
class PANEL_SETUP_SEVERITIES : public wxPanel

5
common/eda_dde.cpp

@ -26,12 +26,11 @@
* @file eda_dde.cpp
*/
//#include <fctsys.h>
#include <eda_dde.h>
#include <eda_draw_frame.h>
#include <id.h>
//#include <common.h>
//#include <macros.h>
#include <wx/wx.h>
static const wxString HOSTNAME( wxT( "localhost" ) );

2
common/fp_lib_table.cpp

@ -35,6 +35,8 @@
#include <fp_lib_table.h>
#include <class_module.h>
#include <wx/hash.h>
#define OPT_SEP '|' ///< options separator character
using namespace LIB_TABLE_T;

2
common/gal/opengl/opengl_gal.cpp

@ -44,6 +44,8 @@
#include <bezier_curves.h>
#include <math/util.h> // for KiROUND
#include <wx/frame.h>
#include <macros.h>
#ifdef __WXDEBUG__

3
common/msgpanel.cpp

@ -30,6 +30,9 @@
#include <msgpanel.h>
#include <wx/dcscreen.h>
#include <wx/dcclient.h>
BEGIN_EVENT_TABLE( EDA_MSG_PANEL, wxPanel )
EVT_PAINT( EDA_MSG_PANEL::OnPaint )

1
common/pgm_base.cpp

@ -38,6 +38,7 @@
#include <wx/stdpaths.h>
#include <wx/sysopt.h>
#include <wx/richmsgdlg.h>
#include <wx/filedlg.h>
#include <build_version.h>
#include <config_params.h>

15
common/widgets/grid_text_button_helpers.cpp

@ -22,6 +22,9 @@
*/
#include <wx/combo.h>
#include <wx/filedlg.h>
#include <wx/dirdlg.h>
#include <bitmap_types.h>
#include <bitmaps.h>
#include <kiway.h>
@ -315,7 +318,7 @@ class TEXT_BUTTON_FILE_BROWSER : public wxComboCtrl
{
public:
TEXT_BUTTON_FILE_BROWSER( wxWindow* aParent, DIALOG_SHIM* aParentDlg,
wxString* aCurrentDir, wxString* aExt = nullptr,
wxString* aCurrentDir, wxString* aExt = nullptr,
bool aNormalize = false, wxString aNormalizeBasePath = wxEmptyString ) :
wxComboCtrl( aParent ),
m_dlg( aParentDlg ),
@ -356,9 +359,9 @@ protected:
if( m_normalize )
{
relPath = NormalizePath( filePath, &Pgm().GetLocalEnvVariables(),
relPath = NormalizePath( filePath, &Pgm().GetLocalEnvVariables(),
m_normalizeBasePath );
lastPath = NormalizePath( dlg.GetDirectory(), &Pgm().GetLocalEnvVariables(),
lastPath = NormalizePath( dlg.GetDirectory(), &Pgm().GetLocalEnvVariables(),
m_normalizeBasePath );
}
@ -381,7 +384,7 @@ protected:
if ( m_normalize )
{
relPath = NormalizePath( filePath, &Pgm().GetLocalEnvVariables(),
relPath = NormalizePath( filePath, &Pgm().GetLocalEnvVariables(),
m_normalizeBasePath );
}
@ -406,10 +409,10 @@ void GRID_CELL_PATH_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
wxEvtHandler* aEventHandler )
{
if( m_ext.IsEmpty() )
m_control = new TEXT_BUTTON_FILE_BROWSER( aParent, m_dlg, m_currentDir, nullptr,
m_control = new TEXT_BUTTON_FILE_BROWSER( aParent, m_dlg, m_currentDir, nullptr,
m_normalize, m_normalizeBasePath );
else
m_control = new TEXT_BUTTON_FILE_BROWSER( aParent, m_dlg, m_currentDir, &m_ext,
m_control = new TEXT_BUTTON_FILE_BROWSER( aParent, m_dlg, m_currentDir, &m_ext,
m_normalize, m_normalizeBasePath );
#if wxUSE_VALIDATORS

2
common/widgets/widget_hotkey_list.cpp

@ -26,6 +26,8 @@
#include <widgets/widget_hotkey_list.h>
#include <wx/statline.h>
#include <wx/treelist.h>
#include <wx/msgdlg.h>
#include <wx/menu.h>
#include <tool/tool_action.h>
#include <dialog_shim.h>

2
demos/python_scripts_examples/gen_gerber_and_drill_files_board.py

@ -41,7 +41,7 @@ popt.SetOutputDirectory(plotDir)
# Set some important plot options (see pcb_plot_params.h):
popt.SetPlotFrameRef(False) #do not change it
popt.SetLineWidth(FromMM(0.35))
popt.SetSketchPadLineWidth(FromMM(0.1))
popt.SetAutoScale(False) #do not change it
popt.SetScale(1) #do not change it

4
eeschema/sch_validators.cpp

@ -27,8 +27,10 @@
* @brief Implementation of control validators for schematic dialogs.
*/
#include <sch_connection.h>
#include <wx/combo.h>
#include <wx/msgdlg.h>
#include <sch_connection.h>
#include <sch_validators.h>
#include <project/net_settings.h>
#include <template_fieldnames.h>

1
eeschema/sim/ngspice.cpp

@ -26,6 +26,7 @@
*/
#include <config.h> // Needed for MSW compilation
#include <wx/log.h>
#include "ngspice.h"
#include "spice_reporter.h"

2
gerbview/DCodeSelectionbox.h

@ -27,6 +27,8 @@
#ifndef DCODESELECTIONBOX_H
#define DCODESELECTIONBOX_H
#include <wx/combobox.h>
/* helper class to display a DCode list and select a DCode id.
*/

2
include/class_board_item.h

@ -38,6 +38,8 @@
#include <layers_id_colors_and_visibility.h>
#include <geometry/geometry_utils.h>
#include <wx/msgdlg.h>
class BOARD;
class BOARD_ITEM_CONTAINER;
class SHAPE_POLY_SET;

3
include/gal/color4d.h

@ -31,7 +31,8 @@
#include <nlohmann/json_fwd.hpp>
#ifdef WX_COMPATIBILITY
#include <wx/wx.h>
#include <wx/colour.h>
#include <wx/string.h>
#endif
/**

2
include/gr_basic.h

@ -29,6 +29,8 @@
#include <gal/color4d.h>
#include <vector>
#include <eda_rect.h>
#include <wx/pen.h>
#include <wx/dc.h>
using KIGFX::COLOR4D;

2
include/kiway_player.h

@ -26,6 +26,8 @@
#define KIWAY_PLAYER_H_
#include <wx/frame.h>
#include <wx/cmdline.h>
#include <vector>
#include <kiway_holder.h>
#include <eda_base_frame.h>

1
include/msgpanel.h

@ -35,6 +35,7 @@
#include <gal/color4d.h>
#include <wx/window.h>
#include <wx/panel.h>
#include <vector>

2
include/painter.h

@ -30,6 +30,8 @@
#include <map>
#include <set>
#include <wx/dc.h>
#include <gal/color4d.h>
#include <render_settings.h>
#include <layers_id_colors_and_visibility.h>

2
include/render_settings.h

@ -31,6 +31,8 @@
#include <layers_id_colors_and_visibility.h>
#include <memory>
#include <wx/dc.h>
class COLOR_SETTINGS;
namespace KIGFX

3
include/widgets/ui_common.h

@ -26,8 +26,9 @@
#ifndef UI_COMMON_H
#define UI_COMMON_H
#include <wx/wx.h>
#include <wx/string.h>
class wxWindow;
namespace KIUI
{

1
kicad/dialogs/dialog_template_selector.cpp

@ -25,6 +25,7 @@
#include "dialog_template_selector.h"
#include <wx/dir.h>
#include <wx/dirdlg.h>
#include <wx/settings.h>

2
kicad/kicad.cpp

@ -30,7 +30,7 @@
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/stdpaths.h>
#include <wx/app.h>
#include <filehistory.h>
#include <hotkeys_basic.h>

2
pcbnew/board_stackup_manager/dialog_dielectric_list_manager.cpp

@ -23,7 +23,7 @@
*/
#include "dialog_dielectric_list_manager.h"
#include <wx/msgdlg.h>
DIALOG_DIELECTRIC_MATERIAL::DIALOG_DIELECTRIC_MATERIAL( wxWindow* aParent,
DIELECTRIC_SUBSTRATE_LIST& aMaterialList )

2
pcbnew/dialogs/dialog_imported_layers.cpp

@ -22,6 +22,8 @@
#include <layers_id_colors_and_visibility.h>
#include <dialog_imported_layers.h>
#include <wx/msgdlg.h>
PCB_LAYER_ID DIALOG_IMPORTED_LAYERS::GetSelectedLayerID()
{

2
pcbnew/swig/python_scripting.cpp

@ -39,6 +39,8 @@
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <wx/app.h>
/* init functions defined by swig */
#if PY_MAJOR_VERSION >= 3

2
qa/drc_proto/drc_proto_test.cpp

@ -27,6 +27,8 @@
#include <profile.h>
#include <wx/cmdline.h>
#include <wx/init.h>
#include <property_mgr.h>
#include <pgm_base.h>

2
qa/qa_utils/mock_pgm.cpp

@ -26,6 +26,8 @@
#include <kiway.h>
#include <kiway_player.h>
#include <wx/app.h>
static struct IFACE : public KIFACE_I
{

119
qa/qa_utils/mocks.cpp

@ -28,6 +28,7 @@
#include <eda_dde.h>
#include <wx/file.h>
#include <wx/snglinst.h>
#include <wx/app.h>
#include <class_board.h>
#include <fp_lib_table.h>
#include <footprint_viewer_frame.h>
@ -318,25 +319,25 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt
m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( RANGE_SCALE_3D )
{
}
EDA_3D_VIEWER::~EDA_3D_VIEWER()
{
}
void EDA_3D_VIEWER::setupUIConditions()
{
}
void EDA_3D_VIEWER::ReloadRequest()
{
}
@ -348,80 +349,80 @@ void EDA_3D_VIEWER::NewDisplay( bool aForceImmediateRedraw )
void EDA_3D_VIEWER::Exit3DFrame( wxCommandEvent &event )
{
}
void EDA_3D_VIEWER::OnCloseWindow( wxCloseEvent &event )
{
}
void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
{
}
void EDA_3D_VIEWER::OnRenderEngineSelection( wxCommandEvent &event )
{
}
void EDA_3D_VIEWER::OnDisableRayTracing( wxCommandEvent& aEvent )
{
}
void EDA_3D_VIEWER::OnActivate( wxActivateEvent &event )
{
}
void EDA_3D_VIEWER::OnSetFocus(wxFocusEvent &event)
{
}
void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg )
{
}
void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg )
{
}
void EDA_3D_VIEWER::SynchroniseColoursWithBoard()
{
}
void EDA_3D_VIEWER::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
{
}
void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event )
{
}
void EDA_3D_VIEWER::RenderEngineChanged()
{
}
@ -430,7 +431,7 @@ bool EDA_3D_VIEWER::Set3DColorFromUser( SFVEC4F &aColor, const wxString& aTitle,
bool aAllowOpacityControl,
KIGFX::COLOR4D aDefaultColor )
{
return true;
}
@ -480,7 +481,7 @@ SELECTION_TOOL::SELECTION_TOOL() :
m_enteredGroup( NULL ),
m_priv( nullptr )
{
}
@ -491,33 +492,33 @@ SELECTION_TOOL::~SELECTION_TOOL()
bool SELECTION_TOOL::Init()
{
return true;
}
void SELECTION_TOOL::Reset( RESET_REASON aReason )
{
}
int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
{
return 0;
}
void SELECTION_TOOL::EnterGroup()
{
}
void SELECTION_TOOL::ExitGroup( bool aSelectGroup )
{
}
@ -531,7 +532,7 @@ PCBNEW_SELECTION& SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aCli
std::vector<BOARD_ITEM*>* aFiltered,
bool aConfirmLockedItems )
{
return m_selection;
}
@ -546,7 +547,7 @@ bool SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag,
bool* aSelectionCancelledFlag,
CLIENT_SELECTION_FILTER aClientFilter )
{
return false;
}
@ -561,14 +562,14 @@ bool SELECTION_TOOL::selectCursor( bool aForceSelect, CLIENT_SELECTION_FILTER aC
bool SELECTION_TOOL::selectMultiple()
{
return false;
}
SELECTION_LOCK_FLAGS SELECTION_TOOL::CheckLock()
{
return SELECTION_UNLOCKED;
}
@ -589,7 +590,7 @@ int SELECTION_TOOL::ClearSelection( const TOOL_EVENT& aEvent )
int SELECTION_TOOL::SelectItems( const TOOL_EVENT& aEvent )
{
return 0;
}
@ -602,7 +603,7 @@ int SELECTION_TOOL::SelectItem( const TOOL_EVENT& aEvent )
int SELECTION_TOOL::SelectAll( const TOOL_EVENT& aEvent )
{
return 0;
}
@ -610,13 +611,13 @@ int SELECTION_TOOL::SelectAll( const TOOL_EVENT& aEvent )
void SELECTION_TOOL::AddItemToSel( BOARD_ITEM* aItem, bool aQuietMode )
{
}
int SELECTION_TOOL::UnselectItems( const TOOL_EVENT& aEvent )
{
return 0;
}
@ -629,7 +630,7 @@ int SELECTION_TOOL::UnselectItem( const TOOL_EVENT& aEvent )
void SELECTION_TOOL::RemoveItemFromSel( BOARD_ITEM* aItem, bool aQuietMode )
{
}
@ -647,7 +648,7 @@ void SELECTION_TOOL::UnbrightenItem( BOARD_ITEM* aItem )
int SELECTION_TOOL::expandConnection( const TOOL_EVENT& aEvent )
{
return 0;
}
@ -655,58 +656,58 @@ int SELECTION_TOOL::expandConnection( const TOOL_EVENT& aEvent )
void SELECTION_TOOL::selectConnectedTracks( BOARD_CONNECTED_ITEM& aStartItem,
STOP_CONDITION aStopCondition )
{
}
void SELECTION_TOOL::selectAllItemsOnNet( int aNetCode, bool aSelect )
{
}
int SELECTION_TOOL::selectNet( const TOOL_EVENT& aEvent )
{
return 0;
}
void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
{
}
void SELECTION_TOOL::zoomFitSelection()
{
}
int SELECTION_TOOL::selectSheetContents( const TOOL_EVENT& aEvent )
{
return 0;
}
int SELECTION_TOOL::selectSameSheet( const TOOL_EVENT& aEvent )
{
return 0;
}
void SELECTION_TOOL::findCallback( BOARD_ITEM* aItem )
{
}
int SELECTION_TOOL::find( const TOOL_EVENT& aEvent )
{
return 0;
}
@ -721,7 +722,7 @@ int SELECTION_TOOL::find( const TOOL_EVENT& aEvent )
static bool itemIsIncludedByFilter( const BOARD_ITEM& aItem, const BOARD& aBoard,
const DIALOG_FILTER_SELECTION::OPTIONS& aFilterOptions )
{
return false;
}
@ -729,20 +730,20 @@ static bool itemIsIncludedByFilter( const BOARD_ITEM& aItem, const BOARD& aBoard
int SELECTION_TOOL::filterSelection( const TOOL_EVENT& aEvent )
{
return 0;
}
void SELECTION_TOOL::FilterCollectedItems( GENERAL_COLLECTOR& aCollector )
{
}
bool SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem )
{
return true;
}
@ -750,13 +751,13 @@ bool SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem )
void SELECTION_TOOL::ClearSelection( bool aQuietMode )
{
}
void SELECTION_TOOL::RebuildSelection()
{
}
@ -787,41 +788,41 @@ bool SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibilityOn
void SELECTION_TOOL::select( BOARD_ITEM* aItem )
{
}
void SELECTION_TOOL::unselect( BOARD_ITEM* aItem )
{
}
void SELECTION_TOOL::highlight( BOARD_ITEM* aItem, int aMode, PCBNEW_SELECTION* aGroup )
{
}
void SELECTION_TOOL::highlightInternal( BOARD_ITEM* aItem, int aMode, PCBNEW_SELECTION* aGroup, bool isChild )
{
}
void SELECTION_TOOL::unhighlight( BOARD_ITEM* aItem, int aMode, PCBNEW_SELECTION* aGroup )
{
}
void SELECTION_TOOL::unhighlightInternal( BOARD_ITEM* aItem, int aMode, PCBNEW_SELECTION* aGroup, bool isChild )
{
}
bool SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const
{
return false;
}
@ -829,13 +830,13 @@ bool SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const
void SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector,
const VECTOR2I& aWhere ) const
{
}
void SELECTION_TOOL::FilterCollectorForGroups( GENERAL_COLLECTOR& aCollector ) const
{
}
@ -848,7 +849,7 @@ int SELECTION_TOOL::updateSelection( const TOOL_EVENT& aEvent )
int SELECTION_TOOL::UpdateMenu( const TOOL_EVENT& aEvent )
{
return 0;
}

Loading…
Cancel
Save