Refactor editor windowing system layout
This commit is contained in:
37
editor/app/Windowing/System/EditorWindowWorkspaceStore.h
Normal file
37
editor/app/Windowing/System/EditorWindowWorkspaceStore.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Workspace/UIEditorWindowWorkspaceController.h>
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
class EditorWindowWorkspaceStore final {
|
||||
public:
|
||||
explicit EditorWindowWorkspaceStore(UIEditorPanelRegistry panelRegistry);
|
||||
|
||||
const UIEditorPanelRegistry& GetPanelRegistry() const {
|
||||
return m_panelRegistry;
|
||||
}
|
||||
|
||||
bool ValidateWindowSet(
|
||||
const UIEditorWindowWorkspaceSet& windowSet,
|
||||
std::string& outError) const;
|
||||
bool TrySetWindowSet(
|
||||
UIEditorWindowWorkspaceSet windowSet,
|
||||
std::string& outError);
|
||||
void ClearWindowSet() {
|
||||
m_windowSet = {};
|
||||
}
|
||||
bool IsPrimaryWindowId(std::string_view windowId) const;
|
||||
const UIEditorWindowWorkspaceSet& GetWindowSet() const {
|
||||
return m_windowSet;
|
||||
}
|
||||
|
||||
private:
|
||||
UIEditorPanelRegistry m_panelRegistry = {};
|
||||
UIEditorWindowWorkspaceSet m_windowSet = {};
|
||||
};
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
Reference in New Issue
Block a user