The EditorManager controls the main editor window and manages the various editor classes. More...
#include <editor_manager.h>
Classes | |
| class | SessionScope |
Public Member Functions | |
| EditorManager () | |
| ~EditorManager () | |
| void | Initialize (gfx::IRenderer *renderer, const std::string &filename="") |
| void | OpenEditorAndCardsFromFlags (const std::string &editor_name, const std::string &cards_str) |
| absl::Status | Update () |
| Main update loop for the editor application. | |
| void | DrawMenuBar () |
| Draw the main menu bar. | |
| auto | emulator () -> emu::Emulator & |
| auto | quit () const |
| auto | version () const |
| MenuBuilder & | menu_builder () |
| WorkspaceManager * | workspace_manager () |
| absl::Status | SetCurrentRom (Rom *rom) |
| auto | GetCurrentRom () const -> Rom * |
| auto | GetCurrentEditorSet () const -> EditorSet * |
| auto | GetCurrentEditor () const -> Editor * |
| size_t | GetCurrentSessionId () const |
| UICoordinator * | ui_coordinator () |
| auto | overworld () const -> yaze::zelda3::Overworld * |
| size_t | GetCurrentSessionIndex () const |
| core::FeatureFlags::Flags * | GetCurrentFeatureFlags () |
| void | SetFontGlobalScale (float scale) |
| void | RefreshWorkspacePresets () |
| void | SaveWorkspacePreset (const std::string &name) |
| void | LoadWorkspacePreset (const std::string &name) |
| void | JumpToDungeonRoom (int room_id) |
| void | JumpToOverworldMap (int map_id) |
| void | SwitchToEditor (EditorType editor_type) |
| bool | IsSidebarVisible () const |
| void | SetSidebarVisible (bool visible) |
| void | HideCurrentEditorCards () |
| void | CreateNewSession () |
| void | DuplicateCurrentSession () |
| void | CloseCurrentSession () |
| void | RemoveSession (size_t index) |
| void | SwitchToSession (size_t index) |
| size_t | GetActiveSessionCount () const |
| void | SaveWorkspaceLayout () |
| void | LoadWorkspaceLayout () |
| void | ResetWorkspaceLayout () |
| void | ShowAllWindows () |
| void | HideAllWindows () |
| void | LoadDeveloperLayout () |
| void | LoadDesignerLayout () |
| void | LoadModderLayout () |
| std::string | GenerateUniqueEditorTitle (EditorType type, size_t session_index) const |
| bool | HasDuplicateSession (const std::string &filepath) |
| void | RenameSession (size_t index, const std::string &new_name) |
| void | Quit () |
| void | ShowGlobalSearch () |
| void | ShowCommandPalette () |
| void | ShowPerformanceDashboard () |
| void | ShowImGuiDemo () |
| void | ShowImGuiMetrics () |
| void | ShowHexEditor () |
| void | ShowEmulator () |
| void | ShowMemoryEditor () |
| void | ShowResourceLabelManager () |
| void | ShowCardBrowser () |
| void | ShowWelcomeScreen () |
| absl::Status | LoadRom () |
| Load a ROM file into a new or existing session. | |
| absl::Status | SaveRom () |
| Save the current ROM file. | |
| absl::Status | SaveRomAs (const std::string &filename) |
| absl::Status | OpenRomOrProject (const std::string &filename) |
| absl::Status | CreateNewProject (const std::string &template_name="Basic ROM Hack") |
| absl::Status | OpenProject () |
| absl::Status | SaveProject () |
| absl::Status | SaveProjectAs () |
| absl::Status | ImportProject (const std::string &project_path) |
| absl::Status | RepairCurrentProject () |
Static Public Member Functions | |
| static bool | IsCardBasedEditor (EditorType type) |
Private Member Functions | |
| absl::Status | DrawRomSelector ()=delete |
| void | DrawContextSensitiveCardControl () |
| absl::Status | LoadAssets () |
| void | InitializeTestSuites () |
| void | ConfigureEditorDependencies (EditorSet *editor_set, Rom *rom, size_t session_id) |
| Injects dependencies into all editors within an EditorSet. | |
The EditorManager controls the main editor window and manages the various editor classes.
The EditorManager class contains instances of various editor classes such as AssemblyEditor, DungeonEditor, GraphicsEditor, MusicEditor, OverworldEditor, PaletteEditor, ScreenEditor, and SpriteEditor. The current_editor_ member variable points to the currently active editor in the tab view.
Definition at line 66 of file editor_manager.h.
| yaze::editor::EditorManager::EditorManager | ( | ) |
Definition at line 127 of file editor_manager.cc.
References card_registry_, editor_registry_, layout_manager_, menu_builder_, menu_orchestrator_, popup_manager_, project_manager_, rom_file_manager_, session_coordinator_, sessions_, shortcut_manager_, toast_manager_, ui_coordinator_, user_settings_, version_, and window_delegate_.
|
default |
| void yaze::editor::EditorManager::Initialize | ( | gfx::IRenderer * | renderer, |
| const std::string & | filename = "" |
||
| ) |
Definition at line 240 of file editor_manager.cc.
References yaze::editor::AgentChatWidget::Z3EDCommandCallbacks::accept_proposal, agent_chat_history_popup_, yaze::cli::GeminiConfig::api_key, yaze::editor::AgentChatWidget::MultimodalCallbacks::capture_snapshot, card_registry_, yaze::editor::ConfigureEditorShortcuts(), yaze::editor::ConfigureMenuShortcuts(), CreateNewProject(), yaze::editor::AgentChatWidget::Z3EDCommandCallbacks::diff_proposal, yaze::editor::ShortcutDependencies::editor_manager, yaze::editor::ShortcutDependencies::editor_registry, editor_registry_, editor_selection_dialog_, emulator_, yaze::editor::AgentChatWidget::AutomationCallbacks::focus_proposal, yaze::editor::ProposalDrawer::FocusProposal(), yaze::editor::UserSettings::Preferences::font_global_scale, yaze::cli::GeminiAIService::GenerateMultimodalResponse(), yaze::test::TestManager::Get(), GetCurrentRom(), ICON_MD_AUDIO_FILE, ICON_MD_AUDIOTRACK, ICON_MD_BUG_REPORT, ICON_MD_KEYBOARD, ICON_MD_MEMORY, ICON_MD_PREVIEW, ICON_MD_SAVE, ICON_MD_SMART_TOY, ICON_MD_SPEED, ICON_MD_STOP, ICON_MD_VIDEOGAME_ASSET, InitializeTestSuites(), yaze::cli::agent::ChatMessage::kAgent, yaze::editor::kInfo, yaze::editor::AgentChatWidget::Z3EDCommandCallbacks::list_proposals, yaze::editor::UserSettings::Load(), LoadRom(), LOG_WARN, yaze::editor::EditorSelectionDialog::MarkRecentlyUsed(), yaze::editor::ShortcutDependencies::menu_orchestrator, menu_orchestrator_, yaze::cli::agent::ChatMessage::message, yaze::cli::GeminiConfig::model, yaze::editor::AgentChatWidget::AutomationCallbacks::open_harness_dashboard, OpenRomOrProject(), yaze::editor::ShortcutDependencies::popup_manager, popup_manager_, yaze::editor::UserSettings::prefs(), PRINT_IF_ERROR, project_file_editor_, yaze::editor::ShortcutDependencies::project_manager, project_manager_, proposal_drawer_, yaze::editor::EditorCardRegistry::RegisterCard(), yaze::editor::AgentChatWidget::Z3EDCommandCallbacks::reject_proposal, renderer_, yaze::editor::AgentChatWidget::AutomationCallbacks::replay_last_plan, yaze::test::TestManager::ReplayLastPlan(), yaze::editor::ShortcutDependencies::rom_file_manager, rom_file_manager_, yaze::editor::AgentChatWidget::MultimodalCallbacks::send_to_gemini, yaze::cli::agent::ChatMessage::sender, yaze::editor::ShortcutDependencies::session_coordinator, session_coordinator_, yaze::emu::Emulator::set_card_registry(), yaze::editor::WorkspaceManager::set_card_registry(), yaze::editor::WelcomeScreen::SetNewProjectCallback(), yaze::editor::WelcomeScreen::SetOpenProjectCallback(), yaze::editor::WelcomeScreen::SetOpenRomCallback(), yaze::editor::EditorSelectionDialog::SetSelectionCallback(), yaze::editor::AgentChatHistoryPopup::SetToastManager(), yaze::editor::ProjectFileEditor::SetToastManager(), shortcut_manager_, yaze::editor::ProposalDrawer::Show(), yaze::editor::ToastManager::Show(), yaze::editor::AgentChatWidget::AutomationCallbacks::show_active_tests, yaze::editor::UserSettings::Preferences::show_welcome_on_startup, yaze::editor::EditorCardRegistry::ShowCard(), yaze::test::TestManager::ShowHarnessActiveTests(), yaze::test::TestManager::ShowHarnessDashboard(), status_, SwitchToEditor(), yaze::cli::agent::ChatMessage::timestamp, yaze::editor::ShortcutDependencies::toast_manager, toast_manager_, yaze::editor::ShortcutDependencies::ui_coordinator, ui_coordinator_, user_settings_, yaze::cli::GeminiConfig::verbose, welcome_screen_, yaze::editor::ShortcutDependencies::workspace_manager, and workspace_manager_.
Referenced by yaze::Controller::OnEntry().
| void yaze::editor::EditorManager::OpenEditorAndCardsFromFlags | ( | const std::string & | editor_name, |
| const std::string & | cards_str | ||
| ) |
Definition at line 560 of file editor_manager.cc.
References GetCurrentEditorSet(), yaze::editor::kDungeon, yaze::editor::kSettings, yaze::editor::kUnknown, LOG_DEBUG, LOG_INFO, and LOG_WARN.
Referenced by yaze::Controller::SetStartupEditor().

