refactor(editor): introduce UICoordinator for UI management

- Added UICoordinator class to centralize UI drawing operations and state management, improving separation of concerns within the editor.
- Refactored EditorManager to delegate UI-related tasks to UICoordinator, enhancing maintainability and clarity.
- Updated CMake configuration to include new source files for the UICoordinator component.

Benefits:
- Streamlines UI management, leading to a more organized and efficient user experience.
- Enhances the overall architecture by clearly defining roles for UI handling and editor operations.
This commit is contained in:
scawful
2025-10-14 22:56:01 -04:00
parent 0127913ff9
commit 9f41f8c2b8
12 changed files with 1500 additions and 672 deletions

View File

@@ -41,9 +41,10 @@
#include "app/editor/system/project_manager.h"
#include "app/editor/system/rom_file_manager.h"
#include "app/editor/system/session_card_registry.h"
#include "app/editor/system/session_coordinator.h"
#include "app/editor/system/window_delegate.h"
#include "app/editor/ui/session_coordinator.h"
#include "app/editor/ui/editor_selection_dialog.h"
#include "app/editor/ui/ui_coordinator.h"
#include "app/editor/ui/welcome_screen.h"
#include "app/emu/emulator.h"
#include "app/gfx/debug/performance/performance_dashboard.h"
@@ -359,6 +360,7 @@ class EditorManager {
ProjectManager project_manager_;
RomFileManager rom_file_manager_;
SessionCardRegistry card_registry_;
std::unique_ptr<UICoordinator> ui_coordinator_;
WindowDelegate window_delegate_;
std::unique_ptr<SessionCoordinator> session_coordinator_;