refactor(editor): Phase 1 architecture refactoring
- Decouple Panel from Core::Layer (P0 issue resolved) - Add EventBus with type-safe event system - Add ISelectionManager interface with SelectionManagerImpl - Add IEditorContext for dependency injection - Update EditorLayer to use new architecture - Update Application to create and inject EditorContext New files: - editor/src/Core/EventBus.h - editor/src/Core/EditorEvents.h - editor/src/Core/ISelectionManager.h - editor/src/Core/SelectionManagerImpl.h - editor/src/Core/IEditorContext.h - editor/src/Core/EditorContextImpl.h This enables future improvements: Undo/Redo, serialization, component extensibility.
This commit is contained in:
24
editor/src/Core/IEditorContext.h
Normal file
24
editor/src/Core/IEditorContext.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace XCEngine {
|
||||
namespace Editor {
|
||||
|
||||
class EventBus;
|
||||
class ISelectionManager;
|
||||
|
||||
class IEditorContext {
|
||||
public:
|
||||
virtual ~IEditorContext() = default;
|
||||
|
||||
virtual EventBus& GetEventBus() = 0;
|
||||
virtual ISelectionManager& GetSelectionManager() = 0;
|
||||
|
||||
virtual void SetProjectPath(const std::string& path) = 0;
|
||||
virtual const std::string& GetProjectPath() const = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user