| absl::Status yaze::editor::EditorManager::Update | ( | ) |
Main update loop for the editor application.
DELEGATION FLOW:
Note: EditorManager retains the main loop to coordinate multi-session updates, but delegates specific drawing/state operations to specialized components.
Definition at line 649 of file editor_manager.cc.
References yaze::editor::UserSettings::Preferences::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_interval, autosave_timer_, yaze::Rom::SaveSettings::backup, card_registry_, current_editor_, yaze::editor::ProposalDrawer::Draw(), yaze::editor::ToastManager::Draw(), yaze::editor::EditorCardRegistry::DrawCardBrowser(), yaze::editor::EditorCardRegistry::DrawSidebar(), editor_selection_dialog_, yaze::editor::ExecuteShortcuts(), GenerateUniqueEditorTitle(), yaze::gfx::PerformanceDashboard::Get(), yaze::gui::BackgroundRenderer::Get(), yaze::gui::ThemeManager::Get(), yaze::TimingManager::Get(), yaze::test::TestManager::Get(), yaze::editor::EditorCardRegistry::GetActiveCategory(), GetCurrentEditorSet(), GetCurrentRom(), yaze::editor::EditorRegistry::GetEditorCategory(), yaze::editor::EditorRegistry::GetEditorTypeFromCategory(), IsCardBasedEditor(), yaze::editor::OverworldEditor::jump_to_tab_, yaze::editor::kError, yaze::editor::kOverworld, yaze::editor::kSuccess, yaze::editor::kUnknown, LOG_DEBUG, popup_manager_, yaze::editor::UserSettings::prefs(), proposal_drawer_, yaze::gfx::PerformanceDashboard::Render(), yaze::Rom::SaveSettings::save_new, session_coordinator_, sessions_, yaze::editor::EditorCardRegistry::SetActiveCategory(), yaze::test::TestManager::SetCurrentRom(), shortcut_manager_, yaze::editor::EditorSelectionDialog::Show(), yaze::editor::ToastManager::Show(), status_, SwitchToEditor(), toast_manager_, ui_coordinator_, yaze::TimingManager::Update(), yaze::editor::Editor::Update(), and user_settings_.
Referenced by yaze::Controller::OnLoad().
| void yaze::editor::EditorManager::DrawMenuBar | ( | ) |
Draw the main menu bar.
DELEGATION:
Note: ROM selector stays in EditorManager because it needs direct access to sessions_ and current_rom_ for the combo box. Could be extracted to SessionCoordinator in future.
Definition at line 942 of file editor_manager.cc.
References agent_chat_history_popup_, card_registry_, current_project_, yaze::editor::AgentChatHistoryPopup::Draw(), yaze::editor::ProjectFileEditor::Draw(), yaze::editor::ProposalDrawer::Draw(), emulator_, yaze::gfx::PerformanceDashboard::Get(), yaze::test::TestManager::Get(), GetCurrentEditorSet(), GetCurrentRom(), yaze::editor::EditorCardRegistry::GetVisibilityFlag(), yaze::editor::PopupID::kDisplaySettings, yaze::editor::kError, yaze::project::YazeProject::labels_filename, menu_orchestrator_, popup_manager_, project_file_editor_, yaze::project::YazeProject::project_opened(), proposal_drawer_, yaze::gfx::PerformanceDashboard::Render(), yaze::emu::Emulator::Run(), yaze::editor::ProposalDrawer::SetRom(), yaze::gfx::PerformanceDashboard::SetVisible(), yaze::editor::ToastManager::Show(), status_, toast_manager_, ui_coordinator_, and yaze::gfx::PerformanceDashboard::Update().
Referenced by yaze::Controller::OnLoad().
|
inline |
Definition at line 80 of file editor_manager.h.
References emulator_.
Referenced by yaze::Controller::OnEntry().
|
inline |
Definition at line 81 of file editor_manager.h.
References quit_.
Referenced by yaze::Controller::OnLoad().
|
inline |
Definition at line 82 of file editor_manager.h.
References version_.
Referenced by yaze::editor::PopupManager::DrawAboutPopup(), and yaze::editor::UICoordinator::DrawMenuBarExtras().
|
inline |
Definition at line 84 of file editor_manager.h.
References menu_builder_.
|
inline |
Definition at line 85 of file editor_manager.h.
References workspace_manager_.
Referenced by yaze::editor::UICoordinator::DrawWorkspacePresetDialogs().
| absl::Status yaze::editor::EditorManager::SetCurrentRom | ( | Rom * | rom | ) |
Definition at line 1505 of file editor_manager.cc.
References yaze::test::TestManager::Get(), GetCurrentRom(), session_coordinator_, sessions_, and yaze::test::TestManager::SetCurrentRom().

