Fix headers for gui/ObjectBases

Make include-what-you-use happy with files in source/gui/ObjectBases and
fix what needs to be fixed after.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser 2025-06-20 00:06:41 +02:00
parent 571b536e1f
commit d888b10931
No known key found for this signature in database
11 changed files with 79 additions and 41 deletions

View file

@ -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
@ -22,6 +22,8 @@
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/ObjectBases/IGUIPanel.h"
#include "lib/allocators/DynamicArena.h"
#include "lib/allocators/STLAllocators.h"
namespace
{

View file

@ -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
@ -21,7 +21,7 @@
#include "gui/CGUISprite.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/SGUIMessage.h"
const CStr IGUIButtonBehavior::EventNamePress = "Press";
const CStr IGUIButtonBehavior::EventNamePressRight = "PressRight";

View file

@ -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
@ -26,10 +26,13 @@
#ifndef INCLUDED_IGUIBUTTONBEHAVIOR
#define INCLUDED_IGUIBUTTONBEHAVIOR
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/CGUISetting.h"
#include "lib/code_annotation.h"
#include "ps/CStr.h"
class CGUISpriteInstance;
class IGUIObject;
struct SGUIMessage;
/**
* Appends button behaviours to the IGUIObject.

View file

@ -21,22 +21,40 @@
#include "gui/CGUI.h"
#include "gui/CGUISetting.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/SGUIStyle.h"
#include "gui/Scripting/JSInterface_GUIProxy.h"
#include "js/Conversions.h"
#include "lib/debug.h"
#include "lib/secure_crt.h"
#include "maths/Vector2D.h"
#include "ps/CLogger.h"
#include "ps/Profile.h"
#include "ps/Profiler2.h"
#include "scriptinterface/Object.h"
#include "scriptinterface/ScriptContext.h"
#include "scriptinterface/ScriptExtraHeaders.h"
#include "scriptinterface/ScriptConversions.h"
#include "scriptinterface/ScriptExceptions.h"
#include "scriptinterface/ScriptRequest.h"
#include "soundmanager/ISoundManager.h"
#include <algorithm>
#include <iterator>
#include <js/CallAndConstruct.h>
#include <js/ComparisonOperators.h>
#include <js/CompilationAndEvaluation.h>
#include <js/CompileOptions.h>
#include <js/GCAPI.h>
#include <js/GCVector.h>
#include <js/SourceText.h>
#include <js/TracingAPI.h>
#include <js/Value.h>
#include <jsapi.h>
#include <string>
#include <string_view>
#include <tuple>
#include <unordered_map>
#include <utility>
class JSObject;
namespace mozilla { union Utf8Unit; }
const CStr IGUIObject::EventNameMouseEnter = "MouseEnter";
const CStr IGUIObject::EventNameMouseMove = "MouseMove";
const CStr IGUIObject::EventNameMouseLeave = "MouseLeave";

View file

@ -26,29 +26,28 @@
#define INCLUDED_IGUIOBJECT
#include "gui/CGUISetting.h"
#include "gui/SGUIMessage.h"
#include "gui/SettingTypes/CGUIHotkey.h"
#include "gui/SettingTypes/CGUISize.h"
#include "gui/SGUIMessage.h"
#include "lib/allocators/DynamicArena.h"
#include "lib/allocators/STLAllocators.h"
#include "lib/input.h" // just for IN_PASS
#include "lib/code_annotation.h"
#include "lib/input.h"
#include "maths/Rect.h"
#include "ps/CStr.h"
#include "ps/XML/Xeromyces.h"
#include "scriptinterface/ScriptTypes.h"
#include "ps/XMB/XMBData.h"
#include <js/RootingAPI.h>
#include <js/TypeDecls.h>
#include <js/ValueArray.h>
#include <map>
#include <memory>
#include <vector>
class CCanvas2D;
class CGUI;
class CGUISize;
class CGUIObjectEventBroadcaster;
class IGUIObject;
class IGUIProxyObject;
class IGUISetting;
template <typename T>
class JSI_GUIProxy;
class JSObject;
class JSTracer;
struct SDL_Event_;
#define GUI_OBJECT(obj) \
public: \

View file

@ -20,6 +20,12 @@
#include "IGUIPanel.h"
#include "gui/CGUI.h"
#include "gui/CGUISetting.h"
#include "ps/CStr.h"
#include <map>
#include <string>
#include <vector>
IGUIPanel::IGUIPanel(CGUI& pGUI)
: IGUIObject(pGUI)

View file

@ -1,4 +1,4 @@
/* Copyright (C) 20244 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,9 @@
#define INCLUDED_IPANEL
#include "gui/ObjectBases/IGUIObject.h"
#include "maths/Rect.h"
class CGUI;
class IGUIPanel : public IGUIObject
{

View file

@ -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
@ -23,6 +23,8 @@
#include "gui/IGUIScrollBar.h"
#include "gui/ObjectBases/IGUIObject.h"
#include <utility>
IGUIScrollBarOwner::IGUIScrollBarOwner(IGUIObject& pObject)
: m_pObject(pObject)
{

View file

@ -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,16 +18,17 @@
#ifndef INCLUDED_IGUISCROLLBAROWNER
#define INCLUDED_IGUISCROLLBAROWNER
#include "ps/CStrForward.h"
#include "lib/code_annotation.h"
#include "ps/CStr.h"
#include <memory>
#include <vector>
class CCanvas2D;
class IGUIObject;
class IGUIScrollBar;
struct SGUIMessage;
struct SGUIScrollBarStyle;
class IGUIScrollBar;
class IGUIObject;
/**
* Base-class this if you want an object to contain

View file

@ -19,13 +19,15 @@
#include "IGUITextOwner.h"
#include "gui/CGUI.h"
#include "gui/SGUIMessage.h"
#include "gui/CGUIText.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/SettingTypes/CGUIString.h"
#include "gui/SGUIMessage.h"
#include "gui/SettingTypes/EAlign.h"
#include "lib/debug.h"
#include "maths/Size2D.h"
#include "maths/Vector2D.h"
#include <math.h>
#include <string>
IGUITextOwner::IGUITextOwner(IGUIObject& pObject)
: m_pObject(pObject),

View file

@ -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
@ -31,20 +31,22 @@ GUI Object Base - Text Owner
#define INCLUDED_IGUITEXTOWNER
#include "gui/CGUISetting.h"
#include "gui/SettingTypes/EAlign.h"
#include "lib/code_annotation.h"
#include "maths/Rect.h"
#include "ps/CStrForward.h"
#include "ps/CStr.h"
#include <cstddef>
#include <vector>
class CCanvas2D;
class CGUIString;
class CGUIText;
class CVector2D;
class IGUIObject;
enum class EAlign;
enum class EVAlign;
struct CGUIColor;
struct SGUIMessage;
class CGUIText;
class CGUIString;
class IGUIObject;
class CVector2D;
/**
* Framework for handling Output text.