From fbc74482dbb875d158e40a3dbba05dac7c844292 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Fri, 8 Aug 2025 21:02:26 +0200 Subject: [PATCH] Fix some includes in atlas Make include-what-you-use happy with some files in source/tools/atlas and fix what needs to be fixed. Drop the wxWidgets specific handling of precompiled headers in some places, it isn't consistently used which it would have to to have meaning and was mostly for early VS implementation of precompiled headers and a lot of time has gone by since. Drop Borland C++ compiler specific quirk, that compiler was discontinued long ago and doesn't support modern C++. Ref: #8086 Signed-off-by: Ralph Sennhauser --- source/gui/ObjectTypes/CMiniMap.h | 4 +- .../CustomControls/Buttons/ActionButton.h | 11 +++++- .../CustomControls/Buttons/ToolButton.h | 12 ++++-- .../AtlasUI/CustomControls/Canvas/Canvas.cpp | 2 +- .../ColorDialog/ColorDialog.cpp | 13 +++++-- .../CustomControls/ColorDialog/ColorDialog.h | 6 ++- .../DraggableListCtrl/DraggableListCtrl.cpp | 7 ++-- .../DraggableListCtrl/DraggableListCtrl.h | 15 +++++-- .../DraggableListCtrlCommands.cpp | 12 ++++-- .../DraggableListCtrlCommands.h | 10 +++-- .../EditableListCtrl/EditableListCtrl.cpp | 23 +++++++---- .../EditableListCtrl/EditableListCtrl.h | 20 +++++++--- .../EditableListCtrlCommands.cpp | 9 ++++- .../EditableListCtrlCommands.h | 11 ++++-- .../EditableListCtrl/FieldEditCtrl.cpp | 39 ++++++++++--------- .../EditableListCtrl/FieldEditCtrl.h | 7 +++- .../EditableListCtrl/ListCtrlValidator.cpp | 18 +++++---- .../EditableListCtrl/ListCtrlValidator.h | 4 +- .../EditableListCtrl/QuickComboBox.cpp | 8 +++- .../EditableListCtrl/QuickComboBox.h | 11 +++++- .../EditableListCtrl/QuickFileCtrl.cpp | 21 ++++++++-- .../EditableListCtrl/QuickFileCtrl.h | 14 ++++++- .../EditableListCtrl/QuickTextCtrl.cpp | 6 ++- .../EditableListCtrl/QuickTextCtrl.h | 10 ++++- .../FileHistory/FileHistory.cpp | 4 +- .../CustomControls/FileHistory/FileHistory.h | 7 +++- .../HighResTimer/HighResTimer.cpp | 4 +- .../HighResTimer/HighResTimer.h | 4 +- .../CustomControls/MapDialog/MapDialog.cpp | 24 ++++++++++-- .../CustomControls/MapDialog/MapDialog.h | 7 +++- .../MapResizeDialog/MapResizeDialog.cpp | 1 + .../MapResizeDialog/MapResizeDialog.h | 10 +++-- .../MapResizeDialog/PseudoMiniMapPanel.cpp | 2 +- .../MapResizeDialog/PseudoMiniMapPanel.h | 9 ++++- .../SnapSplitterWindow/SnapSplitterWindow.cpp | 10 ++++- .../SnapSplitterWindow/SnapSplitterWindow.h | 9 ++++- .../VirtualDirTreeCtrl/virtualdirtreectrl.cpp | 25 ++++++------ .../VirtualDirTreeCtrl/virtualdirtreectrl.h | 29 ++++++++------ .../CustomControls/Windows/AtlasDialog.cpp | 17 +++++++- .../CustomControls/Windows/AtlasDialog.h | 17 +++++--- .../CustomControls/Windows/AtlasWindow.cpp | 2 + 41 files changed, 339 insertions(+), 135 deletions(-) diff --git a/source/gui/ObjectTypes/CMiniMap.h b/source/gui/ObjectTypes/CMiniMap.h index e14e8de303..d75566c6be 100644 --- a/source/gui/ObjectTypes/CMiniMap.h +++ b/source/gui/ObjectTypes/CMiniMap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -22,12 +22,12 @@ #include "graphics/Texture.h" #include "gui/CGUISetting.h" #include "gui/ObjectBases/IGUIObject.h" +#include "lib/posix/posix_types.h" #include "lib/types.h" #include "maths/Vector2D.h" #include "ps/CStr.h" #include -#include #include class CCanvas2D; diff --git a/source/tools/atlas/AtlasUI/CustomControls/Buttons/ActionButton.h b/source/tools/atlas/AtlasUI/CustomControls/Buttons/ActionButton.h index 2541e7ff20..a6d161f6f0 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Buttons/ActionButton.h +++ b/source/tools/atlas/AtlasUI/CustomControls/Buttons/ActionButton.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,6 +15,15 @@ * along with 0 A.D. If not, see . */ +#include +#include +#include +#include + +class wxSize; +class wxString; +class wxWindow; + class ActionButton : public wxButton { typedef void (*actionFun)(void* data); diff --git a/source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.h b/source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.h index 4508289508..7c62948d57 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.h +++ b/source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,13 +15,17 @@ * along with 0 A.D. If not, see . */ -//#include "wx/tglbtn.h" - #include +#include +#include +#include +#include +#include -class ITool; class SectionLayout; class ToolManager; +class wxSize; +class wxWindow; class ToolButton : public wxButton { diff --git a/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp b/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp index 0ecd6662f5..1949de139f 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include class wxWindow; diff --git a/source/tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.cpp b/source/tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.cpp index a4505f664f..b567ae274b 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,11 +17,16 @@ #include "precompiled.h" -#include "wx/regex.h" -#include "wx/config.h" - #include "ColorDialog.h" +#include +#include +#include +#include +#include + +class wxWindow; + ColorDialog::ColorDialog(wxWindow* parent, const wxString& customColorConfigPath, const wxColor& defaultColor) : wxColourDialog(parent), m_ConfigPath(customColorConfigPath) { diff --git a/source/tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.h b/source/tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.h index 8a5f3401c3..782d0920b7 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.h +++ b/source/tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,6 +19,10 @@ #define INCLUDED_COLORDIALOG #include +#include +#include + +class wxWindow; class ColorDialog : public wxColourDialog { diff --git a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.cpp index c37695934d..fe632f04d4 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,8 +19,9 @@ #include "DraggableListCtrl.h" -#include "General/AtlasWindowCommandProc.h" -#include "DraggableListCtrlCommands.h" +#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" const int ScrollSpeed = 8; // when dragging off the top or bottom of the control diff --git a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h index 7e21ce9cd5..512486a4ca 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h +++ b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -25,11 +25,18 @@ Use just like a normal listctrl. */ -#include "EditableListCtrl/EditableListCtrl.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h" -#include "wx/listctrl.h" +#include +#include +#include +#include +#include +#include -class DragCommand; +class wxPoint; +class wxSize; +class wxWindow; class DraggableListCtrl : public EditableListCtrl { diff --git a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.cpp b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.cpp index bbb147ce28..fde507cad3 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,8 +19,14 @@ #include "DraggableListCtrlCommands.h" -#include "DraggableListCtrl.h" -#include "EditableListCtrl/EditableListCtrl.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" + +#include +#include +#include +#include ////////////////////////////////////////////////////////////////////////// diff --git a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h index 2f4ad53229..8576ca4624 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h +++ b/source/tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrlCommands.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,13 +15,15 @@ * along with 0 A.D. If not, see . */ -#include "General/AtlasWindowCommand.h" - -#include "AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" #include +#include +#include class DraggableListCtrl; +class wxClassInfo; class DragCommand : public AtlasWindowCommand { diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.cpp index 199350b9b3..f7917a6560 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,12 +19,21 @@ #include "EditableListCtrl.h" -#include "EditableListCtrlCommands.h" -#include "FieldEditCtrl.h" -#include "General/AtlasWindowCommandProc.h" -#include "AtlasObject/AtlasObject.h" -#include "AtlasObject/AtlasObjectText.h" -#include "General/AtlasClipboard.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasObject/AtlasObjectText.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h" +#include "tools/atlas/AtlasUI/General/AtlasClipboard.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" + +#include +#include +#include +#include +#include +#include + +class wxWindow; const int BlanksAtEnd = 2; diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h index ccbbe01e9d..5a1b7bda6d 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,15 +18,23 @@ #ifndef INCLUDED_EDITABLELISTCTRL #define INCLUDED_EDITABLELISTCTRL -#include "wx/listctrl.h" - -#include "General/IAtlasSerialiser.h" +#include "tools/atlas/AtlasUI/General/IAtlasSerialiser.h" #include +#include +#include +#include +#include +#include +#include -class FieldEditCtrl; -class AtObj; class AtIter; +class AtObj; +class FieldEditCtrl; +class wxPoint; +class wxRect; +class wxSize; +class wxWindow; class EditableListCtrl : public wxListCtrl, public IAtlasSerialiser { diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.cpp index f56124ea43..7071bff357 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,7 +19,12 @@ #include "EditableListCtrlCommands.h" -#include "EditableListCtrl.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" + +#include +#include ////////////////////////////////////////////////////////////////////////// diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.h b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.h index 5f9d3a146c..2d3f11c914 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.h +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,13 +15,16 @@ * along with 0 A.D. If not, see . */ -#include "General/AtlasWindowCommand.h" - -#include "AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" #include +#include +#include +#include class EditableListCtrl; +class wxClassInfo; class EditCommand_Dialog : public AtlasWindowCommand { diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.cpp index 6e14e23e01..5571619c07 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,25 +19,26 @@ #include "FieldEditCtrl.h" -#include "EditableListCtrlCommands.h" -#include "ListCtrlValidator.h" +#include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.h" +#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/General/Datafile.h" -#include "QuickTextCtrl.h" -#include "QuickComboBox.h" -#include "QuickFileCtrl.h" - -#include "Windows/AtlasDialog.h" -#include "EditableListCtrl/EditableListCtrl.h" -#include "AtlasObject/AtlasObject.h" -#include "AtlasObject/AtlasObjectText.h" -#include "General/Datafile.h" - -#include "wx/colour.h" -#include "wx/colordlg.h" -#include "wx/regex.h" -#include "wx/filename.h" - -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include ////////////////////////////////////////////////////////////////////////// diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h index 72406f149e..a60d835d28 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,11 @@ #ifndef INCLUDED_FIELDEDITCTRL #define INCLUDED_FIELDEDITCTRL -class EditableListCtrl; +#include +#include + class AtlasDialog; +class wxWindow; class FieldEditCtrl { diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.cpp index faeb214e80..6fc6a282f6 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,13 +19,17 @@ #include "ListCtrlValidator.h" -#include "General/AtlasWindowCommandProc.h" -#include "EditableListCtrl/EditableListCtrl.h" -#include "EditableListCtrl/EditableListCtrlCommands.h" - -#include "AtlasObject/AtlasObject.h" -#include "AtlasObject/AtlasObjectText.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrl.h" +#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/EditableListCtrlCommands.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include +#include +#include +#include +#include +#include +#include ListCtrlValidator::ListCtrlValidator() : m_listCtrl(NULL) diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.h b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.h index 56373c6a4f..adcfb7886e 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.h +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/ListCtrlValidator.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,6 +15,8 @@ * along with 0 A.D. If not, see . */ +#include + class EditableListCtrl; class ListCtrlValidator : public wxValidator diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.cpp index e3e4fbce2a..f7a15ff5c6 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,6 +19,12 @@ #include "QuickComboBox.h" +#include +#include +#include + +class wxArrayString; + const int verticalPadding = 2; QuickComboBox::QuickComboBox(wxWindow* parent, diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.h b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.h index ec5177a162..393e0343bb 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.h +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickComboBox.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,6 +15,15 @@ * along with 0 A.D. If not, see . */ +#include +#include +#include +#include + +class wxArrayString; +class wxRect; +class wxWindow; + class QuickComboBox : public wxComboBox { public: diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp index 88354a8827..a955c511ed 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,9 +19,24 @@ #include "QuickFileCtrl.h" -#include "General/Datafile.h" +#include "tools/atlas/AtlasUI/General/Datafile.h" -#include "wx/filename.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include const int verticalPadding = 2; diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.h b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.h index 2dcd95bc12..24ae4532a0 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.h +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickFileCtrl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,7 +15,17 @@ * along with 0 A.D. If not, see . */ -#include "wx/panel.h" +#include +#include +#include +#include + +class wxButton; +class wxClassInfo; +class wxRect; +class wxString; +class wxTextCtrl; +class wxWindow; class QuickFileCtrl : public wxPanel { diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.cpp index f4164e9e54..bfb5ad32cc 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,6 +19,10 @@ #include "QuickTextCtrl.h" +#include +#include +#include + const int verticalPadding = 2; QuickTextCtrl::QuickTextCtrl(wxWindow* parent, diff --git a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.h b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.h index 6502b2ac73..23c0eb667f 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.h +++ b/source/tools/atlas/AtlasUI/CustomControls/EditableListCtrl/QuickTextCtrl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,6 +15,14 @@ * along with 0 A.D. If not, see . */ +#include +#include +#include +#include + +class wxRect; +class wxWindow; + class QuickTextCtrl : public wxTextCtrl { public: diff --git a/source/tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.cpp b/source/tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.cpp index eb0e328e8d..d3d08a7b62 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,7 +19,7 @@ #include "FileHistory.h" -#include "wx/confbase.h" +#include FileHistory::FileHistory(const wxString& configSubdir) : wxFileHistory(9), m_configSubdir(configSubdir) diff --git a/source/tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.h b/source/tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.h index 7f5a654a7a..339007c407 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.h +++ b/source/tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,7 +18,10 @@ #ifndef INCLUDED_FILEHISTORY #define INCLUDED_FILEHISTORY -#include "wx/docview.h" +#include +#include + +class wxConfigBase; class FileHistory : public wxFileHistory { diff --git a/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.cpp b/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.cpp index 234f5429a3..42ee5cd5da 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,6 +19,8 @@ #include "HighResTimer.h" +#include + // TODO: Better accuracy and reliability, if necessary. #ifdef __WXMSW__ diff --git a/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.h b/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.h index d8f0adf6dc..45e8efbc50 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.h +++ b/source/tools/atlas/AtlasUI/CustomControls/HighResTimer/HighResTimer.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,6 +15,8 @@ * along with 0 A.D. If not, see . */ +#include + class HighResTimer { public: diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp b/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp index 9b35b8d99e..4b5558cae2 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,11 +19,29 @@ #include "MapDialog.h" -#include "GameInterface/MessagePasser.h" -#include "GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Messages.h" +#include "tools/atlas/GameInterface/Shareable.h" +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include + +class wxWindow; enum { ID_MapDialogFilename = 1, diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.h b/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.h index 61c8e49a25..b167368073 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.h +++ b/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,14 @@ #ifndef INCLUDED_MAPDIALOG #define INCLUDED_MAPDIALOG +#include #include +#include +#include class wxBookCtrlEvent; +class wxIcon; +class wxWindow; enum MapDialogType { MAPDIALOG_OPEN, MAPDIALOG_SAVE }; diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.cpp b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.cpp index 819edfaed9..28afc50f3f 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.h b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.h index 6268d8b3ed..7560095ced 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.h +++ b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,13 @@ #ifndef INCLUDED_MAPRESIZEDIALOG #define INCLUDED_MAPRESIZEDIALOG -#include "PseudoMiniMapPanel.h" - +#include #include +#include + +class PseudoMiniMapPanel; +class wxPoint; +class wxWindow; class MapResizeDialog : public wxDialog { diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp index 29fe791817..73a63a56e0 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include class wxWindow; diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.h b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.h index d906c29fde..920a67ae16 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.h +++ b/source/tools/atlas/AtlasUI/CustomControls/MapResizeDialog/PseudoMiniMapPanel.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -20,8 +20,15 @@ #define INCLUDED_PSEUDOMINIMAPPANEL #include +#include +#include +#include +#include +#include #include +class wxWindow; + class PseudoMiniMapPanel : public wxPanel { public: diff --git a/source/tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.cpp b/source/tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.cpp index 200de6c1a5..3e0fa3a4e7 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,7 +19,13 @@ #include "SnapSplitterWindow.h" -#include +#include +#include +#include +#include +#include + +class wxWindow; BEGIN_EVENT_TABLE(SnapSplitterWindow, wxSplitterWindow) EVT_SPLITTER_SASH_POS_CHANGING(wxID_ANY, SnapSplitterWindow::OnSashPosChanging) diff --git a/source/tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.h b/source/tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.h index 6db0be0139..47e7824f0b 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.h +++ b/source/tools/atlas/AtlasUI/CustomControls/SnapSplitterWindow/SnapSplitterWindow.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -15,7 +15,12 @@ * along with 0 A.D. If not, see . */ -#include "wx/splitter.h" +#include +#include +#include +#include + +class wxWindow; class SnapSplitterWindow : public wxSplitterWindow { diff --git a/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp b/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp index 45057e62a2..5aebe5255f 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -21,21 +21,18 @@ #include "precompiled.h" -//#ifdef __GNUG__ -// #pragma implementation "wxVirtualDirTreeCtrl.cpp" -//#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#include -#include #include "virtualdirtreectrl.h" +#include "wx/imaglist.h" +#include +#include +#include +#include +#include +#include + +class wxWindow; + // default images #include "folder.xpm" diff --git a/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h b/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h index 1aab1043b5..1515688a76 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h +++ b/source/tools/atlas/AtlasUI/CustomControls/VirtualDirTreeCtrl/virtualdirtreectrl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -22,18 +22,25 @@ #ifndef INCLUDED_VIRTUALDIRTREECTRL #define INCLUDED_VIRTUALDIRTREECTRL -//#ifdef __GNUG__ -// #pragma interface "virtualdirtreectrl.cpp" -//#endif - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include + +class wxBitmap; +class wxImageList; +class wxWindow; enum { diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.cpp b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.cpp index 42e4af26b4..3898cf3542 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,7 +19,20 @@ #include "AtlasDialog.h" -#include "wx/statline.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class wxSize; +class wxWindow; IMPLEMENT_CLASS(AtlasDialog, wxDialog); diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h index acef0d35fc..9062edf5d5 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,12 +18,19 @@ #ifndef INCLUDED_ATLASDIALOG #define INCLUDED_ATLASDIALOG -#include "wx/dialog.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" +#include "tools/atlas/AtlasUI/General/IAtlasSerialiser.h" -#include "General/AtlasWindowCommandProc.h" -#include "General/IAtlasSerialiser.h" +#include +#include +#include +#include -class FieldEditCtrl_Dialog; +class wxClassInfo; +class wxPanel; +class wxSize; +class wxString; +class wxWindow; class AtlasDialog : public wxDialog, public IAtlasSerialiser { diff --git a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp index 1fff73a058..6da18067f6 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.cpp @@ -20,7 +20,9 @@ #include "AtlasWindow.h" #include "tools/atlas/AtlasObject/AtlasObject.h" +#include "tools/atlas/AtlasUI/CustomControls/FileHistory/FileHistory.h" #include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h" +#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h" #include "tools/atlas/AtlasUI/General/Datafile.h" #include