|
inline |
Definition at line 88 of file editor_manager.h.
References session_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::CanSaveRom(), yaze::editor::UICoordinator::DrawGlobalSearch(), DrawMenuBar(), yaze::editor::UICoordinator::DrawMenuBarExtras(), yaze::editor::PopupManager::DrawRomInfoPopup(), yaze::editor::UICoordinator::DrawRomSelector(), yaze::editor::PopupManager::DrawSaveAsPopup(), yaze::editor::UICoordinator::DrawWelcomeScreen(), DuplicateCurrentSession(), yaze::Controller::GetCurrentRom(), GetCurrentSessionIndex(), yaze::editor::MenuOrchestrator::GetRomFilename(), yaze::editor::MenuOrchestrator::HasActiveRom(), Initialize(), LoadAssets(), LoadRom(), yaze::editor::MenuOrchestrator::OnCheckRomVersion(), yaze::editor::MenuOrchestrator::OnCreateBackup(), yaze::editor::MenuOrchestrator::OnRunDataIntegrityCheck(), yaze::editor::MenuOrchestrator::OnTestSaveLoad(), yaze::editor::MenuOrchestrator::OnToggleAsarPatch(), yaze::editor::MenuOrchestrator::OnUpgradeRom(), yaze::editor::MenuOrchestrator::OnValidateRom(), OpenProject(), OpenRomOrProject(), SaveProject(), SaveRom(), SaveRomAs(), SetCurrentRom(), SwitchToSession(), and Update().
|
inline |
Definition at line 89 of file editor_manager.h.
References session_coordinator_.
Referenced by DrawMenuBar(), JumpToDungeonRoom(), JumpToOverworldMap(), LoadAssets(), LoadRom(), OpenEditorAndCardsFromFlags(), OpenProject(), OpenRomOrProject(), overworld(), SaveProject(), SaveRom(), SaveRomAs(), SwitchToEditor(), and Update().
|
inline |
Definition at line 90 of file editor_manager.h.
References current_editor_.
Referenced by yaze::editor::UICoordinator::DrawContextSensitiveCardControl(), yaze::editor::MenuOrchestrator::HasCurrentEditor(), yaze::editor::UICoordinator::HideCurrentEditorCards(), yaze::editor::MenuOrchestrator::OnCopy(), yaze::editor::MenuOrchestrator::OnCut(), yaze::editor::MenuOrchestrator::OnFind(), yaze::editor::MenuOrchestrator::OnPaste(), yaze::editor::MenuOrchestrator::OnRedo(), and yaze::editor::MenuOrchestrator::OnUndo().
|
inline |
Definition at line 91 of file editor_manager.h.
References session_coordinator_.
Referenced by yaze::editor::UICoordinator::DrawContextSensitiveCardControl(), LoadRom(), OpenProject(), and OpenRomOrProject().
|
inline |
Definition at line 92 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowEditorSelection(), and yaze::editor::MenuOrchestrator::OnShowSessionSwitcher().
|
inline |
Definition at line 93 of file editor_manager.h.
References GetCurrentEditorSet().
Referenced by yaze::Controller::overworld().

