1#ifndef YAZE_APP_EDITOR_EDITOR_MANAGER_H
2#define YAZE_APP_EDITOR_EDITOR_MANAGER_H
4#define IMGUI_DEFINE_MATH_OPERATORS
12#include "absl/status/status.h"
50#include "imgui/imgui.h"
51#include "yaze_config.h"
60class CanvasAutomationServiceImpl;
104 const std::string& panels_str);
171 return &editor_set->GetOverworldEditor()->overworld();
193 ImGui::GetIO().FontGlobalScale = scale;
196 LOG_WARN(
"EditorManager",
"Failed to save user settings: %s",
197 status.ToString().c_str());
214 bool from_dialog =
false);
263 size_t session_index)
const;
278 void SetCanvasAutomationService(CanvasAutomationServiceImpl* service) {
279 canvas_automation_service_ = service;
295#ifdef YAZE_ENABLE_TESTING
296 void ShowTestDashboard() { show_test_dashboard_ =
true; }
299#ifdef YAZE_BUILD_AGENT_UI
301 void ShowChatHistory();
308#ifdef YAZE_BUILD_AGENT_UI
315 absl::Status
SaveRomAs(
const std::string& filename);
318 const std::string& template_name =
"Basic ROM Hack");
342 absl::Status
LoadAssets(uint64_t loading_handle = 0);
388 std::unique_ptr<yaze::agent::AgentControlServer> agent_control_server_;
422 std::unique_ptr<LayoutManager>
425 std::unique_ptr<RightPanelManager>
445 CanvasAutomationServiceImpl* canvas_automation_service_ =
nullptr;
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Manages project versioning (Git) and ROM artifact snapshots.
Comprehensive AI Agent Platform & Bot Creator.
Central coordinator for all agent UI components.
AgentEditor * GetAgentEditor()
Handles editor switching, layout initialization, and jump-to navigation.
SessionScope(EditorManager *manager, size_t session_id)
EditorSet * prev_editor_set_
The EditorManager controls the main editor window and manages the various editor classes.
absl::Status SaveProjectAs()
std::unique_ptr< SessionCoordinator > session_coordinator_
void SaveWorkspacePreset(const std::string &name)
void OnSessionClosed(size_t index) override
Called when a session is closed.
StartupVisibility welcome_mode_override_
void InitializeTestSuites()
float GetRightLayoutOffset() const
PanelManager * GetPanelManager()
bool show_proposal_drawer_
std::unique_ptr< GlobalEditorContext > editor_context_
auto GetCurrentGameData() const -> zelda3::GameData *
const PanelManager & card_registry() const
absl::Status SaveRomAs(const std::string &filename)
project::YazeProject current_project_
AgentUiController agent_ui_
absl::Status LoadProjectWithRom()
MenuBuilder menu_builder_
void ConfigureSession(RomSession *session)
void JumpToDungeonRoom(int room_id)
void SwitchToSession(size_t index)
size_t GetActiveSessionCount() const
absl::Status OpenProject()
ProjectManager project_manager_
void CloseCurrentSession()
gfx::IRenderer * renderer_
bool HasDuplicateSession(const std::string &filepath)
absl::Status RepairCurrentProject()
WorkspaceManager * workspace_manager()
std::unique_ptr< LayoutManager > layout_manager_
std::unique_ptr< DashboardPanel > dashboard_panel_
void ProcessStartupActions(const AppConfig &config)
void LoadWorkspacePreset(const std::string &name)
std::string GenerateUniqueEditorTitle(EditorType type, size_t session_index) const
void RenameSession(size_t index, const std::string &new_name)
void DrawMenuBar()
Draw the main menu bar.
void LoadWorkspaceLayout()
bool show_workspace_layout
MenuBuilder & menu_builder()
UICoordinator * ui_coordinator()
void ShowProjectManagement()
Injects dependencies into all editors within an EditorSet.
void DuplicateCurrentSession()
void Initialize(gfx::IRenderer *renderer, const std::string &filename="")
EditorRegistry editor_registry_
void ApplyStartupVisibilityOverrides()
void ResetWorkspaceLayout()
absl::Status CreateNewProject(const std::string &template_name="Basic ROM Hack")
layout_designer::LayoutDesignerWindow layout_designer_
ToastManager toast_manager_
LayoutCoordinator layout_coordinator_
absl::Status LoadAssets(uint64_t loading_handle=0)
void RefreshWorkspacePresets()
auto overworld() const -> yaze::zelda3::Overworld *
auto GetCurrentEditorSet() const -> EditorSet *
void OnSessionRomLoaded(size_t index, RomSession *session) override
Called when a ROM is loaded into a session.
const PanelManager & panel_manager() const
float GetBottomLayoutOffset() const
void SetFontGlobalScale(float scale)
std::unique_ptr< MenuOrchestrator > menu_orchestrator_
ProjectFileEditor project_file_editor_
void SetSidebarVisible(bool visible)
void ApplyLayoutPreset(const std::string &preset_name)
size_t session_to_rename_
bool IsSidebarVisible() const
void ApplyStartupVisibility(const AppConfig &config)
~EditorManager() override
auto GetCurrentEditor() const -> Editor *
void SetCurrentEditor(Editor *editor)
PanelManager & card_registry()
bool show_rom_load_options_
void PersistInputConfig(const emu::input::InputConfig &config)
absl::Status SaveProject()
std::unique_ptr< RightPanelManager > right_panel_manager_
void LoadDesignerLayout()
absl::Status DrawRomSelector()=delete
void SaveWorkspaceLayout()
const project::YazeProject * GetCurrentProject() const
std::unique_ptr< core::VersionManager > version_manager_
StartupVisibility sidebar_mode_override_
void JumpToOverworldMap(int map_id)
void OnSessionSwitched(size_t new_index, RomSession *session) override
Called when the active session changes.
RomLoadOptionsDialog rom_load_options_dialog_
absl::Status LoadRom()
Load a ROM file into a new or existing session.
std::vector< std::function< void()> > deferred_actions_
void OpenEditorAndPanelsFromFlags(const std::string &editor_name, const std::string &panels_str)
StartupVisibility dashboard_mode_override_
PanelManager & panel_manager()
void OpenLayoutDesigner()
void ShowProjectFileEditor()
static bool IsPanelBasedEditor(EditorType type)
absl::Status Update()
Main update loop for the editor application.
size_t GetCurrentSessionIndex() const
absl::Status ImportProject(const std::string &project_path)
AgentUiController * GetAgentUiController()
core::VersionManager * GetVersionManager()
size_t GetCurrentSessionId() const
void OnSessionCreated(size_t index, RomSession *session) override
Called when a new session is created.
project::YazeProject * GetCurrentProject()
void LoadDeveloperLayout()
AgentEditor * GetAgentEditor()
void QueueDeferredAction(std::function< void()> action)
SelectionPropertiesPanel selection_properties_panel_
WindowDelegate window_delegate_
std::unique_ptr< ActivityBar > activity_bar_
ShortcutManager shortcut_manager_
auto emulator() -> emu::Emulator &
emu::input::InputConfig BuildInputConfigFromSettings() const
void HideCurrentEditorPanels()
EditorDependencies::SharedClipboard shared_clipboard_
void SwitchToEditor(EditorType editor_type, bool force_visible=false, bool from_dialog=false)
UserSettings user_settings_
core::FeatureFlags::Flags * GetCurrentFeatureFlags()
WorkspaceManager workspace_manager_
auto GetCurrentRom() const -> Rom *
ProposalDrawer proposal_drawer_
void ConfigureEditorDependencies(EditorSet *editor_set, Rom *rom, size_t session_id)
WelcomeScreen welcome_screen_
std::unique_ptr< ProjectManagementPanel > project_management_panel_
absl::Status OpenRomOrProject(const std::string &filename)
void RemoveSession(size_t index)
PanelManager panel_manager_
std::unique_ptr< PopupManager > popup_manager_
std::unique_ptr< UICoordinator > ui_coordinator_
EditorActivator editor_activator_
absl::Status SaveRom()
Save the current ROM file.
absl::Status SetCurrentRom(Rom *rom)
float GetLeftLayoutOffset() const
RomFileManager rom_file_manager_
RightPanelManager * right_panel_manager()
void ResetCurrentEditorLayout()
char session_rename_buffer_[256]
Manages editor types, categories, and lifecycle.
Contains a complete set of editors for a single ROM instance.
Interface for editor classes.
Facade class that coordinates all layout-related operations.
float GetBottomLayoutOffset() const
Get the bottom margin needed for status bar.
float GetRightLayoutOffset() const
Get the right margin needed for panels.
float GetLeftLayoutOffset() const
Get the left margin needed for sidebar (Activity Bar + Side Panel)
Central registry for all editor cards with session awareness and dependency injection.
Editor for .yaze project files with syntax highlighting and validation.
Handles all project file operations with ROM-first workflow.
ImGui drawer for displaying and managing agent proposals.
Manages right-side sliding panels for agent chat, proposals, settings.
Handles all ROM file I/O operations.
ROM load options and ZSCustomOverworld upgrade dialog.
Full-editing properties panel for selected entities.
Observer interface for session state changes.
A session-aware status bar displayed at the bottom of the application.
Handles all UI drawing operations and state management.
Manages user preferences and settings persistence.
Modern welcome screen with project grid and quick actions.
Low-level window operations with minimal dependencies.
void LoadDesignerLayout()
void LoadWorkspaceLayout()
void SaveWorkspaceLayout()
void LoadDeveloperLayout()
Manages workspace layouts, sessions, and presets.
void SaveWorkspacePreset(const std::string &name)
void LoadWorkspacePreset(const std::string &name)
Main window for the WYSIWYG layout designer.
void Open()
Open the designer window.
A class for emulating and debugging SNES games.
Defines an abstract interface for all rendering operations.
#define LOG_WARN(category, format,...)
Editors are the view controllers for the application.
StartupVisibility
Tri-state toggle used for startup UI visibility controls.
Configuration options for the application startup.
Represents a single session, containing a ROM and its associated editors.
core::FeatureFlags::Flags feature_flags
Modern project structure with comprehensive settings consolidation.