76 lines
2.8 KiB
C++
76 lines
2.8 KiB
C++
#pragma once
|
|
|
|
#include "Core/ProductEditorContext.h"
|
|
#include "Panels/ProductConsolePanel.h"
|
|
#include "Icons/ProductBuiltInIcons.h"
|
|
#include "Panels/ProductHierarchyPanel.h"
|
|
#include "Panels/ProductInspectorPanel.h"
|
|
#include "Panels/ProductProjectPanel.h"
|
|
#include "Viewport/ProductViewportHostService.h"
|
|
#include "Workspace/ProductEditorWorkspaceEventRouter.h"
|
|
|
|
#include <Host/D3D12WindowRenderer.h>
|
|
#include <Host/NativeRenderer.h>
|
|
|
|
#include <XCEditor/Shell/UIEditorShellInteraction.h>
|
|
|
|
#include <XCEngine/Rendering/RenderContext.h>
|
|
#include <XCEngine/UI/DrawData.h>
|
|
|
|
#include <filesystem>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
class ProductEditorWorkspace {
|
|
public:
|
|
void Initialize(
|
|
const std::filesystem::path& repoRoot,
|
|
Host::NativeRenderer& renderer);
|
|
void Shutdown();
|
|
void ResetInteractionState();
|
|
void AttachViewportWindowRenderer(Host::D3D12WindowRenderer& renderer);
|
|
void DetachViewportWindowRenderer();
|
|
void SetViewportSurfacePresentationEnabled(bool enabled);
|
|
|
|
void Update(
|
|
ProductEditorContext& context,
|
|
UIEditorWorkspaceController& workspaceController,
|
|
const ::XCEngine::UI::UIRect& bounds,
|
|
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
|
std::string_view captureText,
|
|
ProductEditorShellVariant shellVariant = ProductEditorShellVariant::Primary);
|
|
void RenderRequestedViewports(
|
|
const ::XCEngine::Rendering::RenderContext& renderContext);
|
|
void Append(::XCEngine::UI::UIDrawList& drawList) const;
|
|
|
|
const UIEditorShellInteractionFrame& GetShellFrame() const;
|
|
const UIEditorShellInteractionState& GetShellInteractionState() const;
|
|
const std::vector<ProductEditorWorkspaceTraceEntry>& GetTraceEntries() const;
|
|
const std::vector<ProductHierarchyPanel::Event>& GetHierarchyPanelEvents() const;
|
|
const std::vector<ProductProjectPanel::Event>& GetProjectPanelEvents() const;
|
|
const std::string& GetBuiltInIconError() const;
|
|
|
|
ProductProjectPanel::CursorKind GetHostedContentCursorKind() const;
|
|
Widgets::UIEditorDockHostCursorKind GetDockCursorKind() const;
|
|
bool WantsHostPointerCapture() const;
|
|
bool WantsHostPointerRelease() const;
|
|
bool HasHostedContentCapture() const;
|
|
bool HasShellInteractiveCapture() const;
|
|
bool HasInteractiveCapture() const;
|
|
|
|
private:
|
|
ProductViewportHostService m_viewportHostService = {};
|
|
ProductBuiltInIcons m_builtInIcons = {};
|
|
ProductConsolePanel m_consolePanel = {};
|
|
ProductHierarchyPanel m_hierarchyPanel = {};
|
|
ProductInspectorPanel m_inspectorPanel = {};
|
|
ProductProjectPanel m_projectPanel = {};
|
|
UIEditorShellInteractionState m_shellInteractionState = {};
|
|
UIEditorShellInteractionFrame m_shellFrame = {};
|
|
std::vector<ProductEditorWorkspaceTraceEntry> m_traceEntries = {};
|
|
};
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|