Refactor editor rendering contracts
This commit is contained in:
60
editor/app/Core/Assets/EditorIconService.h
Normal file
60
editor/app/Core/Assets/EditorIconService.h
Normal file
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include "HostFwd.h"
|
||||
|
||||
#include <XCEngine/UI/Types.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
namespace XCEngine::UI::Editor::Rendering::Host {
|
||||
|
||||
class UiTextureHost;
|
||||
|
||||
} // namespace XCEngine::UI::Editor::Rendering::Host
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
enum class BuiltInIconKind : std::uint8_t {
|
||||
Folder = 0,
|
||||
GameObject,
|
||||
Scene,
|
||||
CameraGizmo,
|
||||
DirectionalLightGizmo,
|
||||
PointLightGizmo,
|
||||
SpotLightGizmo,
|
||||
PlayButton,
|
||||
PauseButton,
|
||||
StepButton,
|
||||
ViewMoveTool,
|
||||
ViewMoveToolActive,
|
||||
MoveTool,
|
||||
MoveToolActive,
|
||||
RotateTool,
|
||||
RotateToolActive,
|
||||
ScaleTool,
|
||||
ScaleToolActive,
|
||||
TransformTool,
|
||||
TransformToolActive
|
||||
};
|
||||
|
||||
class EditorIconService {
|
||||
public:
|
||||
virtual ~EditorIconService() = default;
|
||||
|
||||
virtual void Initialize(
|
||||
Rendering::Host::UiTextureHost& renderer,
|
||||
Host::EditorHostResourceService& resourceService) = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
virtual void BeginFrame() = 0;
|
||||
|
||||
[[nodiscard]] virtual const ::XCEngine::UI::UITextureHandle& Resolve(
|
||||
BuiltInIconKind kind) const = 0;
|
||||
[[nodiscard]] virtual const ::XCEngine::UI::UITextureHandle* ResolveAssetPreview(
|
||||
const std::filesystem::path& assetPath,
|
||||
const std::filesystem::path& projectRoot) = 0;
|
||||
[[nodiscard]] virtual const std::string& GetLastError() const = 0;
|
||||
};
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
Reference in New Issue
Block a user