| size_t yaze::editor::EditorManager::GetCurrentSessionIndex | ( | ) | const |
Definition at line 1606 of file editor_manager.cc.
References GetCurrentRom(), session_coordinator_, and sessions_.
Referenced by GetCurrentFeatureFlags(), SaveProject(), and SaveRomAs().

|
inline |
Definition at line 104 of file editor_manager.h.
References yaze::core::FeatureFlags::get(), GetCurrentSessionIndex(), and sessions_.

|
inline |
Definition at line 112 of file editor_manager.h.
References yaze::editor::UserSettings::Preferences::font_global_scale, LOG_WARN, yaze::editor::UserSettings::prefs(), yaze::editor::UserSettings::Save(), and user_settings_.
Referenced by yaze::editor::PopupManager::DrawDisplaySettingsPopup().

|
inline |
Definition at line 123 of file editor_manager.h.
References yaze::editor::WorkspaceManager::RefreshPresets(), and workspace_manager_.
Referenced by yaze::editor::UICoordinator::DrawWorkspacePresetDialogs().

|
inline |
Definition at line 124 of file editor_manager.h.
References yaze::editor::WorkspaceManager::SaveWorkspacePreset(), and workspace_manager_.
Referenced by yaze::editor::UICoordinator::DrawWorkspacePresetDialogs().

|
inline |
Definition at line 127 of file editor_manager.h.
References yaze::editor::WorkspaceManager::LoadWorkspacePreset(), and workspace_manager_.
Referenced by yaze::editor::UICoordinator::DrawWorkspacePresetDialogs().

| void yaze::editor::EditorManager::JumpToDungeonRoom | ( | int | room_id | ) |
Definition at line 1654 of file editor_manager.cc.
References GetCurrentEditorSet(), yaze::editor::kDungeon, and SwitchToEditor().

| void yaze::editor::EditorManager::JumpToOverworldMap | ( | int | map_id | ) |
Definition at line 1665 of file editor_manager.cc.
References GetCurrentEditorSet(), yaze::editor::kOverworld, and SwitchToEditor().

| void yaze::editor::EditorManager::SwitchToEditor | ( | EditorType | editor_type | ) |
Definition at line 1676 of file editor_manager.cc.
References card_registry_, GetCurrentEditorSet(), yaze::editor::EditorRegistry::GetEditorCategory(), IsCardBasedEditor(), yaze::editor::kAssembly, yaze::editor::kEmulator, layout_manager_, yaze::editor::EditorCardRegistry::SetActiveCategory(), and ui_coordinator_.
Referenced by Initialize(), JumpToDungeonRoom(), JumpToOverworldMap(), yaze::editor::MenuOrchestrator::OnShowAssemblyEditor(), yaze::editor::MenuOrchestrator::OnShowSettings(), yaze::editor::MenuOrchestrator::OnSwitchToEditor(), and Update().

|
static |
Definition at line 97 of file editor_manager.cc.
References yaze::editor::EditorRegistry::IsCardBasedEditor().
Referenced by SwitchToEditor(), and Update().

|
inline |
Definition at line 138 of file editor_manager.h.
References ui_coordinator_.
|
inline |
Definition at line 141 of file editor_manager.h.
References ui_coordinator_.
| void yaze::editor::EditorManager::HideCurrentEditorCards | ( | ) |
Definition at line 101 of file editor_manager.cc.
References card_registry_, current_editor_, editor_registry_, yaze::editor::EditorRegistry::GetEditorCategory(), yaze::editor::EditorCardRegistry::HideAllCardsInCategory(), and yaze::editor::Editor::type().

