#pragma once #include "Platform/Win32/EditorWindowContentController.h" #include #include #include namespace XCEngine::UI::Editor::App { struct EditorStandaloneUtilityWindowFrameContext { EditorContext& editorContext; const ::XCEngine::UI::UIRect& bounds; const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents; bool focused = false; bool focusGained = false; bool focusLost = false; }; class EditorStandaloneUtilityWindowContentController : public EditorWindowContentController { public: explicit EditorStandaloneUtilityWindowContentController( const ::XCEngine::UI::UISize& minimumOuterSize); ~EditorStandaloneUtilityWindowContentController() override; void ReplaceWorkspaceController(UIEditorWorkspaceController workspaceController) override; void Shutdown() override; void ResetInteractionState() override; EditorWindowFrameTransferRequests UpdateAndAppend( const EditorWindowContentFrameContext& context, ::XCEngine::UI::UIDrawData& drawData) override; const UIEditorShellInteractionFrame& GetShellFrame() const override; const UIEditorShellInteractionState& GetShellInteractionState() const override; ::XCEngine::UI::UISize ResolveMinimumOuterSize() const override; protected: virtual void OnShutdown(); virtual void OnResetInteractionState(); virtual EditorWindowFrameTransferRequests UpdateStandaloneContent( const EditorStandaloneUtilityWindowFrameContext& context, ::XCEngine::UI::UIDrawData& drawData) = 0; private: ::XCEngine::UI::UISize m_minimumOuterSize = {}; UIEditorShellInteractionState m_shellInteractionState = {}; UIEditorShellInteractionFrame m_shellFrame = {}; bool m_windowFocused = true; }; } // namespace XCEngine::UI::Editor::App