#pragma once #include "State/EditorSession.h" #include #include #include namespace XCEngine::UI::Editor::App { class EditorHostCommandBridge : public UIEditorHostCommandHandler { public: void BindSession(EditorSession& session); void SetExitRequestHandler(std::function handler); UIEditorHostCommandEvaluationResult EvaluateHostCommand( std::string_view commandId) const override; UIEditorHostCommandDispatchResult DispatchHostCommand( std::string_view commandId) override; private: UIEditorHostCommandEvaluationResult BuildDisabledResult( std::string_view message) const; UIEditorHostCommandEvaluationResult EvaluateEditCommand( std::string_view commandId) const; UIEditorHostCommandDispatchResult DispatchEditCommand( std::string_view commandId); bool SupportsHierarchyEditCommands(std::string_view commandId) const; bool SupportsProjectEditCommands(std::string_view commandId) const; EditorSession* m_session = nullptr; std::function m_requestExit = {}; }; } // namespace XCEngine::UI::Editor::App