1
0
forked from mirrors/0ad

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.

Define ATLASDLLIMPEXP in a regular header instead of a PCH header and
dedupe its definition.

wxWidgets uses WX_ATTRIBUTE_PRINTF this days, so remove the workaround
for ATTRIBUTE_PRINTF.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2025-08-09 12:01:01 +02:00
parent cea708ac91
commit d6b0198bab
43 changed files with 580 additions and 178 deletions
@@ -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
@@ -16,18 +16,12 @@
*/
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Don't use pragmas here to set the manifests, instead do this in premake.lua
* since pragmas get ignored by the autobuilder
* (see comments in lib\sysdep\os\win\manifest.cpp)
*/
# define ATLASDLLIMPEXP extern "C" __declspec(dllimport)
#else
# define ATLASDLLIMPEXP extern "C"
#endif
#include "AtlasUI/Misc/DLLInterface.h"
@@ -1,4 +1,4 @@
/* Copyright (C) 2023 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,16 +17,36 @@
#include "precompiled.h"
#include <boost/algorithm/string/predicate.hpp>
#include "ActorEditor.h"
#include "ActorEditorListCtrl.h"
#include "AtlasObject/AtlasObject.h"
#include "AtlasObject/AtlasObjectText.h"
#include "General/Datafile.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/ActorEditor/ActorEditorListCtrl.h"
#include "tools/atlas/AtlasUI/General/Datafile.h"
#include "wx/file.h"
#include <boost/algorithm/string/predicate.hpp>
#include <cstring>
#include <string>
#include <wx/arrstr.h>
#include <wx/chartype.h>
#include <wx/checkbox.h>
#include <wx/combobox.h>
#include <wx/debug.h>
#include <wx/file.h>
#include <wx/filedlg.h>
#include <wx/filename.h>
#include <wx/gdicmn.h>
#include <wx/icon.h>
#include <wx/log.h>
#include <wx/menu.h>
#include <wx/msgdlg.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/string.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
class wxWindow;
BEGIN_EVENT_TABLE(ActorEditor, AtlasWindow)
EVT_MENU(ID_CreateEntity, ActorEditor::OnCreateEntity)
@@ -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
@@ -17,7 +17,15 @@
#include "Windows/AtlasWindow.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include <wx/defs.h>
#include <wx/event.h>
class ActorEditorListCtrl;
class wxCheckBox;
class wxComboBox;
class wxWindow;
class ActorEditor : public AtlasWindow
{
@@ -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,23 @@
#include "ActorEditorListCtrl.h"
#include "AnimListEditor.h"
#include "TexListEditor.h"
#include "PropListEditor.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/ActorEditor/AnimListEditor.h"
#include "tools/atlas/AtlasUI/ActorEditor/PropListEditor.h"
#include "tools/atlas/AtlasUI/ActorEditor/TexListEditor.h"
#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h"
#include "AtlasObject/AtlasObject.h"
#include "EditableListCtrl/FieldEditCtrl.h"
#include <cstddef>
#include <string>
#include <vector>
#include <wx/chartype.h>
#include <wx/colour.h>
#include <wx/defs.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
class wxWindow;
ActorEditorListCtrl::ActorEditorListCtrl(wxWindow* parent)
: DraggableListCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
@@ -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,9 +15,12 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h"
class ActorEditor;
#include <wx/listctrl.h>
class wxCommandEvent;
class wxWindow;
class ActorEditorListCtrl : public DraggableListCtrl
{
@@ -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,23 @@
#include "AnimListEditor.h"
#include "EditableListCtrl/FieldEditCtrl.h"
#include "AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h"
#include <cstddef>
#include <vector>
#include <wx/chartype.h>
#include <wx/defs.h>
#include <wx/gdicmn.h>
#include <wx/listctrl.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
class wxWindow;
//////////////////////////////////////////////////////////////////////////
@@ -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,11 +15,12 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Windows/AtlasDialog.h"
#include "DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h"
class AnimListEditorListCtrl;
class wxCommandEvent;
class wxWindow;
//////////////////////////////////////////////////////////////////////////
@@ -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,23 @@
#include "PropListEditor.h"
#include "EditableListCtrl/FieldEditCtrl.h"
#include "AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h"
#include <cstddef>
#include <vector>
#include <wx/chartype.h>
#include <wx/defs.h>
#include <wx/gdicmn.h>
#include <wx/listctrl.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
class wxWindow;
//////////////////////////////////////////////////////////////////////////
@@ -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,11 +15,12 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Windows/AtlasDialog.h"
#include "DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h"
class PropListEditorListCtrl;
class wxCommandEvent;
class wxWindow;
//////////////////////////////////////////////////////////////////////////
@@ -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
@@ -17,10 +17,24 @@
#include "precompiled.h"
#include "TexListEditor.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/ActorEditor/TexListEditor.h"
#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/EditableListCtrl/FieldEditCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h"
#include "EditableListCtrl/FieldEditCtrl.h"
#include "AtlasObject/AtlasObject.h"
#include <cstddef>
#include <vector>
#include <wx/chartype.h>
#include <wx/defs.h>
#include <wx/gdicmn.h>
#include <wx/listctrl.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
class wxWindow;
//////////////////////////////////////////////////////////////////////////
@@ -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,11 +15,12 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Windows/AtlasDialog.h"
#include "DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/DraggableListCtrl/DraggableListCtrl.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h"
class TexListEditorListCtrl;
class wxCommandEvent;
class wxWindow;
//////////////////////////////////////////////////////////////////////////
@@ -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 "AtlasClipboard.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
// TODO: Do this properly, using the native clipboard. (That probably
// requires AtObj to be serialisable, though... Maybe just use XML?)
@@ -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,7 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AtlasObject/AtlasObject.h"
class AtObj;
class AtlasClipboard
{
@@ -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,13 @@
#include "AtlasWindowCommand.h"
#include "IAtlasSerialiser.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/General/IAtlasSerialiser.h"
#include <wx/cmdproc.h>
#include <wx/log.h>
#include <wx/rtti.h>
#include <wx/translation.h>
IMPLEMENT_ABSTRACT_CLASS(AtlasWindowCommand, wxCommand);
@@ -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,9 +18,16 @@
#ifndef INCLUDED_ATLASWINDOWCOMMAND
#define INCLUDED_ATLASWINDOWCOMMAND
#include "wx/cmdproc.h"
#include "AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include <wx/chartype.h>
#include <wx/cmdproc.h>
#include <wx/defs.h>
#include <wx/object.h>
#include <wx/string.h>
class IAtlasSerialiser;
class wxClassInfo;
class AtlasWindowCommand : public wxCommand
{
@@ -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,9 +19,16 @@
#include "AtlasWindowCommandProc.h"
#include "AtlasWindowCommand.h"
#include "Windows/AtlasWindow.h"
#include "Windows/AtlasDialog.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasDialog.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h"
#include "tools/atlas/AtlasUI/General/AtlasWindowCommand.h"
#include <cstddef>
#include <wx/chartype.h>
#include <wx/cmdproc.h>
#include <wx/debug.h>
#include <wx/object.h>
#include <wx/window.h>
AtlasWindowCommandProc* AtlasWindowCommandProc::GetFromParentFrame(wxWindow* object)
{
@@ -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,9 +19,17 @@
#include "Datafile.h"
#include "wx/file.h"
#include "wx/filename.h"
#include "wx/dir.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include <wx/arrstr.h>
#include <wx/chartype.h>
#include <wx/debug.h>
#include <wx/dir.h>
#include <wx/file.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/string.h>
#include <wx/translation.h>
static wxString g_DataDir;
@@ -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,12 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include <string>
class wxArrayString;
class wxString;
namespace Datafile
{
@@ -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 "Observable.h"
#include <algorithm>
void ObservableScopedConnections::Add(const ObservableConnection& conn)
{
// Clean up any disconnected connections that might be left in here
@@ -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
@@ -40,6 +40,10 @@ variable_to_be_watched.NotifyObservers();
*/
#include <boost/signals2.hpp>
#include <cstddef>
#include <functional>
#include <vector>
typedef boost::signals2::connection ObservableConnection;
typedef boost::signals2::scoped_connection ObservableScopedConnection;
@@ -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,23 +19,35 @@
#include "DLLInterface.h"
#include "General/AtlasEventLoop.h"
#include "tools/atlas/AtlasUI/ActorEditor/ActorEditor.h"
#include "tools/atlas/AtlasUI/CustomControls/Windows/AtlasWindow.h"
#include "tools/atlas/AtlasUI/General/Datafile.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h"
#include "tools/atlas/GameInterface/MessagePasser.h"
#include "tools/atlas/GameInterface/SharedMemory.h"
#include "General/Datafile.h"
#include "ActorEditor/ActorEditor.h"
#include "ScenarioEditor/ScenarioEditor.h"
#include "GameInterface/MessagePasser.h"
#include "wx/config.h"
#include "wx/debugrpt.h"
#include "wx/file.h"
// wx and libxml both want to define ATTRIBUTE_PRINTF (with similar
// meanings), so undef it to avoid a warning
#undef ATTRIBUTE_PRINTF
#include <libxml/parser.h>
#include <cstdio>
#include <cstdlib>
#include <libxml/xmlversion.h>
#include <wx/app.h>
#include <wx/chartype.h>
#include <wx/cmdargs.h>
#include <wx/config.h>
#include <wx/debug.h>
#include <wx/defs.h>
#include <wx/file.h>
#include <wx/fileconf.h>
#include <wx/filename.h>
#include <wx/frame.h>
#include <wx/init.h>
#include <wx/log.h>
#include <wx/object.h>
#include <wx/setup.h>
#include <wx/string.h>
#include <wx/translation.h>
#include <wx/unichar.h>
#include <wx/utils.h>
#include <wx/wxcrt.h>
#ifndef LIBXML_THREAD_ENABLED
#error libxml2 must have threading support enabled
+10 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2017 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,10 +18,18 @@
#ifndef DLLINTERFACE_INCLUDED
#define DLLINTERFACE_INCLUDED
#include <wchar.h>
#include <cstddef>
namespace AtlasMessage { class MessagePasser; }
#ifdef _WIN32
# define ATLASDLLIMPEXP extern "C" __declspec(dllexport)
#elif defined(__GNUC__)
# define ATLASDLLIMPEXP extern "C" __attribute__ ((visibility ("default")))
#else
# define ATLASDLLIMPEXP extern "C"
#endif
ATLASDLLIMPEXP void Atlas_SetMessagePasser(AtlasMessage::MessagePasser*);
ATLASDLLIMPEXP void Atlas_SetDataDirectory(const wchar_t* path);
ATLASDLLIMPEXP void Atlas_StartWindow(const wchar_t* type);
+3 -3
View File
@@ -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,8 +19,8 @@
#include "KeyMap.h"
#include "SDL_version.h"
#include "SDL_keycode.h"
#include <SDL_keycode.h>
#include <wx/defs.h>
int GetSDLKeyFromWxKeyCode(int wxkey)
{
@@ -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
@@ -108,14 +108,6 @@
#endif // HAVE_PCH
#ifdef _WIN32
# define ATLASDLLIMPEXP extern "C" __declspec(dllexport)
#elif defined(__GNUC__)
# define ATLASDLLIMPEXP extern "C" __attribute__ ((visibility ("default")))
#else
# define ATLASDLLIMPEXP extern "C"
#endif
// wxWidgets 3.0 or later required
#if !wxCHECK_VERSION(3, 0, 0)
# error You are using an old wxWidgets release. At least wxWidgets >= 3.0.0 is required.
@@ -1,4 +1,4 @@
/* Copyright (C) 2024 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 "ScenarioEditor.h"
#include "tools/atlas/AtlasUI/Misc/DLLInterface.h"
#include "wx/busyinfo.h"
#include "wx/clipbrd.h"
#include "wx/config.h"
@@ -1,4 +1,4 @@
/* Copyright (C) 2017 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,27 @@
#include "Cinema.h"
#include "GameInterface/Messages.h"
#include "ScenarioEditor/ScenarioEditor.h"
#include "CustomControls/ColorDialog/ColorDialog.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h"
#include "tools/atlas/GameInterface/Messages.h"
#include "tools/atlas/GameInterface/Shareable.h"
#include "tools/atlas/GameInterface/SharedTypes.h"
#include <cstddef>
#include <string>
#include <vector>
#include <wx/button.h>
#include <wx/chartype.h>
#include <wx/checkbox.h>
#include <wx/listbox.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
#include <wx/window.h>
using AtlasMessage::Shareable;
@@ -1,4 +1,4 @@
/* Copyright (C) 2017 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 <http://www.gnu.org/licenses/>.
*/
#include "../Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include <wx/defs.h>
#include <wx/event.h>
class ScenarioEditor;
class wxCheckBox;
class wxListBox;
class wxScrolledWindow;
class wxTextCtrl;
class wxWindow;
class CinemaSidebar : public Sidebar
{
@@ -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,11 @@
#include "Sidebar.h"
#include <cstddef>
#include <wx/defs.h>
#include <wx/sizer.h>
#include <wx/window.h>
Sidebar::Sidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* WXUNUSED(bottomBarContainer))
: wxPanel(sidebarContainer), m_ScenarioEditor(scenarioEditor), m_BottomBar(NULL), m_AlreadyDisplayed(false)
{
@@ -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,7 +18,11 @@
#ifndef INCLUDED_SIDEBAR
#define INCLUDED_SIDEBAR
#include <wx/panel.h>
class ScenarioEditor;
class wxSizer;
class wxWindow;
class Sidebar : public wxPanel
{
@@ -1,4 +1,4 @@
/* Copyright (C) 2022 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,38 @@
#include "precompiled.h"
#include "Environment.h"
#include "LightControl.h"
#include "GameInterface/Messages.h"
#include "ScenarioEditor/ScenarioEditor.h"
#include "General/Observable.h"
#include "CustomControls/ColorDialog/ColorDialog.h"
#include "tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/LightControl.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h"
#include "tools/atlas/GameInterface/Messages.h"
#include "tools/atlas/GameInterface/Shareable.h"
#include "tools/atlas/GameInterface/SharedTypes.h"
#include <cmath>
#include <cstddef>
#include <list>
#include <string>
#include <vector>
#include <wx/arrstr.h>
#include <wx/button.h>
#include <wx/chartype.h>
#include <wx/colour.h>
#include <wx/colourdata.h>
#include <wx/combobox.h>
#include <wx/gdicmn.h>
#include <wx/panel.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/slider.h>
#include <wx/string.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
class wxWindow;
using AtlasMessage::Shareable;
@@ -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
@@ -15,11 +15,15 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../Common/Sidebar.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include "General/Observable.h"
#include <wx/defs.h>
#include <wx/event.h>
class ScenarioEditor;
class VariableListBox;
class wxWindow;
class EnvironmentSidebar : public Sidebar
{
@@ -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
@@ -17,10 +17,27 @@
#include "precompiled.h"
#include <algorithm>
#include "LightControl.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include "tools/atlas/GameInterface/Messages.h"
#include "tools/atlas/GameInterface/Shareable.h"
#include <algorithm>
#include <cmath>
#include <list>
#include <wx/bitmap.h>
#include <wx/control.h>
#include <wx/dcclient.h>
#include <wx/defs.h>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/image.h>
#include <wx/sizer.h>
#include <wx/toolbar.h>
class wxWindow;
using AtlasMessage::Shareable;
class LightSphere : public wxControl
@@ -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,11 +18,14 @@
#ifndef INCLUDED_LIGHTCONTROL
#define INCLUDED_LIGHTCONTROL
#include "GameInterface/Messages.h"
#include "GameInterface/Shareable.h"
#include "General/Observable.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include <wx/panel.h>
class LightSphere;
class wxSize;
class wxWindow;
namespace AtlasMessage { struct sEnvironmentSettings; }
class LightControl : public wxPanel
{
@@ -19,20 +19,50 @@
#include "Map.h"
#include "AtlasObject/AtlasObject.h"
#include "AtlasObject/JSONSpiritInclude.h"
#include "GameInterface/Messages.h"
#include "MapResizeDialog/MapResizeDialog.h"
#include "ScenarioEditor/ScenarioEditor.h"
#include "ScenarioEditor/Tools/Common/Tools.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/CustomControls/MapResizeDialog/MapResizeDialog.h"
#include "tools/atlas/AtlasUI/General/AtlasWindowCommandProc.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h"
#include "tools/atlas/GameInterface/MessagePasser.h"
#include "tools/atlas/GameInterface/Messages.h"
#include "tools/atlas/GameInterface/Shareable.h"
#include <algorithm>
#include <cstdint>
#include <ctime>
#include <list>
#include <map>
#include <random>
#include <set>
#include <string>
#include <wx/busyinfo.h>
#include <wx/filename.h>
#include <utility>
#include <vector>
#include <wx/busyinfo.h>
#include <wx/button.h>
#include <wx/chartype.h>
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/clntdata.h>
#include <wx/collpane.h>
#include <wx/debug.h>
#include <wx/gdicmn.h>
#include <wx/log.h>
#include <wx/object.h>
#include <wx/panel.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
#include <wx/utils.h>
#include <wx/valtext.h>
#include <wx/window.h>
#include <wx/wxcrt.h>
#define CREATE_CHECKBOX(window, parentSizer, name, description, ID) \
parentSizer->Add(new wxStaticText(window, wxID_ANY, _(name)), wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT)); \
@@ -1,4 +1,4 @@
/* Copyright (C) 2024 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,11 +15,15 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include <wx/collpane.h>
#include <wx/defs.h>
#include <wx/event.h>
class MapSettingsControl;
class ScenarioEditor;
class wxCollapsiblePaneEvent;
class wxWindow;
class MapSidebar : public Sidebar
{
@@ -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,17 +19,49 @@
#include "Object.h"
#include "Buttons/ToolButton.h"
#include "General/Datafile.h"
#include "ScenarioEditor/ScenarioEditor.h"
#include "ScenarioEditor/Tools/Common/ObjectSettings.h"
#include "ScenarioEditor/Tools/Common/MiscState.h"
#include "VariationControl.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/General/Datafile.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/VariationControl.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h"
#include "tools/atlas/GameInterface/MessagePasser.h"
#include "tools/atlas/GameInterface/Messages.h"
#include "tools/atlas/GameInterface/Shareable.h"
#include "tools/atlas/GameInterface/SharedTypes.h"
#include "GameInterface/Messages.h"
#include "wx/busyinfo.h"
#include "wx/wxcrt.h"
#include <algorithm>
#include <cstddef>
#include <list>
#include <string>
#include <vector>
#include <wx/arrstr.h>
#include <wx/busyinfo.h>
#include <wx/button.h>
#include <wx/chartype.h>
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/clntdata.h>
#include <wx/combobox.h>
#include <wx/control.h>
#include <wx/gdicmn.h>
#include <wx/listbox.h>
#include <wx/object.h>
#include <wx/panel.h>
#include <wx/rtti.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
#include <wx/unichar.h>
#include <wx/window.h>
#include <wx/wxcrt.h>
enum
{
@@ -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,11 +15,16 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include <wx/defs.h>
#include <wx/event.h>
class ITool;
class ScenarioEditor;
class wxWindow;
struct ObjectSidebarImpl;
class ObjectSidebar : public Sidebar
{
public:
@@ -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,7 +19,25 @@
#include "VariationControl.h"
#include "ScenarioEditor/Tools/Common/ObjectSettings.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include <cstddef>
#include <list>
#include <set>
#include <wx/arrstr.h>
#include <wx/combobox.h>
#include <wx/debug.h>
#include <wx/defs.h>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/object.h>
#include <wx/sizer.h>
#include <wx/string.h>
#include <wx/toolbar.h>
#include <wx/types.h>
class wxWindow;
VariationControl::VariationControl(wxWindow* parent, Observable<ObjectSettings>& objectSettings)
: wxScrolledWindow(parent, -1),
@@ -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,9 +18,16 @@
#ifndef INCLUDED_VARIATIONCONTROL
#define INCLUDED_VARIATIONCONTROL
#include "General/Observable.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include <vector>
#include <wx/scrolwin.h>
class ObjectSettings;
class wxComboBox;
class wxCommandEvent;
class wxSizer;
class wxWindow;
class VariationControl : public wxScrolledWindow
{
@@ -1,4 +1,4 @@
/* Copyright (C) 2022 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,46 @@
#include "Player.h"
#include "AtlasObject/AtlasObject.h"
#include "CustomControls/ColorDialog/ColorDialog.h"
#include "ScenarioEditor/ScenarioEditor.h"
#include "tools/atlas/AtlasObject/AtlasObject.h"
#include "tools/atlas/AtlasUI/CustomControls/ColorDialog/ColorDialog.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h"
#include "tools/atlas/GameInterface/MessagePasser.h"
#include "tools/atlas/GameInterface/Messages.h"
#include "tools/atlas/GameInterface/Shareable.h"
#include "tools/atlas/GameInterface/SharedTypes.h"
#include "wx/choicebk.h"
#include <climits>
#include <list>
#include <string>
#include <vector>
#include <wx/arrstr.h>
#include <wx/bookctrl.h>
#include <wx/button.h>
#include <wx/chartype.h>
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/choicebk.h>
#include <wx/clntdata.h>
#include <wx/collpane.h>
#include <wx/colour.h>
#include <wx/colourdata.h>
#include <wx/debug.h>
#include <wx/gdicmn.h>
#include <wx/msgdlg.h>
#include <wx/object.h>
#include <wx/panel.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/spinbutt.h>
#include <wx/spinctrl.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
#include <wx/window.h>
enum
{
@@ -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,17 +15,26 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include "tools/atlas/GameInterface/SharedMemory.h"
#include "GameInterface/Messages.h"
#include "wx/collpane.h"
#include "wx/spinctrl.h"
using namespace AtlasMessage;
#include <cstdlib>
#include <wx/defs.h>
#include <wx/dynarray.h>
#include <wx/event.h>
#include <wx/string.h>
class PlayerNotebookPage;
class PlayerSettingsControl;
class ScenarioEditor;
class wxButton;
class wxChoice;
class wxCollapsiblePaneEvent;
class wxSpinCtrl;
class wxTextCtrl;
class wxWindow;
using namespace AtlasMessage;
class PlayerSidebar : public Sidebar
{
@@ -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,21 +19,52 @@
#include "Terrain.h"
#include "Buttons/ToolButton.h"
#include "ScenarioEditor/ScenarioEditor.h"
#include "ScenarioEditor/Tools/Common/Brushes.h"
#include "ScenarioEditor/Tools/Common/MiscState.h"
#include "GameInterface/Messages.h"
#include "tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.h"
#include "tools/atlas/AtlasUI/General/Observable.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Brushes.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/MiscState.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h"
#include "tools/atlas/GameInterface/MessagePasser.h"
#include "tools/atlas/GameInterface/Messages.h"
#include "tools/atlas/GameInterface/Shareable.h"
#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <cstring>
#include <list>
#include <string>
#include <unordered_map>
#include <wx/spinctrl.h>
#include <wx/listctrl.h>
#include <wx/image.h>
#include <wx/imaglist.h>
#include <utility>
#include <vector>
#include <wx/arrstr.h>
#include <wx/bitmap.h>
#include <wx/bookctrl.h>
#include <wx/busyinfo.h>
#include <wx/button.h>
#include <wx/chartype.h>
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/clntdata.h>
#include <wx/colour.h>
#include <wx/gdicmn.h>
#include <wx/image.h>
#include <wx/notebook.h>
#include <wx/object.h>
#include <wx/panel.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/statbmp.h>
#include <wx/stattext.h>
#include <wx/string.h>
#include <wx/timer.h>
#include <wx/toolbar.h>
#include <wx/translation.h>
#include <wx/unichar.h>
#include <wx/window.h>
#include <wx/wxcrt.h>
namespace
{
@@ -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
@@ -15,9 +15,15 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../Common/Sidebar.h"
#include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h"
#include <wx/defs.h>
#include <wx/event.h>
class ScenarioEditor;
class TexturePreviewPanel;
class wxChoice;
class wxWindow;
class TerrainSidebar : public Sidebar
{