| void yaze::editor::EditorManager::CreateNewSession | ( | ) |
Definition at line 1525 of file editor_manager.cc.
References ConfigureEditorDependencies(), yaze::editor::RomSession::editors, yaze::editor::kInfo, yaze::editor::kSuccess, yaze::editor::RomSession::rom, session_coordinator_, yaze::editor::EditorSet::session_id(), sessions_, yaze::editor::EditorSet::set_user_settings(), yaze::editor::ToastManager::Show(), toast_manager_, and user_settings_.

| void yaze::editor::EditorManager::DuplicateCurrentSession | ( | ) |
Definition at line 1552 of file editor_manager.cc.
References ConfigureEditorDependencies(), yaze::editor::RomSession::editors, GetCurrentRom(), yaze::editor::kWarning, yaze::editor::RomSession::rom, session_coordinator_, yaze::editor::EditorSet::session_id(), sessions_, yaze::editor::ToastManager::Show(), and toast_manager_.

| void yaze::editor::EditorManager::CloseCurrentSession | ( | ) |
Definition at line 1572 of file editor_manager.cc.
References session_coordinator_.
| void yaze::editor::EditorManager::RemoveSession | ( | size_t | index | ) |
Definition at line 1580 of file editor_manager.cc.
References session_coordinator_.
| void yaze::editor::EditorManager::SwitchToSession | ( | size_t | index | ) |
Definition at line 1588 of file editor_manager.cc.
References yaze::test::TestManager::Get(), GetCurrentRom(), session_coordinator_, sessions_, and yaze::test::TestManager::SetCurrentRom().
Referenced by yaze::editor::UICoordinator::DrawGlobalSearch(), and yaze::editor::UICoordinator::DrawRomSelector().

| size_t yaze::editor::EditorManager::GetActiveSessionCount | ( | ) | const |
Definition at line 1621 of file editor_manager.cc.
References session_coordinator_, and sessions_.
|
inline |
Definition at line 160 of file editor_manager.h.
References yaze::editor::WindowDelegate::SaveWorkspaceLayout(), and window_delegate_.
Referenced by yaze::editor::MenuOrchestrator::OnSaveWorkspaceLayout().

|
inline |
Definition at line 161 of file editor_manager.h.
References yaze::editor::WindowDelegate::LoadWorkspaceLayout(), and window_delegate_.
Referenced by yaze::editor::MenuOrchestrator::OnLoadWorkspaceLayout().

|
inline |
Definition at line 162 of file editor_manager.h.
References yaze::editor::WindowDelegate::ResetWorkspaceLayout(), and window_delegate_.
Referenced by yaze::editor::MenuOrchestrator::OnResetWorkspaceLayout().

|
inline |
Definition at line 163 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowAllWindows().
|
inline |
Definition at line 167 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnHideAllWindows().
|
inline |
Definition at line 173 of file editor_manager.h.
References yaze::editor::WindowDelegate::LoadDeveloperLayout(), and window_delegate_.
Referenced by yaze::editor::MenuOrchestrator::OnLoadDeveloperLayout().

|
inline |
Definition at line 174 of file editor_manager.h.
References yaze::editor::WindowDelegate::LoadDesignerLayout(), and window_delegate_.
Referenced by yaze::editor::MenuOrchestrator::OnLoadDesignerLayout().

|
inline |
Definition at line 175 of file editor_manager.h.
References yaze::editor::WindowDelegate::LoadModderLayout(), and window_delegate_.
Referenced by yaze::editor::MenuOrchestrator::OnLoadModderLayout().

| std::string yaze::editor::EditorManager::GenerateUniqueEditorTitle | ( | EditorType | type, |
| size_t | session_index | ||
| ) | const |
Definition at line 1636 of file editor_manager.cc.
References yaze::editor::kEditorNames, and session_coordinator_.
Referenced by Update().
| bool yaze::editor::EditorManager::HasDuplicateSession | ( | const std::string & | filepath | ) |
Definition at line 1745 of file editor_manager.cc.
References sessions_.
| void yaze::editor::EditorManager::RenameSession | ( | size_t | index, |
| const std::string & | new_name | ||
| ) |
|
inline |
Definition at line 182 of file editor_manager.h.
References quit_.
Referenced by yaze::editor::MenuOrchestrator::OnQuit().
|
inline |
Definition at line 186 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowGlobalSearch().
|
inline |
Definition at line 190 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowCommandPalette().
|
inline |
Definition at line 194 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowPerformanceDashboard().
|
inline |
Definition at line 198 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowImGuiDemo().
|
inline |
Definition at line 202 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowImGuiMetrics().
| void yaze::editor::EditorManager::ShowHexEditor | ( | ) |
Definition at line 112 of file editor_manager.cc.
References card_registry_, and yaze::editor::EditorCardRegistry::ShowCard().
Referenced by yaze::editor::MenuOrchestrator::OnShowHexEditor().

