关键节点
This commit is contained in:
34
editor/app/UtilityWindows/EditorUtilityWindowPanel.h
Normal file
34
editor/app/UtilityWindows/EditorUtilityWindowPanel.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEngine/UI/DrawData.h>
|
||||
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
class EditorContext;
|
||||
|
||||
struct EditorUtilityWindowHostContext {
|
||||
bool mounted = false;
|
||||
::XCEngine::UI::UIRect bounds = {};
|
||||
bool allowInteraction = false;
|
||||
bool focused = false;
|
||||
bool focusGained = false;
|
||||
bool focusLost = false;
|
||||
};
|
||||
|
||||
class EditorUtilityWindowPanel {
|
||||
public:
|
||||
virtual ~EditorUtilityWindowPanel() = default;
|
||||
|
||||
virtual std::string_view GetDrawListId() const = 0;
|
||||
virtual void ResetInteractionState() = 0;
|
||||
virtual void Update(
|
||||
EditorContext& context,
|
||||
const EditorUtilityWindowHostContext& hostContext,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents) = 0;
|
||||
virtual void Append(::XCEngine::UI::UIDrawList& drawList) const = 0;
|
||||
};
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
Reference in New Issue
Block a user