diff --git a/CHANGES.md b/CHANGES.md index 117244f..df07741 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ Change History Version: 1.20 (2020/06) Transition to IWYU and maintenence: - Replaced includes of monolithic headers. +- Removed dependency on core, engine and ImGui module headers includes in the PCH. Version: 1.19 (2020/03-06) - Integrated fix for issue with ImGui popup/modal windows not being able to be closed in transparent mouse input mode. diff --git a/Source/ImGui/Private/Editor/ImGuiEditor.cpp b/Source/ImGui/Private/Editor/ImGuiEditor.cpp index b8c2afb..d2a2486 100644 --- a/Source/ImGui/Private/Editor/ImGuiEditor.cpp +++ b/Source/ImGui/Private/Editor/ImGuiEditor.cpp @@ -11,6 +11,7 @@ #include "ImGuiModuleSettings.h" #include +#include #define LOCTEXT_NAMESPACE "ImGuiEditor" diff --git a/Source/ImGui/Private/Editor/ImGuiEditor.h b/Source/ImGui/Private/Editor/ImGuiEditor.h index b7350b6..9371d38 100644 --- a/Source/ImGui/Private/Editor/ImGuiEditor.h +++ b/Source/ImGui/Private/Editor/ImGuiEditor.h @@ -4,6 +4,9 @@ #if WITH_EDITOR +#include + + // Registers module's settings in editor (due to a small size of this code we don't use a separate editor module). class FImGuiEditor { diff --git a/Source/ImGui/Private/ImGuiContextProxy.cpp b/Source/ImGui/Private/ImGuiContextProxy.cpp index ee3c978..d52f80a 100644 --- a/Source/ImGui/Private/ImGuiContextProxy.cpp +++ b/Source/ImGui/Private/ImGuiContextProxy.cpp @@ -9,7 +9,8 @@ #include "ImGuiInteroperability.h" #include "Utilities/Arrays.h" -#include +#include +#include static constexpr float DEFAULT_CANVAS_WIDTH = 3840.f; diff --git a/Source/ImGui/Private/ImGuiDelegates.cpp b/Source/ImGui/Private/ImGuiDelegates.cpp index 7ac36bd..416e037 100644 --- a/Source/ImGui/Private/ImGuiDelegates.cpp +++ b/Source/ImGui/Private/ImGuiDelegates.cpp @@ -5,6 +5,8 @@ #include "ImGuiDelegates.h" #include "ImGuiDelegatesContainer.h" +#include + FSimpleMulticastDelegate& FImGuiDelegates::OnWorldEarlyDebug() { diff --git a/Source/ImGui/Private/ImGuiDemo.cpp b/Source/ImGui/Private/ImGuiDemo.cpp index 4be5f20..ced4175 100644 --- a/Source/ImGui/Private/ImGuiDemo.cpp +++ b/Source/ImGui/Private/ImGuiDemo.cpp @@ -3,9 +3,10 @@ #include "ImGuiPrivatePCH.h" #include "ImGuiDemo.h" - #include "ImGuiModuleProperties.h" +#include + // Demo copied (with minor modifications) from ImGui examples. See https://github.com/ocornut/imgui. void FImGuiDemo::DrawControls(int32 ContextIndex) diff --git a/Source/ImGui/Private/ImGuiImplementation.cpp b/Source/ImGui/Private/ImGuiImplementation.cpp index caf7863..78a72c1 100644 --- a/Source/ImGui/Private/ImGuiImplementation.cpp +++ b/Source/ImGui/Private/ImGuiImplementation.cpp @@ -15,7 +15,13 @@ #define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS #endif // PLATFORM_XBOXONE +#if PLATFORM_WINDOWS +#include +#endif // PLATFORM_WINDOWS + #if WITH_EDITOR +#include "imgui.h" + // Global ImGui context pointer. ImGuiContext* GImGuiContextPtr = nullptr; // Handle to the global ImGui context pointer. @@ -24,10 +30,6 @@ ImGuiContext** GImGuiContextPtrHandle = &GImGuiContextPtr; #define GImGui (*GImGuiContextPtrHandle) #endif // WITH_EDITOR -#if PLATFORM_WINDOWS -#include -#endif // PLATFORM_WINDOWS - #include "imgui.cpp" #include "imgui_demo.cpp" #include "imgui_draw.cpp" diff --git a/Source/ImGui/Private/ImGuiInputHandler.cpp b/Source/ImGui/Private/ImGuiInputHandler.cpp index 0d00380..84d55f6 100644 --- a/Source/ImGui/Private/ImGuiInputHandler.cpp +++ b/Source/ImGui/Private/ImGuiInputHandler.cpp @@ -10,6 +10,7 @@ #include "ImGuiModuleSettings.h" #include +#include #include #include diff --git a/Source/ImGui/Private/ImGuiInputHandlerFactory.cpp b/Source/ImGui/Private/ImGuiInputHandlerFactory.cpp index 211e404..d875409 100644 --- a/Source/ImGui/Private/ImGuiInputHandlerFactory.cpp +++ b/Source/ImGui/Private/ImGuiInputHandlerFactory.cpp @@ -3,9 +3,10 @@ #include "ImGuiPrivatePCH.h" #include "ImGuiInputHandlerFactory.h" - #include "ImGuiInputHandler.h" +#include + UImGuiInputHandler* FImGuiInputHandlerFactory::NewHandler(const FStringClassReference& HandlerClassReference, FImGuiModuleManager* ModuleManager, UGameViewportClient* GameViewport, int32 ContextIndex) { diff --git a/Source/ImGui/Private/ImGuiInputHandlerFactory.h b/Source/ImGui/Private/ImGuiInputHandlerFactory.h index 3ed9365..c1a3e09 100644 --- a/Source/ImGui/Private/ImGuiInputHandlerFactory.h +++ b/Source/ImGui/Private/ImGuiInputHandlerFactory.h @@ -2,6 +2,9 @@ #pragma once +#include "ImGuiModuleSettings.h" + + class FImGuiModuleManager; class UGameViewportClient; class UImGuiInputHandler; diff --git a/Source/ImGui/Private/ImGuiInteroperability.h b/Source/ImGui/Private/ImGuiInteroperability.h index d515ce5..67918ae 100644 --- a/Source/ImGui/Private/ImGuiInteroperability.h +++ b/Source/ImGui/Private/ImGuiInteroperability.h @@ -5,6 +5,7 @@ #include "TextureManager.h" #include +#include #include diff --git a/Source/ImGui/Private/ImGuiModule.cpp b/Source/ImGui/Private/ImGuiModule.cpp index 6711161..401d950 100644 --- a/Source/ImGui/Private/ImGuiModule.cpp +++ b/Source/ImGui/Private/ImGuiModule.cpp @@ -2,10 +2,10 @@ #include "ImGuiPrivatePCH.h" -#include "ImGuiModuleManager.h" +#include "ImGuiModule.h" #include "ImGuiDelegatesContainer.h" -#include "ImGuiTextureHandle.h" +#include "ImGuiModuleManager.h" #include "TextureManager.h" #include "Utilities/WorldContext.h" #include "Utilities/WorldContextIndex.h" diff --git a/Source/ImGui/Private/ImGuiModuleCommands.cpp b/Source/ImGui/Private/ImGuiModuleCommands.cpp index 42f5148..da621f8 100644 --- a/Source/ImGui/Private/ImGuiModuleCommands.cpp +++ b/Source/ImGui/Private/ImGuiModuleCommands.cpp @@ -3,6 +3,7 @@ #include "ImGuiPrivatePCH.h" #include "ImGuiModuleCommands.h" +#include "ImGuiModuleProperties.h" #include "Utilities/DebugExecBindings.h" diff --git a/Source/ImGui/Private/ImGuiModuleManager.cpp b/Source/ImGui/Private/ImGuiModuleManager.cpp index f58e239..50a01ef 100644 --- a/Source/ImGui/Private/ImGuiModuleManager.cpp +++ b/Source/ImGui/Private/ImGuiModuleManager.cpp @@ -7,6 +7,7 @@ #include "ImGuiInteroperability.h" #include "Utilities/WorldContextIndex.h" +#include #include #include diff --git a/Source/ImGui/Private/ImGuiModuleSettings.cpp b/Source/ImGui/Private/ImGuiModuleSettings.cpp index c8e9d18..c88f52b 100644 --- a/Source/ImGui/Private/ImGuiModuleSettings.cpp +++ b/Source/ImGui/Private/ImGuiModuleSettings.cpp @@ -7,6 +7,8 @@ #include "ImGuiModuleCommands.h" #include "ImGuiModuleProperties.h" +#include +#include #include diff --git a/Source/ImGui/Private/ImGuiModuleSettings.h b/Source/ImGui/Private/ImGuiModuleSettings.h index 0a5626f..5af74dd 100644 --- a/Source/ImGui/Private/ImGuiModuleSettings.h +++ b/Source/ImGui/Private/ImGuiModuleSettings.h @@ -2,11 +2,21 @@ #pragma once +#include "VersionCompatibility.h" + #include #include #include #include +// We use FStringClassReference, which is supported by older and newer engine versions. Starting from 4.18, it is +// a typedef of FSoftClassPath, which is also recognized by UHT. +#if ENGINE_COMPATIBILITY_LEGACY_STRING_CLASS_REF +#include +#else +#include +#endif + #include "ImGuiModuleSettings.generated.h" diff --git a/Source/ImGui/Private/ImGuiPrivatePCH.h b/Source/ImGui/Private/ImGuiPrivatePCH.h index c22f298..e45b61b 100644 --- a/Source/ImGui/Private/ImGuiPrivatePCH.h +++ b/Source/ImGui/Private/ImGuiPrivatePCH.h @@ -11,13 +11,5 @@ #include #include -// For backward compatibility we will use FStringClassReference which in newer engine versions is a typedef for -// FSoftClassPath. Include right soft class reference header to avoid warnings in newer engine version. -#if ENGINE_COMPATIBILITY_LEGACY_STRING_CLASS_REF -#include -#else -#include -#endif - // You should place include statements to your module's private header files here. You only need to // add includes for headers that are used in most of your module's source files though. diff --git a/Source/ImGui/Private/TextureManager.cpp b/Source/ImGui/Private/TextureManager.cpp index dee91cb..566393e 100644 --- a/Source/ImGui/Private/TextureManager.cpp +++ b/Source/ImGui/Private/TextureManager.cpp @@ -4,6 +4,9 @@ #include "TextureManager.h" +#include +#include + #include diff --git a/Source/ImGui/Private/TextureManager.h b/Source/ImGui/Private/TextureManager.h index 4c181eb..54935bd 100644 --- a/Source/ImGui/Private/TextureManager.h +++ b/Source/ImGui/Private/TextureManager.h @@ -6,6 +6,8 @@ #include +class UTexture2D; + // Index type to be used as a texture handle. using TextureIndex = int32; diff --git a/Source/ImGui/Private/Widgets/SImGuiCanvasControl.cpp b/Source/ImGui/Private/Widgets/SImGuiCanvasControl.cpp index 0778c97..e8a7939 100644 --- a/Source/ImGui/Private/Widgets/SImGuiCanvasControl.cpp +++ b/Source/ImGui/Private/Widgets/SImGuiCanvasControl.cpp @@ -4,6 +4,7 @@ #include "SImGuiCanvasControl.h" +#include #include diff --git a/Source/ImGui/Private/Widgets/SImGuiWidget.cpp b/Source/ImGui/Private/Widgets/SImGuiWidget.cpp index 689fcef..ba9c257 100644 --- a/Source/ImGui/Private/Widgets/SImGuiWidget.cpp +++ b/Source/ImGui/Private/Widgets/SImGuiWidget.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/Source/ImGui/Private/Widgets/SImGuiWidget.h b/Source/ImGui/Private/Widgets/SImGuiWidget.h index 95e87ad..52cb7dc 100644 --- a/Source/ImGui/Private/Widgets/SImGuiWidget.h +++ b/Source/ImGui/Private/Widgets/SImGuiWidget.h @@ -5,6 +5,7 @@ #include "ImGuiModuleDebug.h" #include "ImGuiModuleSettings.h" +#include #include #include @@ -16,6 +17,9 @@ class FImGuiModuleManager; class SImGuiCanvasControl; class UImGuiInputHandler; +class UGameViewportClient; +class ULocalPlayer; + // Slate widget for rendering ImGui output and storing Slate inputs. class SImGuiWidget : public SCompoundWidget { diff --git a/Source/ImGui/Public/ImGuiInputHandler.h b/Source/ImGui/Public/ImGuiInputHandler.h index 37427e0..093ea63 100644 --- a/Source/ImGui/Public/ImGuiInputHandler.h +++ b/Source/ImGui/Public/ImGuiInputHandler.h @@ -3,6 +3,7 @@ #pragma once #include +#include #include #include