|
inline |
Definition at line 207 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowEmulator().
|
inline |
Definition at line 208 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowMemoryEditor().
|
inline |
Definition at line 209 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowResourceLabelManager().
|
inline |
Definition at line 210 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowCardBrowser().
|
inline |
Definition at line 214 of file editor_manager.h.
References ui_coordinator_.
Referenced by yaze::editor::MenuOrchestrator::OnShowWelcomeScreen().
| absl::Status yaze::editor::EditorManager::LoadRom | ( | ) |
Load a ROM file into a new or existing session.
DELEGATION:
FLOW:
Definition at line 1107 of file editor_manager.cc.
References yaze::editor::EditorSelectionDialog::ClearRecentEditors(), ConfigureEditorDependencies(), editor_selection_dialog_, yaze::test::TestManager::Get(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), yaze::project::RecentFilesManager::GetInstance(), yaze::editor::kWarning, LoadAssets(), yaze::editor::RomFileManager::LoadRom(), RETURN_IF_ERROR, rom_file_manager_, session_coordinator_, yaze::test::TestManager::SetCurrentRom(), yaze::editor::ToastManager::Show(), yaze::util::FileDialogWrapper::ShowOpenFileDialog(), toast_manager_, and ui_coordinator_.
Referenced by Initialize(), yaze::editor::MenuOrchestrator::OnOpenRom(), and yaze::editor::UICoordinator::UICoordinator().
| absl::Status yaze::editor::EditorManager::SaveRom | ( | ) |
Save the current ROM file.
DELEGATION:
RESPONSIBILITIES STILL IN EDITORMANAGER:
This stays in EditorManager because it requires knowledge of all editors and the order in which they must be saved to maintain ROM integrity.
Definition at line 1212 of file editor_manager.cc.
References yaze::gfx::Arena::Get(), yaze::core::FeatureFlags::get(), GetCurrentEditorSet(), GetCurrentRom(), RETURN_IF_ERROR, rom_file_manager_, yaze::SaveAllGraphicsData(), yaze::zelda3::SaveDungeonMaps(), and yaze::editor::RomFileManager::SaveRom().
Referenced by yaze::editor::MenuOrchestrator::OnSaveRom().
| absl::Status yaze::editor::EditorManager::SaveRomAs | ( | const std::string & | filename | ) |
Definition at line 1235 of file editor_manager.cc.
References yaze::gfx::Arena::Get(), yaze::core::FeatureFlags::get(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionIndex(), yaze::project::RecentFilesManager::GetInstance(), RETURN_IF_ERROR, rom_file_manager_, yaze::SaveAllGraphicsData(), yaze::zelda3::SaveDungeonMaps(), yaze::editor::RomFileManager::SaveRomAs(), and sessions_.
Referenced by yaze::editor::PopupManager::DrawSaveAsPopup().
| absl::Status yaze::editor::EditorManager::OpenRomOrProject | ( | const std::string & | filename | ) |
Definition at line 1268 of file editor_manager.cc.
References yaze::editor::EditorSelectionDialog::ClearRecentEditors(), yaze::project::YazeProject::code_folder, ConfigureEditorDependencies(), current_project_, editor_selection_dialog_, yaze::editor::RomSession::feature_flags, yaze::project::YazeProject::feature_flags, yaze::test::TestManager::Get(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), LoadAssets(), yaze::editor::RomFileManager::LoadRom(), LOG_DEBUG, yaze::project::YazeProject::Open(), OpenProject(), RETURN_IF_ERROR, rom_file_manager_, session_coordinator_, yaze::test::TestManager::SetCurrentRom(), and ui_coordinator_.
Referenced by yaze::editor::UICoordinator::DrawGlobalSearch(), Initialize(), and yaze::editor::UICoordinator::UICoordinator().
| absl::Status yaze::editor::EditorManager::CreateNewProject | ( | const std::string & | template_name = "Basic ROM Hack" | ) |
Definition at line 1313 of file editor_manager.cc.
References yaze::editor::ProjectManager::CreateNewProject(), current_project_, yaze::editor::ProjectManager::GetCurrentProject(), popup_manager_, and project_manager_.
Referenced by yaze::editor::PopupManager::DrawNewProjectPopup(), Initialize(), yaze::editor::MenuOrchestrator::OnCreateProject(), SaveProject(), and yaze::editor::UICoordinator::UICoordinator().

| absl::Status yaze::editor::EditorManager::OpenProject | ( | ) |
Definition at line 1324 of file editor_manager.cc.
References yaze::editor::UserSettings::Preferences::autosave_enabled, yaze::project::WorkspaceSettings::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_interval, yaze::project::WorkspaceSettings::autosave_interval_secs, yaze::editor::EditorSelectionDialog::ClearRecentEditors(), yaze::project::YazeProject::code_folder, ConfigureEditorDependencies(), current_project_, editor_selection_dialog_, yaze::editor::RomSession::feature_flags, yaze::project::YazeProject::feature_flags, yaze::project::YazeProject::filepath, yaze::editor::UserSettings::Preferences::font_global_scale, yaze::project::WorkspaceSettings::font_global_scale, yaze::test::TestManager::Get(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), yaze::project::YazeProject::GetDisplayName(), yaze::project::RecentFilesManager::GetInstance(), yaze::editor::kSuccess, yaze::editor::kWarning, LoadAssets(), yaze::editor::RomFileManager::LoadRom(), LOG_DEBUG, yaze::project::YazeProject::Open(), popup_manager_, yaze::editor::UserSettings::prefs(), RETURN_IF_ERROR, rom_file_manager_, yaze::project::YazeProject::rom_filename, session_coordinator_, yaze::test::TestManager::SetCurrentRom(), yaze::editor::ToastManager::Show(), yaze::util::FileDialogWrapper::ShowOpenFileDialog(), toast_manager_, ui_coordinator_, user_settings_, yaze::project::YazeProject::Validate(), and yaze::project::YazeProject::workspace_settings.
Referenced by yaze::editor::MenuOrchestrator::OnOpenProject(), and OpenRomOrProject().
| absl::Status yaze::editor::EditorManager::SaveProject | ( | ) |
Definition at line 1405 of file editor_manager.cc.
References yaze::editor::UserSettings::Preferences::autosave_enabled, yaze::project::WorkspaceSettings::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_interval, yaze::project::WorkspaceSettings::autosave_interval_secs, CreateNewProject(), current_project_, yaze::project::YazeProject::feature_flags, yaze::editor::UserSettings::Preferences::font_global_scale, yaze::project::WorkspaceSettings::font_global_scale, GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionIndex(), yaze::project::RecentFilesManager::GetInstance(), yaze::editor::UserSettings::prefs(), yaze::project::YazeProject::project_opened(), yaze::project::WorkspaceSettings::recent_files, yaze::project::YazeProject::Save(), sessions_, user_settings_, and yaze::project::YazeProject::workspace_settings.
Referenced by yaze::editor::MenuOrchestrator::OnSaveProject().
| absl::Status yaze::editor::EditorManager::SaveProjectAs | ( | ) |
Definition at line 1435 of file editor_manager.cc.
References current_project_, yaze::project::YazeProject::filepath, yaze::project::YazeProject::GetDisplayName(), yaze::project::RecentFilesManager::GetInstance(), yaze::editor::kError, yaze::editor::kSuccess, yaze::project::YazeProject::project_opened(), yaze::project::YazeProject::Save(), yaze::editor::ToastManager::Show(), yaze::util::FileDialogWrapper::ShowSaveFileDialog(), and toast_manager_.
Referenced by yaze::editor::MenuOrchestrator::OnSaveProjectAs().
| absl::Status yaze::editor::EditorManager::ImportProject | ( | const std::string & | project_path | ) |
Definition at line 1476 of file editor_manager.cc.
References current_project_, yaze::project::YazeProject::ImportZScreamProject(), yaze::editor::kInfo, yaze::project::YazeProject::Open(), RETURN_IF_ERROR, yaze::editor::ToastManager::Show(), and toast_manager_.

| absl::Status yaze::editor::EditorManager::RepairCurrentProject | ( | ) |
Definition at line 1493 of file editor_manager.cc.
References current_project_, yaze::editor::kSuccess, yaze::project::YazeProject::project_opened(), yaze::project::YazeProject::RepairProject(), RETURN_IF_ERROR, yaze::editor::ToastManager::Show(), and toast_manager_.

|
privatedelete |
|
private |
Definition at line 924 of file editor_manager.cc.
References ui_coordinator_.
|
private |
Definition at line 1149 of file editor_manager.cc.
References ASSIGN_OR_RETURN, emulator_, yaze::gfx::PerformanceProfiler::Get(), yaze::gfx::Arena::Get(), GetCurrentEditorSet(), GetCurrentRom(), yaze::LoadAllGraphicsData(), LOG_DEBUG, yaze::gfx::PerformanceProfiler::PrintSummary(), renderer_, RETURN_IF_ERROR, and yaze::emu::Emulator::set_renderer().
Referenced by LoadRom(), OpenProject(), and OpenRomOrProject().
|
private |
Definition at line 197 of file editor_manager.cc.
References yaze::test::TestManager::Get(), and yaze::test::RegisterZ3edTestSuites().
Referenced by Initialize().

|
private |
Injects dependencies into all editors within an EditorSet.
This function is called whenever a new session is created or a ROM is loaded into an existing session. It configures the EditorDependencies struct with pointers to all the managers and services that editors need, then applies them to the editor set.
| editor_set | The set of editors to configure |
| rom | The ROM instance for this session |
| session_id | The unique ID for this session |
Dependencies injected:
Definition at line 1777 of file editor_manager.cc.
References yaze::editor::EditorSet::ApplyDependencies(), yaze::editor::EditorDependencies::card_registry, card_registry_, yaze::editor::EditorDependencies::popup_manager, popup_manager_, yaze::editor::EditorDependencies::renderer, renderer_, yaze::editor::EditorDependencies::rom, yaze::editor::EditorDependencies::session_id, yaze::editor::EditorDependencies::shared_clipboard, shared_clipboard_, yaze::editor::EditorDependencies::shortcut_manager, shortcut_manager_, yaze::editor::EditorDependencies::toast_manager, toast_manager_, yaze::editor::EditorDependencies::user_settings, and user_settings_.
Referenced by CreateNewSession(), DuplicateCurrentSession(), LoadRom(), OpenProject(), and OpenRomOrProject().

|
private |
Definition at line 251 of file editor_manager.h.
|
private |
Definition at line 257 of file editor_manager.h.
|
private |
Definition at line 258 of file editor_manager.h.
|
private |
Definition at line 259 of file editor_manager.h.
|
private |
Definition at line 265 of file editor_manager.h.
Referenced by DrawMenuBar(), Initialize(), and Update().
|
private |
Definition at line 266 of file editor_manager.h.
|
private |
Definition at line 273 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 274 of file editor_manager.h.
|
private |
Definition at line 277 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 281 of file editor_manager.h.
Referenced by Initialize(), LoadRom(), OpenProject(), OpenRomOrProject(), and Update().
|
private |
Definition at line 282 of file editor_manager.h.
Referenced by Initialize().
|
private |
Definition at line 290 of file editor_manager.h.
Referenced by EditorManager(), and version().
|
private |
Definition at line 291 of file editor_manager.h.
Referenced by DrawMenuBar(), Initialize(), and Update().
|
private |
Definition at line 292 of file editor_manager.h.
Referenced by DrawMenuBar(), emulator(), Initialize(), and LoadAssets().
|
private |
Definition at line 297 of file editor_manager.h.
Referenced by CreateNewSession(), DuplicateCurrentSession(), EditorManager(), GetActiveSessionCount(), GetCurrentFeatureFlags(), GetCurrentSessionIndex(), HasDuplicateSession(), SaveProject(), SaveRomAs(), SetCurrentRom(), SwitchToSession(), and Update().
|
private |
Definition at line 298 of file editor_manager.h.
Referenced by GetCurrentEditor(), HideCurrentEditorCards(), and Update().
|
private |
Definition at line 299 of file editor_manager.h.
|
private |
Definition at line 303 of file editor_manager.h.
Referenced by ConfigureEditorDependencies(), Initialize(), and LoadAssets().
|
private |
Definition at line 305 of file editor_manager.h.
Referenced by CreateNewProject(), DrawMenuBar(), ImportProject(), OpenProject(), OpenRomOrProject(), RepairCurrentProject(), SaveProject(), and SaveProjectAs().
|
private |
Definition at line 306 of file editor_manager.h.
Referenced by ConfigureEditorDependencies().
|
private |
Definition at line 307 of file editor_manager.h.
Referenced by ConfigureEditorDependencies(), CreateNewProject(), DrawMenuBar(), EditorManager(), Initialize(), OpenProject(), and Update().
|
private |
Definition at line 308 of file editor_manager.h.
Referenced by ConfigureEditorDependencies(), CreateNewSession(), DrawMenuBar(), DuplicateCurrentSession(), EditorManager(), ImportProject(), Initialize(), LoadRom(), OpenProject(), RepairCurrentProject(), SaveProjectAs(), and Update().
|
private |
Definition at line 309 of file editor_manager.h.
Referenced by EditorManager(), and menu_builder().
|
private |
Definition at line 310 of file editor_manager.h.
Referenced by ConfigureEditorDependencies(), EditorManager(), Initialize(), and Update().
|
private |
Definition at line 311 of file editor_manager.h.
Referenced by ConfigureEditorDependencies(), CreateNewSession(), EditorManager(), Initialize(), OpenProject(), SaveProject(), SetFontGlobalScale(), and Update().
|
private |
Definition at line 314 of file editor_manager.h.
Referenced by ConfigureEditorDependencies(), DrawMenuBar(), EditorManager(), HideCurrentEditorCards(), Initialize(), ShowHexEditor(), SwitchToEditor(), and Update().
|
private |
Definition at line 315 of file editor_manager.h.
Referenced by EditorManager(), HideCurrentEditorCards(), and Initialize().
|
private |
Definition at line 316 of file editor_manager.h.
Referenced by DrawMenuBar(), EditorManager(), and Initialize().
|
private |
Definition at line 317 of file editor_manager.h.
Referenced by CreateNewProject(), EditorManager(), and Initialize().
|
private |
Definition at line 318 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), LoadRom(), OpenProject(), OpenRomOrProject(), SaveRom(), and SaveRomAs().
|
private |
Definition at line 319 of file editor_manager.h.
Referenced by DrawContextSensitiveCardControl(), DrawMenuBar(), EditorManager(), HideAllWindows(), Initialize(), IsSidebarVisible(), LoadRom(), OpenProject(), OpenRomOrProject(), SetSidebarVisible(), ShowAllWindows(), ShowCardBrowser(), ShowCommandPalette(), ShowEmulator(), ShowGlobalSearch(), ShowImGuiDemo(), ShowImGuiMetrics(), ShowMemoryEditor(), ShowPerformanceDashboard(), ShowResourceLabelManager(), ShowWelcomeScreen(), SwitchToEditor(), ui_coordinator(), and Update().
|
private |
Definition at line 320 of file editor_manager.h.
Referenced by EditorManager(), LoadDesignerLayout(), LoadDeveloperLayout(), LoadModderLayout(), LoadWorkspaceLayout(), ResetWorkspaceLayout(), and SaveWorkspaceLayout().
|
private |
Definition at line 321 of file editor_manager.h.
Referenced by CloseCurrentSession(), CreateNewSession(), DuplicateCurrentSession(), EditorManager(), GenerateUniqueEditorTitle(), GetActiveSessionCount(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), GetCurrentSessionIndex(), Initialize(), LoadRom(), OpenProject(), OpenRomOrProject(), RemoveSession(), yaze::editor::EditorManager::SessionScope::SessionScope(), SetCurrentRom(), SwitchToSession(), and Update().
|
private |
Definition at line 322 of file editor_manager.h.
Referenced by EditorManager(), and SwitchToEditor().
|
private |
Definition at line 323 of file editor_manager.h.
Referenced by Initialize(), LoadWorkspacePreset(), RefreshWorkspacePresets(), SaveWorkspacePreset(), and workspace_manager().
|
private |
Definition at line 325 of file editor_manager.h.
Referenced by Update().