yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::EditorManager Class Reference

The EditorManager controls the main editor window and manages the various editor classes. More...

#include <editor_manager.h>

Inheritance diagram for yaze::editor::EditorManager:

Classes

struct  PendingProjectRomSelection
 
struct  PendingRomSave
 
struct  PendingUnsavedSessionAction
 
class  SessionScope
 
struct  UiSyncState
 

Public Types

enum class  PotItemSaveDecision { kSaveWithPotItems , kSaveWithoutPotItems , kCancel }
 

Public Member Functions

 EditorManager ()
 
 ~EditorManager ()
 
void Initialize (gfx::IRenderer *renderer, const std::string &filename="")
 
void OpenEditorAndPanelsFromFlags (const std::string &editor_name, const std::string &panels_str)
 
void ProcessStartupActions (const AppConfig &config)
 
void ApplyStartupVisibility (const AppConfig &config)
 
void SetStartupLoadHints (const AppConfig &config)
 
void SetAssetLoadMode (AssetLoadMode mode)
 
AssetLoadMode asset_load_mode () const
 
absl::Status Update ()
 Main update loop for the editor application.
 
void DrawMainMenuBar ()
 
void HandleHostVisibilityChanged (bool visible)
 
auto emulator () -> emu::Emulator &
 
auto quit () const
 
auto version () const
 
MenuBuildermenu_builder ()
 
WorkspaceManagerworkspace_manager ()
 
RightDrawerManagerright_drawer_manager ()
 
const RightDrawerManagerright_drawer_manager () const
 
StatusBarstatus_bar ()
 
ToastManagertoast_manager ()
 
PopupManagerpopup_manager ()
 
WorkspaceWindowManagerGetWindowManager ()
 
WorkspaceWindowManagerwindow_manager ()
 
const WorkspaceWindowManagerwindow_manager () const
 
SessionCoordinatorsession_coordinator ()
 
const SessionCoordinatorsession_coordinator () const
 
PanelHostpanel_host ()
 
const PanelHostpanel_host () const
 
WindowHostwindow_host ()
 
const WindowHostwindow_host () const
 
float GetLeftLayoutOffset () const
 
float GetRightLayoutOffset () const
 
float GetBottomLayoutOffset () const
 
absl::Status SetCurrentRom (Rom *rom)
 
RomGetCurrentRom () const override
 
auto GetCurrentGameData () const -> zelda3::GameData *
 
auto GetCurrentEditorSet () const -> EditorSet *
 
auto GetCurrentEditor () const -> Editor *override
 
std::string GetCurrentRomHash () const
 
project::RomRole GetProjectRomRole () const
 
project::RomWritePolicy GetProjectRomWritePolicy () const
 
std::string GetProjectExpectedRomHash () const
 
bool IsRomHashMismatch () const
 
std::vector< editor::RomFileManager::BackupEntryGetRomBackups () const
 
bool IsRomBackupRestorePending () const
 
absl::Status RestoreRomBackup (const std::string &backup_path)
 
absl::Status DiscardPendingRomBackupRestore ()
 
absl::Status PruneRomBackups ()
 
void ConfirmRomWrite ()
 
void CancelRomWriteConfirm ()
 
bool IsRomWriteConfirmPending () const
 
const std::vector< core::WriteConflict > & pending_write_conflicts () const
 
void BypassWriteConflictOnce ()
 
void ClearPendingWriteConflicts ()
 
void SetCurrentEditor (Editor *editor) override
 
size_t GetCurrentSessionId () const
 Stable workspace identity; unlike the UI index, it does not compact.
 
UICoordinatorui_coordinator ()
 
yaze::zelda3::Overworldoverworld () const
 
size_t GetCurrentSessionIndex () const
 
core::FeatureFlags::FlagsGetCurrentFeatureFlags ()
 
void SetFontGlobalScale (float scale)
 
UserSettingsuser_settings ()
 
const UserSettingsuser_settings () const
 
void RefreshWorkspacePresets ()
 
void SaveWorkspacePreset (const std::string &name)
 
void LoadWorkspacePreset (const std::string &name)
 
void SwitchToEditor (EditorType editor_type, bool force_visible=false, bool from_dialog=false) override
 
void DismissEditorSelection () override
 
bool IsSidebarVisible () const
 
void SetSidebarVisible (bool visible)
 
absl::Status EnsureEditorAssetsLoaded (EditorType type)
 
absl::Status EnsureGameDataLoaded ()
 
void CreateNewSession ()
 
void DuplicateCurrentSession ()
 
void CloseCurrentSession ()
 
void RemoveSession (size_t index)
 
void SwitchToSession (size_t index)
 
void RequestSwitchToSession (size_t index) override
 
void RequestCloseSession (size_t index) override
 
size_t GetActiveSessionCount () const
 
void SaveWorkspaceLayout ()
 
void LoadWorkspaceLayout ()
 
void ResetWorkspaceLayout ()
 
void ShowAllWindows ()
 
void HideAllWindows ()
 
void LoadDeveloperLayout ()
 
void LoadDesignerLayout ()
 
void LoadModderLayout ()
 
void ApplyLayoutPreset (const std::string &preset_name)
 
bool ApplyLayoutProfile (const std::string &profile_id)
 
void CaptureTemporaryLayoutSnapshot ()
 
void RestoreTemporaryLayoutSnapshot (bool clear_after_restore=false)
 
void ClearTemporaryLayoutSnapshot ()
 
bool SaveLayoutSnapshotAs (const std::string &name)
 
bool RestoreLayoutSnapshot (const std::string &name, bool remove_after_restore=false)
 
bool DeleteLayoutSnapshot (const std::string &name)
 
std::vector< std::string > ListLayoutSnapshots () const
 
void ResetCurrentEditorLayout ()
 
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 ()
 
bool HasPendingUnsavedSessionAction () const
 
std::string GetPendingUnsavedSessionActionPrompt () const
 
std::string GetPendingUnsavedSessionActionSaveLabel () const
 
std::string GetPendingUnsavedSessionActionContinueLabel () const
 
void ConfirmPendingUnsavedSessionActionSaveAndContinue ()
 
void ConfirmPendingUnsavedSessionActionDiscardAndContinue ()
 
void CancelPendingUnsavedSessionAction ()
 
void QueueDeferredAction (std::function< void()> action)
 
UiSyncState GetUiSyncStateSnapshot () const
 
void ConfigureSession (RomSession *session) override
 
void ShowImGuiDemo ()
 
void ShowImGuiMetrics ()
 
AgentEditorGetAgentEditor ()
 
AgentUiControllerGetAgentUiController ()
 
absl::Status LoadRom ()
 Load a ROM file into a new or existing session.
 
absl::Status SaveRom ()
 
absl::Status SaveRomAs (const std::string &filename)
 
absl::Status ResumePendingRomSave ()
 
absl::Status OpenRomOrProject (const std::string &filename)
 
absl::Status CreateNewProject (const std::string &template_name="Basic ROM Hack")
 
absl::Status CreateNewProjectFromRom (const std::string &template_name, const std::string &rom_path, const std::string &project_name, const std::string &project_path=std::string())
 
absl::Status FinalizeNewProject (const std::string &project_name, const std::string &project_path=std::string())
 
absl::Status OpenProject ()
 
absl::Status SaveProject ()
 
absl::Status SaveProjectAs ()
 
absl::Status SaveProjectAs (const std::string &filepath)
 
absl::Status AutosaveActiveSession ()
 
absl::Status BuildCurrentProject ()
 
void QueueBuildCurrentProject ()
 
void CancelQueuedProjectBuild ()
 
absl::Status RunCurrentProject ()
 
bool HasPendingPotItemSaveConfirmation () const
 
int pending_pot_item_unloaded_rooms () const
 
int pending_pot_item_total_rooms () const
 
void ResolvePotItemSaveConfirmation (PotItemSaveDecision decision)
 
absl::Status ImportProject (const std::string &project_path)
 
absl::Status RepairCurrentProject ()
 
absl::Status LoadProjectWithRom ()
 
absl::Status SwapProjectRom (const std::string &rom_path)
 
absl::Status ReloadProjectRom ()
 
project::YazeProjectGetCurrentProject ()
 
const project::YazeProjectGetCurrentProject () const
 
void MarkCurrentProjectDirty ()
 
bool IsCurrentProjectDirty () const
 
core::VersionManagerGetVersionManager ()
 
void ShowProjectManagement ()
 Injects dependencies into all editors within an EditorSet.
 
void ShowProjectFileEditor ()
 
ProjectFileEditorproject_file_editor ()
 
ProjectManagementPanelproject_management_panel ()
 
- Public Member Functions inherited from yaze::editor::ISessionConfigurator
virtual ~ISessionConfigurator ()=default
 
virtual ~ISessionConfigurator ()=default
 
- Public Member Functions inherited from yaze::editor::IEditorSwitcher
virtual ~IEditorSwitcher ()=default
 
virtual ~IEditorSwitcher ()=default
 

Static Public Member Functions

static bool IsPanelBasedEditor (EditorType type)
 

Private Member Functions

absl::Status DrawRomSelector ()=delete
 
absl::Status LoadAssets (uint64_t loading_handle=0)
 
absl::Status LoadAssetsForMode (uint64_t loading_handle=0)
 
absl::Status LoadAssetsLazy (uint64_t loading_handle=0)
 
absl::Status InitializeEditorForType (EditorType type, EditorSet *editor_set, Rom *rom)
 
void ResetAssetState (RomSession *session)
 
void MarkEditorInitialized (RomSession *session, EditorType type)
 
void MarkEditorLoaded (RomSession *session, EditorType type)
 
EditorGetEditorByType (EditorType type, EditorSet *editor_set) const
 
EditorResolveEditorForCategory (const std::string &category)
 
void SyncEditorContextForCategory (const std::string &category)
 
bool EditorRequiresGameData (EditorType type) const
 
bool EditorInitRequiresGameData (EditorType type) const
 
std::vector< EditorTypeCollectEditorsToPreload (EditorSet *editor_set) const
 
void InitializeTestSuites ()
 
void ApplyStartupVisibilityOverrides ()
 
void ApplyLayoutDefaultsMigrationIfNeeded ()
 
std::string GetPreferredStartupCategory (const std::string &saved_category, const std::vector< std::string > &available_categories) const
 
void HandleSessionSwitched (size_t new_index, RomSession *session, bool transient=false)
 
void HandleSessionCreated (size_t index, RomSession *session)
 
void HandleSessionClosed (size_t index)
 
void SubscribeToEvents ()
 
void InitializeSubsystems ()
 
void RegisterEditors ()
 
void RegisterEmulatorPanels ()
 
void InitializeServices ()
 
void SetupComponentCallbacks ()
 
void SetupDialogCallbacks ()
 
void SetupWelcomeScreenCallbacks ()
 
void SetupSidebarCallbacks ()
 
void InitializeShortcutSystem ()
 
void ProcessInput ()
 
void UpdateEditorState ()
 
void PollProjectWorkflowTasks ()
 
void DrawInterface ()
 
void DrawSecondaryWindows ()
 
void UpdateSystemUIs ()
 
void RunEmulator ()
 
void RefreshHackWorkflowBackend ()
 
void HandleSessionRomLoaded (size_t index, Rom *rom)
 
void RefreshResourceLabelProvider ()
 
void HandleUIActionRequest (UIActionRequestEvent::Action action)
 
emu::input::InputConfig BuildInputConfigFromSettings () const
 
void PersistInputConfig (const emu::input::InputConfig &config)
 
void UpdateCurrentRomHash ()
 
void ApplyDefaultBackupPolicy ()
 
void CaptureRuntimeFeatureFlags ()
 
void CaptureActiveProjectEditingState ()
 
void CaptureActiveProjectContext ()
 
void DetachActiveProjectContext ()
 
void BindProjectContextToSession (RomSession *session, const project::YazeProject &project)
 
bool RestoreProjectContextForSession (RomSession *session)
 
void RestoreProjectEditingStateForSession (RomSession *session)
 
absl::Status SaveActiveProjectEditingWork ()
 
absl::Status PrepareRawProjectFileSave (const std::string &filepath, const std::string &contents)
 
absl::Status CommitRawProjectFileSave (const std::string &filepath, const std::string &contents)
 
absl::Status ReplaceActiveSessionRom (Rom &&rom, const std::string &filepath)
 
bool ProjectFileDraftTargetsCurrentProject () const
 
void RebaseCleanProjectFileDraft (const std::string &filepath)
 
void RestoreProjectContextAfterFailedOpen (std::optional< size_t > previous_session_id)
 
absl::Status DiscardProvisionalSessionCreatedSince (size_t previous_session_count)
 
void ApplyCurrentProjectRuntimeContext ()
 
absl::StatusOr< const project::YazeProject * > PrepareActiveProjectContextForSave ()
 
ProjectWorkflowStatus MakeBuildStatus (const std::string &summary, const std::string &detail, ProjectWorkflowState state, const std::string &output_tail="", bool can_cancel=false) const
 
ProjectWorkflowStatus MakeRunStatus (const std::string &summary, const std::string &detail, ProjectWorkflowState state) const
 
absl::StatusOr< std::string > RunProjectBuildCommand ()
 
absl::StatusOr< std::string > ResolveProjectBuildCommand () const
 
absl::StatusOr< std::string > ResolveProjectRunTarget () const
 
absl::Status CheckRomWritePolicy (const std::optional< std::string > &target_filename=std::nullopt)
 Save the current ROM file.
 
absl::Status CheckOracleRomSafetyPreSave (Rom *rom)
 
absl::Status SaveRomInternal (const std::optional< std::string > &save_as_filename)
 
bool HasPendingRomSaveConfirmation () const
 
bool PendingRomSaveMatchesActiveSession () const
 
void FinishPendingRomSaveAttempt (const absl::Status &status)
 
void CancelPendingRomSave (bool hide_popups=false)
 
absl::Status StartPendingRomSave (const std::optional< std::string > &save_as_filename)
 
absl::Status LoadRomInternal ()
 
absl::Status OpenRomOrProjectInternal (const std::string &filename)
 
absl::Status OpenProjectInternal ()
 
absl::Status ValidateProjectRomSelection (const std::string &rom_path)
 
std::optional< size_t > ResolveSessionIndexById (size_t session_id) const
 
bool MaybeGuardPendingSessionAction (PendingUnsavedSessionAction action)
 
void ExecutePendingUnsavedSessionAction (const PendingUnsavedSessionAction &action)
 
bool SessionHasPendingUnsavedWork (size_t session_index) const
 
bool SessionHasPendingRomWork (size_t session_index) const
 
bool HasAnySessionPendingUnsavedWork () const
 
bool HasPendingDungeonChangesForSession (size_t session_index) const
 
int PendingDungeonRoomCountForSession (size_t session_index) const
 
size_t PendingPaletteColorCountForSession (size_t session_index) const
 
int ModifiedSessionCount () const
 
std::string DescribePendingUnsavedWork (size_t session_index) const
 
std::string DescribeAllPendingUnsavedWork () const
 
void ConfigureEditorDependencies (EditorSet *editor_set, Rom *rom, size_t session_id)
 
void SyncLayoutScopeFromCurrentProject ()
 

Private Attributes

bool quit_ = false
 
bool show_workspace_layout = false
 
size_t session_to_rename_ = 0
 
char session_rename_buffer_ [256] = {}
 
ProposalDrawer proposal_drawer_
 
bool show_proposal_drawer_ = false
 
AgentUiController agent_ui_
 
ProjectFileEditor project_file_editor_
 
std::unique_ptr< DashboardPaneldashboard_panel_
 
WelcomeScreen welcome_screen_
 
RomLoadOptionsDialog rom_load_options_dialog_
 
bool show_rom_load_options_ = false
 
StartupVisibility welcome_mode_override_ = StartupVisibility::kAuto
 
StartupVisibility dashboard_mode_override_ = StartupVisibility::kAuto
 
StartupVisibility sidebar_mode_override_ = StartupVisibility::kAuto
 
AssetLoadMode asset_load_mode_ = AssetLoadMode::kFull
 
std::string startup_editor_hint_
 
std::vector< std::string > startup_panel_hints_
 
SelectionPropertiesPanel selection_properties_panel_
 
std::unique_ptr< ProjectManagementPanelproject_management_panel_
 
std::string version_ = ""
 
absl::Status status_
 
emu::Emulator emulator_
 
Editorcurrent_editor_ = nullptr
 
gfx::IRendererrenderer_ = nullptr
 
project::YazeProject current_project_
 
std::optional< PendingProjectRomSelectionpending_project_rom_selection_
 
uint64_t project_rom_selection_generation_ = 0
 
bool pending_project_open_transition_ = false
 
std::optional< size_t > pending_project_open_previous_session_id_
 
std::optional< size_t > active_project_context_session_id_
 
std::optional< size_t > runtime_feature_flags_session_id_
 
core::VersionManagerversion_manager_ = nullptr
 
SharedClipboard shared_clipboard_
 
std::unique_ptr< PopupManagerpopup_manager_
 
ToastManager toast_manager_
 
MenuBuilder menu_builder_
 
ShortcutManager shortcut_manager_
 
UserSettings user_settings_
 
WorkspaceWindowManager window_manager_
 
std::unique_ptr< WindowHostwindow_host_
 
EditorRegistry editor_registry_
 
std::unique_ptr< MenuOrchestratormenu_orchestrator_
 
ProjectManager project_manager_
 
RomFileManager rom_file_manager_
 
std::unique_ptr< UICoordinatorui_coordinator_
 
WindowDelegate window_delegate_
 
EditorActivator editor_activator_
 
std::unique_ptr< SessionCoordinatorsession_coordinator_
 
std::unique_ptr< LayoutManagerlayout_manager_
 
LayoutCoordinator layout_coordinator_
 
std::unique_ptr< RightDrawerManagerright_drawer_manager_
 
StatusBar status_bar_
 
std::unique_ptr< ActivityBaractivity_bar_
 
WorkspaceManager workspace_manager_ {&toast_manager_}
 
float autosave_timer_ = 0.0f
 
bool settings_dirty_ = false
 
float settings_dirty_timestamp_ = 0.0f
 
bool pending_layout_defaults_reset_ = false
 
std::optional< PendingUnsavedSessionActionpending_unsaved_session_action_
 
RomLifecycleManager rom_lifecycle_
 
std::optional< PendingRomSavepending_rom_save_
 
std::vector< std::function< void()> > deferred_actions_
 
std::atomic< int > pending_editor_deferred_actions_ {0}
 
std::atomic< uint64_t > ui_sync_frame_id_ {0}
 
std::unique_ptr< BackgroundCommandTaskactive_project_build_
 
bool active_project_build_reported_ = false
 
EventBus event_bus_
 
std::unique_ptr< GlobalEditorContexteditor_context_
 
std::unique_ptr< workflow::HackWorkflowBackendhack_workflow_backend_
 

Detailed Description

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.

EditorManager subscribes to EventBus events for session lifecycle notifications (SessionSwitchedEvent, SessionCreatedEvent, etc.) and updates cross-cutting concerns accordingly.

Definition at line 98 of file editor_manager.h.

Member Enumeration Documentation

◆ PotItemSaveDecision

Enumerator
kSaveWithPotItems 
kSaveWithoutPotItems 
kCancel 

Definition at line 107 of file editor_manager.h.

Constructor & Destructor Documentation

◆ EditorManager()

◆ ~EditorManager()

Member Function Documentation

◆ Initialize()

void yaze::editor::EditorManager::Initialize ( gfx::IRenderer * renderer,
const std::string & filename = "" )

Definition at line 1938 of file editor_manager.cc.

References dashboard_mode_override_, editor_registry_, emulator_, yaze::editor::WorkspaceWindowManager::GetActiveSessionId(), GetPreferredStartupCategory(), InitializeServices(), InitializeShortcutSystem(), InitializeTestSuites(), yaze::kShow, OpenRomOrProject(), yaze::editor::UserSettings::Preferences::panel_browser_category_width, yaze::editor::UserSettings::Preferences::panel_visibility_state, pending_layout_defaults_reset_, yaze::editor::UserSettings::prefs(), PRINT_IF_ERROR, yaze::editor::RegisterDefaultEditorFactories(), RegisterEmulatorPanels(), renderer_, ResetWorkspaceLayout(), yaze::editor::WorkspaceWindowManager::RestoreVisibilityState(), yaze::emu::Emulator::set_window_manager(), yaze::editor::WorkspaceManager::set_window_manager(), yaze::editor::WorkspaceWindowManager::SetActiveCategory(), yaze::editor::WorkspaceWindowManager::SetSidebarExpanded(), yaze::editor::WorkspaceWindowManager::SetSidebarVisible(), yaze::editor::WorkspaceWindowManager::SetStoredSidePanelWidth(), SetupComponentCallbacks(), yaze::editor::WorkspaceWindowManager::SetWindowBrowserCategoryWidth(), yaze::editor::UserSettings::Preferences::sidebar_active_category, yaze::editor::UserSettings::Preferences::sidebar_panel_expanded, yaze::editor::UserSettings::Preferences::sidebar_panel_width, yaze::editor::UserSettings::Preferences::sidebar_visible, startup_editor_hint_, startup_panel_hints_, SyncEditorContextForCategory(), user_settings_, window_manager_, and workspace_manager_.

Referenced by yaze::Controller::OnEntry().

◆ OpenEditorAndPanelsFromFlags()

◆ ProcessStartupActions()

◆ ApplyStartupVisibility()

void yaze::editor::EditorManager::ApplyStartupVisibility ( const AppConfig & config)

◆ SetStartupLoadHints()

◆ SetAssetLoadMode()

void yaze::editor::EditorManager::SetAssetLoadMode ( AssetLoadMode mode)

◆ asset_load_mode()

AssetLoadMode yaze::editor::EditorManager::asset_load_mode ( ) const
inline

Definition at line 130 of file editor_manager.h.

References asset_load_mode_.

Referenced by yaze::Controller::LoadRomForTesting().

◆ Update()

absl::Status yaze::editor::EditorManager::Update ( )

Main update loop for the editor application.

DELEGATION FLOW:

  1. Update timing manager for accurate delta time
  2. Draw popups (PopupManager) - modal dialogs across all sessions
  3. Execute shortcuts (ShortcutManager) - keyboard input handling
  4. Draw toasts (ToastManager) - user notifications
  5. Iterate all sessions and update active editors
  6. Draw session UI (SessionCoordinator) - session switcher, manager
  7. Draw sidebar (WorkspaceWindowManager) - card-based editor UI

Note: EditorManager retains the main loop to coordinate multi-session updates, but delegates specific drawing/state operations to specialized components.

Definition at line 3036 of file editor_manager.cc.

References DrawInterface(), ProcessInput(), status_, and UpdateEditorState().

Referenced by yaze::Controller::OnLoad().

Here is the call graph for this function:

◆ DrawMainMenuBar()

◆ HandleHostVisibilityChanged()

void yaze::editor::EditorManager::HandleHostVisibilityChanged ( bool visible)

Definition at line 3044 of file editor_manager.cc.

References yaze::gui::Animator::ClearWorkspaceTransitionState(), yaze::gui::GetAnimator(), and right_drawer_manager_.

Referenced by yaze::Controller::OnInput().

Here is the call graph for this function:

◆ emulator()

auto yaze::editor::EditorManager::emulator ( ) -> emu::Emulator&
inline

◆ quit()

auto yaze::editor::EditorManager::quit ( ) const
inline

Definition at line 139 of file editor_manager.h.

References quit_.

Referenced by yaze::Controller::OnLoad().

◆ version()

auto yaze::editor::EditorManager::version ( ) const
inline

◆ menu_builder()

MenuBuilder & yaze::editor::EditorManager::menu_builder ( )
inline

Definition at line 142 of file editor_manager.h.

References menu_builder_.

◆ workspace_manager()

WorkspaceManager * yaze::editor::EditorManager::workspace_manager ( )
inline

◆ right_drawer_manager() [1/2]

RightDrawerManager * yaze::editor::EditorManager::right_drawer_manager ( )
inline

◆ right_drawer_manager() [2/2]

const RightDrawerManager * yaze::editor::EditorManager::right_drawer_manager ( ) const
inline

Definition at line 147 of file editor_manager.h.

References right_drawer_manager_.

◆ status_bar()

StatusBar * yaze::editor::EditorManager::status_bar ( )
inline

Definition at line 150 of file editor_manager.h.

References status_bar_.

◆ toast_manager()

◆ popup_manager()

PopupManager * yaze::editor::EditorManager::popup_manager ( )
inline

Definition at line 152 of file editor_manager.h.

References popup_manager_.

Referenced by InitializeSubsystems().

◆ GetWindowManager()

WorkspaceWindowManager * yaze::editor::EditorManager::GetWindowManager ( )
inline

Definition at line 153 of file editor_manager.h.

References window_manager_.

◆ window_manager() [1/2]

WorkspaceWindowManager & yaze::editor::EditorManager::window_manager ( )
inline

Definition at line 154 of file editor_manager.h.

References window_manager_.

Referenced by yaze::editor::PopupManager::DrawLayoutPresetsPopup().

◆ window_manager() [2/2]

const WorkspaceWindowManager & yaze::editor::EditorManager::window_manager ( ) const
inline

Definition at line 155 of file editor_manager.h.

References window_manager_.

◆ session_coordinator() [1/2]

SessionCoordinator * yaze::editor::EditorManager::session_coordinator ( )
inline

Definition at line 158 of file editor_manager.h.

References session_coordinator_.

◆ session_coordinator() [2/2]

const SessionCoordinator * yaze::editor::EditorManager::session_coordinator ( ) const
inline

Definition at line 161 of file editor_manager.h.

References session_coordinator_.

◆ panel_host() [1/2]

PanelHost * yaze::editor::EditorManager::panel_host ( )
inline

Definition at line 164 of file editor_manager.h.

References window_host_.

◆ panel_host() [2/2]

const PanelHost * yaze::editor::EditorManager::panel_host ( ) const
inline

Definition at line 167 of file editor_manager.h.

References window_host_.

◆ window_host() [1/2]

WindowHost * yaze::editor::EditorManager::window_host ( )
inline

Definition at line 171 of file editor_manager.h.

References window_host_.

◆ window_host() [2/2]

const WindowHost * yaze::editor::EditorManager::window_host ( ) const
inline

Definition at line 172 of file editor_manager.h.

References window_host_.

◆ GetLeftLayoutOffset()

float yaze::editor::EditorManager::GetLeftLayoutOffset ( ) const
inline

Definition at line 176 of file editor_manager.h.

References yaze::editor::LayoutCoordinator::GetLeftLayoutOffset(), and layout_coordinator_.

Referenced by yaze::editor::UICoordinator::DrawWelcomeScreen(), and yaze::Controller::OnLoad().

Here is the call graph for this function:

◆ GetRightLayoutOffset()

float yaze::editor::EditorManager::GetRightLayoutOffset ( ) const
inline

Definition at line 179 of file editor_manager.h.

References yaze::editor::LayoutCoordinator::GetRightLayoutOffset(), and layout_coordinator_.

Referenced by yaze::editor::UICoordinator::DrawWelcomeScreen(), and yaze::Controller::OnLoad().

Here is the call graph for this function:

◆ GetBottomLayoutOffset()

float yaze::editor::EditorManager::GetBottomLayoutOffset ( ) const
inline

Definition at line 182 of file editor_manager.h.

References yaze::editor::LayoutCoordinator::GetBottomLayoutOffset(), and layout_coordinator_.

Referenced by yaze::Controller::OnLoad().

Here is the call graph for this function:

◆ SetCurrentRom()

absl::Status yaze::editor::EditorManager::SetCurrentRom ( Rom * rom)

◆ GetCurrentRom()

◆ GetCurrentGameData()

auto yaze::editor::EditorManager::GetCurrentGameData ( ) const -> zelda3::GameData*
inline

Definition at line 191 of file editor_manager.h.

References session_coordinator_.

◆ GetCurrentEditorSet()

◆ GetCurrentEditor()

auto yaze::editor::EditorManager::GetCurrentEditor ( ) const -> Editor*
inlineoverridevirtual

◆ GetCurrentRomHash()

std::string yaze::editor::EditorManager::GetCurrentRomHash ( ) const
inline

◆ GetProjectRomRole()

project::RomRole yaze::editor::EditorManager::GetProjectRomRole ( ) const
inline

◆ GetProjectRomWritePolicy()

project::RomWritePolicy yaze::editor::EditorManager::GetProjectRomWritePolicy ( ) const
inline

◆ GetProjectExpectedRomHash()

std::string yaze::editor::EditorManager::GetProjectExpectedRomHash ( ) const
inline

◆ IsRomHashMismatch()

bool yaze::editor::EditorManager::IsRomHashMismatch ( ) const
inline

Definition at line 212 of file editor_manager.h.

References yaze::editor::RomLifecycleManager::IsRomHashMismatch(), and rom_lifecycle_.

Referenced by yaze::editor::PopupManager::DrawRomInfoPopup(), and LoadProjectWithRom().

Here is the call graph for this function:

◆ GetRomBackups()

std::vector< RomFileManager::BackupEntry > yaze::editor::EditorManager::GetRomBackups ( ) const

Definition at line 5884 of file editor_manager.cc.

References GetCurrentRom(), yaze::editor::RomLifecycleManager::GetRomBackups(), and rom_lifecycle_.

Referenced by yaze::editor::PopupManager::DrawRomBackupManagerPopup().

Here is the call graph for this function:

◆ IsRomBackupRestorePending()

bool yaze::editor::EditorManager::IsRomBackupRestorePending ( ) const

◆ RestoreRomBackup()

◆ DiscardPendingRomBackupRestore()

◆ PruneRomBackups()

absl::Status yaze::editor::EditorManager::PruneRomBackups ( )

Definition at line 5990 of file editor_manager.cc.

References GetCurrentRom(), yaze::editor::RomLifecycleManager::PruneRomBackups(), and rom_lifecycle_.

Referenced by yaze::editor::PopupManager::DrawRomBackupManagerPopup().

Here is the call graph for this function:

◆ ConfirmRomWrite()

void yaze::editor::EditorManager::ConfirmRomWrite ( )

◆ CancelRomWriteConfirm()

void yaze::editor::EditorManager::CancelRomWriteConfirm ( )

Definition at line 6002 of file editor_manager.cc.

References CancelPendingRomSave().

Referenced by yaze::editor::PopupManager::DrawRomWriteConfirmPopup().

Here is the call graph for this function:

◆ IsRomWriteConfirmPending()

bool yaze::editor::EditorManager::IsRomWriteConfirmPending ( ) const
inline

Definition at line 220 of file editor_manager.h.

References yaze::editor::RomLifecycleManager::IsRomWriteConfirmPending(), and rom_lifecycle_.

Here is the call graph for this function:

◆ pending_write_conflicts()

const std::vector< core::WriteConflict > & yaze::editor::EditorManager::pending_write_conflicts ( ) const
inline

Definition at line 225 of file editor_manager.h.

References yaze::editor::RomLifecycleManager::pending_write_conflicts(), and rom_lifecycle_.

Referenced by yaze::editor::PopupManager::DrawWriteConflictWarningPopup().

Here is the call graph for this function:

◆ BypassWriteConflictOnce()

void yaze::editor::EditorManager::BypassWriteConflictOnce ( )
inline

Definition at line 228 of file editor_manager.h.

References yaze::editor::RomLifecycleManager::BypassWriteConflictOnce(), and rom_lifecycle_.

Referenced by yaze::editor::PopupManager::DrawWriteConflictWarningPopup().

Here is the call graph for this function:

◆ ClearPendingWriteConflicts()

void yaze::editor::EditorManager::ClearPendingWriteConflicts ( )

Definition at line 6006 of file editor_manager.cc.

References CancelPendingRomSave().

Referenced by yaze::editor::PopupManager::DrawWriteConflictWarningPopup().

Here is the call graph for this function:

◆ SetCurrentEditor()

void yaze::editor::EditorManager::SetCurrentEditor ( Editor * editor)
inlineoverridevirtual

◆ GetCurrentSessionId()

◆ ui_coordinator()

UICoordinator * yaze::editor::EditorManager::ui_coordinator ( )
inline

Definition at line 244 of file editor_manager.h.

References ui_coordinator_.

Referenced by yaze::Controller::OnLoad().

◆ overworld()

yaze::zelda3::Overworld * yaze::editor::EditorManager::overworld ( ) const

Definition at line 5839 of file editor_manager.cc.

References GetCurrentEditorSet().

Referenced by yaze::Controller::overworld().

Here is the call graph for this function:

◆ GetCurrentSessionIndex()

◆ GetCurrentFeatureFlags()

core::FeatureFlags::Flags * yaze::editor::EditorManager::GetCurrentFeatureFlags ( )
inline

Definition at line 251 of file editor_manager.h.

References yaze::editor::RomSession::feature_flags, yaze::core::FeatureFlags::get(), GetCurrentSessionIndex(), and session_coordinator_.

Here is the call graph for this function:

◆ SetFontGlobalScale()

◆ user_settings() [1/2]

◆ user_settings() [2/2]

const UserSettings & yaze::editor::EditorManager::user_settings ( ) const
inline

Definition at line 275 of file editor_manager.h.

References user_settings_.

◆ RefreshWorkspacePresets()

void yaze::editor::EditorManager::RefreshWorkspacePresets ( )
inline

Definition at line 278 of file editor_manager.h.

References yaze::editor::WorkspaceManager::RefreshPresets(), and workspace_manager_.

Referenced by yaze::editor::UICoordinator::DrawWorkspacePresetDialogs().

Here is the call graph for this function:

◆ SaveWorkspacePreset()

void yaze::editor::EditorManager::SaveWorkspacePreset ( const std::string & name)
inline

Definition at line 279 of file editor_manager.h.

References yaze::editor::WorkspaceManager::SaveWorkspacePreset(), and workspace_manager_.

Referenced by yaze::editor::UICoordinator::DrawWorkspacePresetDialogs().

Here is the call graph for this function:

◆ LoadWorkspacePreset()

void yaze::editor::EditorManager::LoadWorkspacePreset ( const std::string & name)
inline

Definition at line 282 of file editor_manager.h.

References yaze::editor::WorkspaceManager::LoadWorkspacePreset(), and workspace_manager_.

Referenced by yaze::editor::UICoordinator::DrawWorkspacePresetDialogs().

Here is the call graph for this function:

◆ SwitchToEditor()

◆ DismissEditorSelection()

void yaze::editor::EditorManager::DismissEditorSelection ( )
overridevirtual

Implements yaze::editor::IEditorSwitcher.

Definition at line 6637 of file editor_manager.cc.

References yaze::editor::kEditor, and ui_coordinator_.

◆ IsPanelBasedEditor()

bool yaze::editor::EditorManager::IsPanelBasedEditor ( EditorType type)
static

Definition at line 505 of file editor_manager.cc.

References yaze::editor::EditorRegistry::IsPanelBasedEditor().

Referenced by DrawInterface(), and yaze::editor::SessionCoordinator::UpdateSessions().

Here is the call graph for this function:

◆ IsSidebarVisible()

bool yaze::editor::EditorManager::IsSidebarVisible ( ) const
inline

Definition at line 293 of file editor_manager.h.

References ui_coordinator_.

◆ SetSidebarVisible()

void yaze::editor::EditorManager::SetSidebarVisible ( bool visible)
inline

Definition at line 296 of file editor_manager.h.

References ui_coordinator_.

◆ EnsureEditorAssetsLoaded()

◆ EnsureGameDataLoaded()

◆ CreateNewSession()

void yaze::editor::EditorManager::CreateNewSession ( )

◆ DuplicateCurrentSession()

void yaze::editor::EditorManager::DuplicateCurrentSession ( )

Definition at line 6017 of file editor_manager.cc.

References session_coordinator_.

◆ CloseCurrentSession()

void yaze::editor::EditorManager::CloseCurrentSession ( )

◆ RemoveSession()

void yaze::editor::EditorManager::RemoveSession ( size_t index)

◆ SwitchToSession()

◆ RequestSwitchToSession()

void yaze::editor::EditorManager::RequestSwitchToSession ( size_t index)
inlineoverridevirtual

Implements yaze::editor::ISessionConfigurator.

Definition at line 312 of file editor_manager.h.

References SwitchToSession().

Here is the call graph for this function:

◆ RequestCloseSession()

void yaze::editor::EditorManager::RequestCloseSession ( size_t index)
inlineoverridevirtual

Implements yaze::editor::ISessionConfigurator.

Definition at line 313 of file editor_manager.h.

References RemoveSession().

Here is the call graph for this function:

◆ GetActiveSessionCount()

size_t yaze::editor::EditorManager::GetActiveSessionCount ( ) const

◆ SaveWorkspaceLayout()

void yaze::editor::EditorManager::SaveWorkspaceLayout ( )
inline

Definition at line 318 of file editor_manager.h.

References yaze::editor::WorkspaceManager::SaveWorkspaceLayout(), and workspace_manager_.

Here is the call graph for this function:

◆ LoadWorkspaceLayout()

void yaze::editor::EditorManager::LoadWorkspaceLayout ( )
inline

Definition at line 319 of file editor_manager.h.

References yaze::editor::WorkspaceManager::LoadWorkspaceLayout(), and workspace_manager_.

Here is the call graph for this function:

◆ ResetWorkspaceLayout()

void yaze::editor::EditorManager::ResetWorkspaceLayout ( )

Definition at line 509 of file editor_manager.cc.

References layout_coordinator_, and yaze::editor::LayoutCoordinator::ResetWorkspaceLayout().

Referenced by HandleUIActionRequest(), and Initialize().

Here is the call graph for this function:

◆ ShowAllWindows()

void yaze::editor::EditorManager::ShowAllWindows ( )
inline

Definition at line 321 of file editor_manager.h.

References ui_coordinator_.

◆ HideAllWindows()

void yaze::editor::EditorManager::HideAllWindows ( )
inline

Definition at line 325 of file editor_manager.h.

References ui_coordinator_.

◆ LoadDeveloperLayout()

void yaze::editor::EditorManager::LoadDeveloperLayout ( )
inline

Definition at line 331 of file editor_manager.h.

References yaze::editor::WindowDelegate::LoadDeveloperLayout(), and window_delegate_.

Here is the call graph for this function:

◆ LoadDesignerLayout()

void yaze::editor::EditorManager::LoadDesignerLayout ( )
inline

Definition at line 332 of file editor_manager.h.

References yaze::editor::WindowDelegate::LoadDesignerLayout(), and window_delegate_.

Here is the call graph for this function:

◆ LoadModderLayout()

void yaze::editor::EditorManager::LoadModderLayout ( )
inline

Definition at line 333 of file editor_manager.h.

References yaze::editor::WindowDelegate::LoadModderLayout(), and window_delegate_.

Here is the call graph for this function:

◆ ApplyLayoutPreset()

void yaze::editor::EditorManager::ApplyLayoutPreset ( const std::string & preset_name)

◆ ApplyLayoutProfile()

◆ CaptureTemporaryLayoutSnapshot()

void yaze::editor::EditorManager::CaptureTemporaryLayoutSnapshot ( )

Definition at line 548 of file editor_manager.cc.

References GetCurrentSessionId(), yaze::editor::kInfo, layout_manager_, yaze::editor::ToastManager::Show(), and toast_manager_.

Here is the call graph for this function:

◆ RestoreTemporaryLayoutSnapshot()

void yaze::editor::EditorManager::RestoreTemporaryLayoutSnapshot ( bool clear_after_restore = false)

Definition at line 556 of file editor_manager.cc.

References GetCurrentSessionId(), yaze::editor::kSuccess, yaze::editor::kWarning, layout_manager_, yaze::editor::ToastManager::Show(), and toast_manager_.

Here is the call graph for this function:

◆ ClearTemporaryLayoutSnapshot()

void yaze::editor::EditorManager::ClearTemporaryLayoutSnapshot ( )

Definition at line 571 of file editor_manager.cc.

References yaze::editor::kInfo, layout_manager_, yaze::editor::ToastManager::Show(), and toast_manager_.

Here is the call graph for this function:

◆ SaveLayoutSnapshotAs()

bool yaze::editor::EditorManager::SaveLayoutSnapshotAs ( const std::string & name)

◆ RestoreLayoutSnapshot()

bool yaze::editor::EditorManager::RestoreLayoutSnapshot ( const std::string & name,
bool remove_after_restore = false )

Definition at line 598 of file editor_manager.cc.

References GetCurrentSessionId(), yaze::editor::kSuccess, yaze::editor::kWarning, layout_manager_, yaze::editor::ToastManager::Show(), and toast_manager_.

Here is the call graph for this function:

◆ DeleteLayoutSnapshot()

bool yaze::editor::EditorManager::DeleteLayoutSnapshot ( const std::string & name)

Definition at line 614 of file editor_manager.cc.

References yaze::editor::kInfo, layout_manager_, yaze::editor::ToastManager::Show(), and toast_manager_.

Here is the call graph for this function:

◆ ListLayoutSnapshots()

std::vector< std::string > yaze::editor::EditorManager::ListLayoutSnapshots ( ) const

Definition at line 625 of file editor_manager.cc.

References GetCurrentSessionId(), and layout_manager_.

Here is the call graph for this function:

◆ ResetCurrentEditorLayout()

◆ GenerateUniqueEditorTitle()

std::string yaze::editor::EditorManager::GenerateUniqueEditorTitle ( EditorType type,
size_t session_index ) const

Definition at line 6596 of file editor_manager.cc.

References yaze::editor::kEditorNames, and session_coordinator_.

◆ HasDuplicateSession()

bool yaze::editor::EditorManager::HasDuplicateSession ( const std::string & filepath)

Definition at line 6669 of file editor_manager.cc.

References session_coordinator_.

◆ RenameSession()

void yaze::editor::EditorManager::RenameSession ( size_t index,
const std::string & new_name )

◆ Quit()

void yaze::editor::EditorManager::Quit ( )

Definition at line 6085 of file editor_manager.cc.

References yaze::editor::EditorManager::PendingUnsavedSessionAction::kQuit, MaybeGuardPendingSessionAction(), and quit_.

Referenced by yaze::Controller::OnInput().

Here is the call graph for this function:

◆ HasPendingUnsavedSessionAction()

bool yaze::editor::EditorManager::HasPendingUnsavedSessionAction ( ) const

◆ GetPendingUnsavedSessionActionPrompt()

◆ GetPendingUnsavedSessionActionSaveLabel()

◆ GetPendingUnsavedSessionActionContinueLabel()

◆ ConfirmPendingUnsavedSessionActionSaveAndContinue()

◆ ConfirmPendingUnsavedSessionActionDiscardAndContinue()

void yaze::editor::EditorManager::ConfirmPendingUnsavedSessionActionDiscardAndContinue ( )

◆ CancelPendingUnsavedSessionAction()

void yaze::editor::EditorManager::CancelPendingUnsavedSessionAction ( )

◆ QueueDeferredAction()

void yaze::editor::EditorManager::QueueDeferredAction ( std::function< void()> action)
inline

Definition at line 368 of file editor_manager.h.

References deferred_actions_, and pending_editor_deferred_actions_.

Referenced by InitializeSubsystems().

◆ GetUiSyncStateSnapshot()

◆ ConfigureSession()

◆ ShowImGuiDemo()

void yaze::editor::EditorManager::ShowImGuiDemo ( )
inline

Definition at line 387 of file editor_manager.h.

References ui_coordinator_.

◆ ShowImGuiMetrics()

void yaze::editor::EditorManager::ShowImGuiMetrics ( )
inline

Definition at line 391 of file editor_manager.h.

References ui_coordinator_.

◆ GetAgentEditor()

AgentEditor * yaze::editor::EditorManager::GetAgentEditor ( )
inline

Definition at line 406 of file editor_manager.h.

◆ GetAgentUiController()

AgentUiController * yaze::editor::EditorManager::GetAgentUiController ( )
inline

Definition at line 407 of file editor_manager.h.

◆ LoadRom()

absl::Status yaze::editor::EditorManager::LoadRom ( )

Load a ROM file into a new or existing session.

DELEGATION:

FLOW:

  1. Show file dialog and get filename
  2. Check for duplicate sessions (prevent opening same ROM twice)
  3. Load ROM via RomFileManager into temp_rom
  4. Find empty session or create new session
  5. Move ROM into session and set current pointers
  6. Configure editor dependencies for the session
  7. Load editor assets (full or lazy mode)
  8. Update UI state and recent files

Definition at line 3608 of file editor_manager.cc.

References GetCurrentSessionId(), yaze::editor::EditorManager::PendingUnsavedSessionAction::kOpenRomDialog, LoadRomInternal(), and MaybeGuardPendingSessionAction().

Referenced by HandleUIActionRequest(), SetupWelcomeScreenCallbacks(), and yaze::editor::UICoordinator::UICoordinator().

Here is the call graph for this function:

◆ SaveRom()

◆ SaveRomAs()

absl::Status yaze::editor::EditorManager::SaveRomAs ( const std::string & filename)

◆ ResumePendingRomSave()

◆ OpenRomOrProject()

◆ CreateNewProject()

absl::Status yaze::editor::EditorManager::CreateNewProject ( const std::string & template_name = "Basic ROM Hack")

Definition at line 4465 of file editor_manager.cc.

References HasAnySessionPendingUnsavedWork(), and ui_coordinator_.

Referenced by SaveProject(), and SetupWelcomeScreenCallbacks().

Here is the call graph for this function:

◆ CreateNewProjectFromRom()

◆ FinalizeNewProject()

◆ OpenProject()

absl::Status yaze::editor::EditorManager::OpenProject ( )

◆ SaveProject()

◆ SaveProjectAs() [1/2]

absl::Status yaze::editor::EditorManager::SaveProjectAs ( )

◆ SaveProjectAs() [2/2]

◆ AutosaveActiveSession()

absl::Status yaze::editor::EditorManager::AutosaveActiveSession ( )

◆ BuildCurrentProject()

absl::Status yaze::editor::EditorManager::BuildCurrentProject ( )

◆ QueueBuildCurrentProject()

◆ CancelQueuedProjectBuild()

void yaze::editor::EditorManager::CancelQueuedProjectBuild ( )

Definition at line 5697 of file editor_manager.cc.

References active_project_build_, yaze::editor::kRunning, MakeBuildStatus(), project_management_panel_, and status_bar_.

Referenced by InitializeSubsystems().

Here is the call graph for this function:

◆ RunCurrentProject()

◆ HasPendingPotItemSaveConfirmation()

bool yaze::editor::EditorManager::HasPendingPotItemSaveConfirmation ( ) const
inline

Definition at line 438 of file editor_manager.h.

References yaze::editor::RomLifecycleManager::HasPendingPotItemSaveConfirmation(), and rom_lifecycle_.

Here is the call graph for this function:

◆ pending_pot_item_unloaded_rooms()

int yaze::editor::EditorManager::pending_pot_item_unloaded_rooms ( ) const
inline

◆ pending_pot_item_total_rooms()

int yaze::editor::EditorManager::pending_pot_item_total_rooms ( ) const
inline

Definition at line 444 of file editor_manager.h.

References yaze::editor::RomLifecycleManager::pending_pot_item_total_rooms(), and rom_lifecycle_.

Referenced by yaze::editor::PopupManager::DrawDungeonPotItemSaveConfirmPopup().

Here is the call graph for this function:

◆ ResolvePotItemSaveConfirmation()

◆ ImportProject()

◆ RepairCurrentProject()

absl::Status yaze::editor::EditorManager::RepairCurrentProject ( )

◆ LoadProjectWithRom()

absl::Status yaze::editor::EditorManager::LoadProjectWithRom ( )

Definition at line 4694 of file editor_manager.cc.

References active_project_build_, active_project_build_reported_, active_project_context_session_id_, 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::UserSettings::Preferences::backup_before_save, yaze::project::WorkspaceSettings::backup_on_save, BindProjectContextToSession(), CaptureActiveProjectContext(), yaze::editor::RomLifecycleManager::CheckRomOpenPolicy(), yaze::editor::StatusBar::ClearProjectWorkflowStatus(), yaze::editor::ContentRegistry::Context::ClearWorkflowHistory(), yaze::project::YazeProject::code_folder, ConfigureEditorDependencies(), current_project_, yaze::project::YazeProject::custom_object_files, yaze::project::YazeProject::custom_objects_folder, DiscardProvisionalSessionCreatedSince(), 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(), yaze::core::FeatureFlags::get(), yaze::zelda3::DrawRoutineRegistry::Get(), yaze::project::YazeProject::GetAbsolutePath(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), yaze::project::YazeProject::GetDisplayName(), yaze::project::RecentFilesManager::GetInstance(), yaze::project::YazeProject::git_repository, yaze::core::VersionManager::InitializeGit(), yaze::Rom::is_loaded(), IsRomHashMismatch(), yaze::editor::WorkspaceWindowManager::kDashboardCategory, yaze::core::FeatureFlags::Flags::kEnableCustomObjects, yaze::editor::kError, yaze::editor::kInfo, yaze::editor::kSuccess, yaze::editor::kWarning, LoadAssetsForMode(), LoadProjectWithRom(), yaze::editor::RomFileManager::LoadRom(), LOG_DEBUG, LOG_INFO, LOG_WARN, yaze::util::MakeRomFileDialogOptions(), pending_project_open_previous_session_id_, pending_project_open_transition_, pending_project_rom_selection_, yaze::editor::UserSettings::prefs(), yaze::editor::RomSession::project_context, project_management_panel_, project_rom_selection_generation_, yaze::zelda3::DrawRoutineRegistry::RefreshFeatureFlagMappings(), RefreshHackWorkflowBackend(), RefreshResourceLabelProvider(), RestoreProjectContextAfterFailedOpen(), RestoreProjectContextForSession(), RETURN_IF_ERROR, yaze::project::YazeProject::rom_address_overrides, rom_file_manager_, yaze::project::YazeProject::rom_filename, rom_lifecycle_, yaze::project::YazeProject::Save(), session_coordinator_, yaze::editor::WorkspaceWindowManager::SetActiveCategory(), yaze::editor::ContentRegistry::Context::SetBuildWorkflowLog(), yaze::editor::ContentRegistry::Context::SetBuildWorkflowStatus(), yaze::editor::ContentRegistry::Context::SetCurrentProject(), yaze::test::TestManager::SetCurrentRom(), yaze::editor::WorkspaceWindowManager::SetFileBrowserPath(), yaze::editor::ContentRegistry::Context::SetRunWorkflowStatus(), yaze::editor::ToastManager::Show(), yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::util::FileDialogWrapper::ShowOpenFileDialogAsync(), status_bar_, toast_manager_, ui_coordinator_, UpdateCurrentRomHash(), user_settings_, ValidateProjectRomSelection(), version_manager_, window_manager_, and yaze::project::YazeProject::workspace_settings.

Referenced by LoadProjectWithRom(), OpenProjectInternal(), and OpenRomOrProjectInternal().

◆ SwapProjectRom()

◆ ReloadProjectRom()

◆ GetCurrentProject() [1/2]

◆ GetCurrentProject() [2/2]

const project::YazeProject * yaze::editor::EditorManager::GetCurrentProject ( ) const
inline

Definition at line 456 of file editor_manager.h.

References current_project_.

◆ MarkCurrentProjectDirty()

void yaze::editor::EditorManager::MarkCurrentProjectDirty ( )

◆ IsCurrentProjectDirty()

bool yaze::editor::EditorManager::IsCurrentProjectDirty ( ) const

◆ GetVersionManager()

core::VersionManager * yaze::editor::EditorManager::GetVersionManager ( )
inline

Definition at line 461 of file editor_manager.h.

References version_manager_.

◆ ShowProjectManagement()

void yaze::editor::EditorManager::ShowProjectManagement ( )

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.

Parameters
editor_setThe set of editors to configure
romThe ROM instance for this session
session_idThe unique ID for this session

Dependencies injected:

  • rom: The ROM data for this session
  • session_id: For creating session-aware card IDs
  • card_registry: For registering and managing editor cards
  • toast_manager: For showing user notifications
  • popup_manager: For displaying modal dialogs
  • shortcut_manager: For editor-specific shortcuts (future)
  • shared_clipboard: For cross-editor data sharing (e.g. tile copying)
  • user_settings: For accessing user preferences
  • renderer: For graphics operations (dungeon/overworld editors)
  • emulator: For accessing emulator functionality (music editor playback)

Definition at line 6698 of file editor_manager.cc.

References CaptureActiveProjectEditingState(), current_project_, GetCurrentRom(), IsCurrentProjectDirty(), yaze::editor::RightDrawerManager::kProject, project_management_panel_, right_drawer_manager_, and version_manager_.

Referenced by SetupWelcomeScreenCallbacks(), and yaze::editor::UICoordinator::UICoordinator().

Here is the call graph for this function:

◆ ShowProjectFileEditor()

◆ project_file_editor()

ProjectFileEditor * yaze::editor::EditorManager::project_file_editor ( )
inline

Definition at line 468 of file editor_manager.h.

References project_file_editor_.

◆ project_management_panel()

ProjectManagementPanel * yaze::editor::EditorManager::project_management_panel ( )
inline

Definition at line 469 of file editor_manager.h.

References project_management_panel_.

◆ DrawRomSelector()

absl::Status yaze::editor::EditorManager::DrawRomSelector ( )
privatedelete

◆ LoadAssets()

◆ LoadAssetsForMode()

absl::Status yaze::editor::EditorManager::LoadAssetsForMode ( uint64_t loading_handle = 0)
private

Definition at line 2718 of file editor_manager.cc.

References asset_load_mode_, yaze::kAuto, yaze::kFull, yaze::kLazy, LoadAssets(), and LoadAssetsLazy().

Referenced by LoadProjectWithRom(), LoadRomInternal(), OpenRomOrProjectInternal(), and ReplaceActiveSessionRom().

Here is the call graph for this function:

◆ LoadAssetsLazy()

◆ InitializeEditorForType()

absl::Status yaze::editor::EditorManager::InitializeEditorForType ( EditorType type,
EditorSet * editor_set,
Rom * rom )
private

Definition at line 2916 of file editor_manager.cc.

References GetEditorByType().

Referenced by EnsureEditorAssetsLoaded().

Here is the call graph for this function:

◆ ResetAssetState()

◆ MarkEditorInitialized()

void yaze::editor::EditorManager::MarkEditorInitialized ( RomSession * session,
EditorType type )
private

Definition at line 2738 of file editor_manager.cc.

References yaze::editor::RomSession::editor_initialized, and yaze::editor::EditorTypeIndex().

Referenced by EnsureEditorAssetsLoaded(), and LoadAssets().

Here is the call graph for this function:

◆ MarkEditorLoaded()

void yaze::editor::EditorManager::MarkEditorLoaded ( RomSession * session,
EditorType type )
private

Definition at line 2749 of file editor_manager.cc.

References yaze::editor::RomSession::editor_assets_loaded, and yaze::editor::EditorTypeIndex().

Referenced by EnsureEditorAssetsLoaded(), and LoadAssets().

Here is the call graph for this function:

◆ GetEditorByType()

Editor * yaze::editor::EditorManager::GetEditorByType ( EditorType type,
EditorSet * editor_set ) const
private

Definition at line 2873 of file editor_manager.cc.

References yaze::editor::EditorSet::GetEditor().

Referenced by EnsureEditorAssetsLoaded(), InitializeEditorForType(), and ResolveEditorForCategory().

Here is the call graph for this function:

◆ ResolveEditorForCategory()

◆ SyncEditorContextForCategory()

void yaze::editor::EditorManager::SyncEditorContextForCategory ( const std::string & category)
private

Definition at line 2906 of file editor_manager.cc.

References yaze::editor::WorkspaceWindowManager::kDashboardCategory, LOG_DEBUG, ResolveEditorForCategory(), and SetCurrentEditor().

Referenced by DrawInterface(), Initialize(), and SetupSidebarCallbacks().

Here is the call graph for this function:

◆ EditorRequiresGameData()

bool yaze::editor::EditorManager::EditorRequiresGameData ( EditorType type) const
private

◆ EditorInitRequiresGameData()

bool yaze::editor::EditorManager::EditorInitRequiresGameData ( EditorType type) const
private

Definition at line 2774 of file editor_manager.cc.

References yaze::editor::kMessage.

Referenced by EnsureEditorAssetsLoaded().

◆ CollectEditorsToPreload()

◆ InitializeTestSuites()

void yaze::editor::EditorManager::InitializeTestSuites ( )
private

Definition at line 1904 of file editor_manager.cc.

References yaze::test::TestManager::Get(), and yaze::test::RegisterZ3edTestSuites().

Referenced by Initialize().

Here is the call graph for this function:

◆ ApplyStartupVisibilityOverrides()

◆ ApplyLayoutDefaultsMigrationIfNeeded()

◆ GetPreferredStartupCategory()

std::string yaze::editor::EditorManager::GetPreferredStartupCategory ( const std::string & saved_category,
const std::vector< std::string > & available_categories ) const
private

Definition at line 2630 of file editor_manager.cc.

Referenced by DrawInterface(), and Initialize().

◆ HandleSessionSwitched()

void yaze::editor::EditorManager::HandleSessionSwitched ( size_t new_index,
RomSession * session,
bool transient = false )
private

Definition at line 1587 of file editor_manager.cc.

References yaze::gfx::PaletteManager::ActivateSession(), CancelPendingRomSave(), CaptureActiveProjectContext(), CaptureRuntimeFeatureFlags(), yaze::editor::SelectionPropertiesPanel::ClearSelection(), yaze::editor::RomSession::editors, yaze::editor::RomSession::feature_flags, yaze::editor::RomSession::game_data, yaze::gfx::PaletteManager::Get(), yaze::test::TestManager::Get(), yaze::core::FeatureFlags::get(), yaze::editor::WorkspaceWindowManager::GetActiveCategory(), yaze::editor::EditorSet::GetSettingsPanel(), yaze::editor::WorkspaceWindowManager::kDashboardCategory, LOG_DEBUG, LOG_ERROR, yaze::editor::UserSettings::Preferences::panel_visibility_state, pending_project_open_previous_session_id_, pending_project_open_transition_, pending_project_rom_selection_, yaze::editor::UserSettings::prefs(), project_rom_selection_generation_, RefreshResourceLabelProvider(), ResolveEditorForCategory(), RestoreProjectContextForSession(), yaze::editor::WorkspaceWindowManager::RestoreVisibilityState(), right_drawer_manager_, yaze::editor::RomSession::rom, runtime_feature_flags_session_id_, selection_properties_panel_, yaze::editor::RomSession::session_id(), SetCurrentEditor(), yaze::test::TestManager::SetCurrentRom(), yaze::editor::ContentRegistry::Context::SetEditorWindowContext(), yaze::editor::ContentRegistry::Context::SetGameData(), yaze::editor::ContentRegistry::Context::SetRom(), yaze::editor::SelectionPropertiesPanel::SetRom(), UpdateCurrentRomHash(), user_settings_, and window_manager_.

Referenced by SubscribeToEvents().

◆ HandleSessionCreated()

◆ HandleSessionClosed()

◆ SubscribeToEvents()

◆ InitializeSubsystems()

void yaze::editor::EditorManager::InitializeSubsystems ( )
private

Definition at line 692 of file editor_manager.cc.

References activity_bar_, agent_ui_, ApplyLayoutPreset(), yaze::project::YazeProject::assets_folder, CancelQueuedProjectBuild(), yaze::project::YazeProject::code_folder, CommitRawProjectFileSave(), current_project_, editor_activator_, editor_registry_, yaze::editor::EditorActivator::Dependencies::ensure_editor_assets_loaded, EnsureEditorAssetsLoaded(), yaze::editor::EditorActivator::Dependencies::event_bus, event_bus_, yaze::editor::EditorActivator::Dependencies::get_current_editor_set, yaze::editor::EditorActivator::Dependencies::get_current_session_id, yaze::editor::AgentEditor::GetAgentChat(), yaze::editor::AgentUiController::GetAgentEditor(), GetCurrentEditorSet(), GetCurrentSessionId(), ICON_MD_FOLDER_OPEN, ICON_MD_KEYBOARD, ICON_MD_SETTINGS, ICON_MD_TERMINAL, yaze::editor::LayoutCoordinator::Initialize(), yaze::editor::EditorActivator::Initialize(), yaze::editor::RomLifecycleManager::Initialize(), yaze::editor::RightDrawerManager::kAgentChat, yaze::editor::kDungeon, yaze::editor::kError, yaze::editor::kSuccess, layout_coordinator_, yaze::editor::LayoutCoordinator::Dependencies::layout_manager, yaze::editor::EditorActivator::Dependencies::layout_manager, layout_manager_, yaze::util::MakeRomFileDialogOptions(), MarkCurrentProjectDirty(), yaze::editor::WorkspaceWindowManager::MarkWindowRecentlyUsed(), menu_builder_, menu_orchestrator_, yaze::editor::WorkspaceWindowManager::OpenWindow(), popup_manager(), popup_manager_, PrepareRawProjectFileSave(), project_file_editor_, project_management_panel_, project_manager_, yaze::project::YazeProject::project_opened(), proposal_drawer_, yaze::editor::EditorActivator::Dependencies::queue_deferred_action, QueueBuildCurrentProject(), QueueDeferredAction(), RefreshHackWorkflowBackend(), yaze::editor::WorkspaceWindowManager::RegisterWindowContent(), ReloadProjectRom(), yaze::editor::LayoutCoordinator::Dependencies::right_drawer_manager, yaze::editor::EditorActivator::Dependencies::right_drawer_manager, right_drawer_manager_, rom_file_manager_, yaze::project::YazeProject::rom_filename, rom_lifecycle_, RunCurrentProject(), SaveProject(), selection_properties_panel_, session_coordinator_, yaze::editor::AgentChat::set_active(), yaze::editor::WindowDelegate::set_apply_preset_callback(), yaze::editor::WorkspaceManager::set_apply_preset_callback(), yaze::editor::WorkspaceManager::set_layout_manager(), yaze::editor::SelectionPropertiesPanel::SetAgentCallbacks(), yaze::editor::StatusBar::SetAgentToggleCallback(), yaze::editor::ContentRegistry::Context::SetCancelBuildWorkflowCallback(), yaze::editor::ContentRegistry::Context::SetEventBus(), yaze::editor::WorkspaceWindowManager::SetEventBus(), yaze::editor::WorkspaceWindowManager::SetFileBrowserPath(), yaze::editor::ContentRegistry::Context::SetLayoutManager(), yaze::editor::ContentRegistry::Context::SetRunProjectWorkflowCallback(), yaze::editor::ProjectFileEditor::SetSaveCompleteCallback(), yaze::editor::ProjectFileEditor::SetSaveGuardCallback(), yaze::editor::ContentRegistry::Context::SetShowWorkflowOutputCallback(), yaze::editor::ContentRegistry::Context::SetStartBuildWorkflowCallback(), yaze::editor::ContentRegistry::Context::SetUserSettings(), shortcut_manager_, yaze::editor::ToastManager::Show(), yaze::editor::AgentUiController::ShowAgent(), yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::util::FileDialogWrapper::ShowOpenFolderDialog(), yaze::editor::LayoutCoordinator::Dependencies::status_bar, status_bar_, SwapProjectRom(), toast_manager(), yaze::editor::LayoutCoordinator::Dependencies::toast_manager, yaze::editor::EditorActivator::Dependencies::toast_manager, toast_manager_, yaze::editor::WorkspaceWindowManager::TriggerOpenRom(), yaze::editor::WorkspaceWindowManager::TriggerShowCommandPalette(), yaze::editor::WorkspaceWindowManager::TriggerShowSettings(), yaze::editor::WorkspaceWindowManager::TriggerShowShortcuts(), yaze::editor::LayoutCoordinator::Dependencies::ui_coordinator, yaze::editor::EditorActivator::Dependencies::ui_coordinator, ui_coordinator_, user_settings_, window_delegate_, window_host_, yaze::editor::LayoutCoordinator::Dependencies::window_manager, yaze::editor::EditorActivator::Dependencies::window_manager, window_manager_, and workspace_manager_.

Referenced by EditorManager().

◆ RegisterEditors()

◆ RegisterEmulatorPanels()

◆ InitializeServices()

void yaze::editor::EditorManager::InitializeServices ( )
private

Definition at line 2108 of file editor_manager.cc.

References agent_ui_, ApplyLayoutDefaultsMigrationIfNeeded(), yaze::gui::ThemeManager::ApplyTheme(), yaze::editor::AgentUiController::ApplyUserSettingsDefaults(), yaze::gui::Animator::ClampMotionProfile(), yaze::editor::UserSettings::Preferences::font_global_scale, yaze::gui::ThemeManager::Get(), yaze::TimingManager::Get(), yaze::i18n::LanguageManager::Get(), yaze::gui::GetAnimator(), yaze::TimingManager::GetElapsedTime(), yaze::app::platform::WasmControlApi::Initialize(), yaze::app::platform::WasmSessionBridge::Initialize(), yaze::editor::AgentUiController::Initialize(), yaze::editor::UserSettings::Preferences::last_theme_name, yaze::editor::UserSettings::Load(), LOG_INFO, LOG_WARN, pending_layout_defaults_reset_, yaze::editor::UserSettings::Preferences::pinned_panels, yaze::editor::UserSettings::Preferences::prefer_hmagic_sprite_names, yaze::editor::UserSettings::prefs(), project_file_editor_, proposal_drawer_, yaze::editor::WorkspaceWindowManager::RestorePinnedState(), right_drawer_manager_, yaze::editor::UserSettings::Preferences::right_panel_widths, yaze::SetActiveFontIndex(), yaze::i18n::LanguageManager::SetLanguage(), yaze::gui::Animator::SetMotionPreferences(), yaze::i18n::LanguageManager::SetOnLanguageChangedCallback(), yaze::gui::ThemeManager::SetOnThemeChangedCallback(), yaze::zelda3::SetPreferHmagicSpriteNames(), settings_dirty_, settings_dirty_timestamp_, yaze::editor::ProjectFileEditor::SetToastManager(), status_, toast_manager_, user_settings_, and window_manager_.

Referenced by Initialize().

◆ SetupComponentCallbacks()

void yaze::editor::EditorManager::SetupComponentCallbacks ( )
private

Definition at line 2211 of file editor_manager.cc.

References SetupDialogCallbacks(), SetupSidebarCallbacks(), and SetupWelcomeScreenCallbacks().

Referenced by Initialize().

Here is the call graph for this function:

◆ SetupDialogCallbacks()

◆ SetupWelcomeScreenCallbacks()

◆ SetupSidebarCallbacks()

void yaze::editor::EditorManager::SetupSidebarCallbacks ( )
private

Definition at line 2337 of file editor_manager.cc.

References yaze::editor::WorkspaceWindowManager::EnableFileBrowser(), yaze::TimingManager::Get(), yaze::editor::WorkspaceWindowManager::GetActiveSessionId(), GetCurrentEditorSet(), yaze::editor::LayoutPresets::GetDefaultWindows(), yaze::editor::EditorRegistry::GetEditorTypeFromCategory(), yaze::TimingManager::GetElapsedTime(), yaze::editor::WorkspaceWindowManager::GetWindowsInCategory(), yaze::editor::kAssembly, yaze::editor::WorkspaceWindowManager::kDashboardCategory, yaze::editor::kEditor, yaze::editor::kSettings, yaze::editor::kUnknown, yaze::editor::WorkspaceWindowManager::OpenWindow(), yaze::editor::UserSettings::Preferences::panel_browser_category_width, yaze::editor::UserSettings::Preferences::panel_visibility_state, yaze::editor::UserSettings::prefs(), ResolveEditorForCategory(), yaze::editor::WorkspaceWindowManager::RestoreVisibilityState(), yaze::editor::WorkspaceWindowManager::SetCategoryChangedCallback(), yaze::editor::WorkspaceWindowManager::SetEditorResolver(), yaze::editor::ContentRegistry::Context::SetEditorWindowContext(), yaze::editor::WorkspaceWindowManager::SetFileClickedCallback(), yaze::editor::WorkspaceWindowManager::SetOnWindowCategorySelectedCallback(), yaze::editor::WorkspaceWindowManager::SetOnWindowClickedCallback(), yaze::editor::WorkspaceWindowManager::SetPanelBrowserCategoryWidthChangedCallback(), yaze::editor::WorkspaceWindowManager::SetSidebarStateChangedCallback(), yaze::editor::WorkspaceWindowManager::SetSidePanelWidthChangedCallback(), settings_dirty_, settings_dirty_timestamp_, yaze::editor::UserSettings::Preferences::sidebar_active_category, yaze::editor::UserSettings::Preferences::sidebar_panel_width, SwitchToEditor(), SyncEditorContextForCategory(), ui_coordinator_, user_settings_, and window_manager_.

Referenced by SetupComponentCallbacks().

◆ InitializeShortcutSystem()

◆ ProcessInput()

void yaze::editor::EditorManager::ProcessInput ( )
private

Definition at line 3053 of file editor_manager.cc.

References yaze::editor::ExecuteShortcuts(), yaze::TimingManager::Get(), shortcut_manager_, and yaze::TimingManager::Update().

Referenced by Update().

Here is the call graph for this function:

◆ UpdateEditorState()

◆ PollProjectWorkflowTasks()

◆ DrawInterface()

void yaze::editor::EditorManager::DrawInterface ( )
private

Definition at line 3217 of file editor_manager.cc.

References activity_bar_, yaze::editor::AgentUIContext::agent_config(), agent_ui_, yaze::editor::StatusBar::ClearAgentInfo(), yaze::editor::StatusBar::ClearEditorContributions(), yaze::editor::StatusBar::ClearProjectWorkflowStatus(), yaze::editor::Editor::ContributeStatus(), current_editor_, current_project_, dashboard_mode_override_, dashboard_panel_, yaze::Rom::dirty(), yaze::editor::StatusBar::Draw(), yaze::editor::RomLoadOptionsDialog::Draw(), DrawSecondaryWindows(), yaze::editor::WorkspaceWindowManager::DrawVisibleWindows(), yaze::gfx::PerformanceDashboard::Get(), yaze::editor::WorkspaceWindowManager::GetActiveCategory(), yaze::editor::WorkspaceWindowManager::GetActiveSessionId(), yaze::editor::AgentUiController::GetAgentEditor(), yaze::editor::EditorRegistry::GetAllEditorCategories(), yaze::editor::AgentUiController::GetContext(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), GetCurrentSessionIndex(), yaze::editor::EditorRegistry::GetEditorCategory(), GetPreferredStartupCategory(), yaze::Rom::is_loaded(), IsPanelBasedEditor(), yaze::editor::kDungeon, yaze::kShow, yaze::editor::UserSettings::Preferences::panel_visibility_state, yaze::editor::UserSettings::prefs(), yaze::project::YazeProject::project_opened(), yaze::gfx::PerformanceDashboard::Render(), yaze::editor::WorkspaceWindowManager::RestoreVisibilityState(), right_drawer_manager_, rom_load_options_dialog_, RunEmulator(), session_coordinator_, yaze::editor::WorkspaceWindowManager::SetActiveCategory(), yaze::editor::StatusBar::SetAgentInfo(), yaze::editor::StatusBar::SetCustomSegment(), yaze::editor::StatusBar::SetRom(), yaze::editor::StatusBar::SetSessionInfo(), show_rom_load_options_, startup_editor_hint_, startup_panel_hints_, status_bar_, SyncEditorContextForCategory(), yaze::editor::StatusBarSegmentOptions::tooltip, ui_coordinator_, UpdateSystemUIs(), user_settings_, and window_manager_.

Referenced by Update().

◆ DrawSecondaryWindows()

◆ UpdateSystemUIs()

◆ RunEmulator()

◆ RefreshHackWorkflowBackend()

◆ HandleSessionRomLoaded()

◆ RefreshResourceLabelProvider()

◆ HandleUIActionRequest()

◆ BuildInputConfigFromSettings()

emu::input::InputConfig yaze::editor::EditorManager::BuildInputConfigFromSettings ( ) const
private

◆ PersistInputConfig()

void yaze::editor::EditorManager::PersistInputConfig ( const emu::input::InputConfig & config)
private

◆ UpdateCurrentRomHash()

◆ ApplyDefaultBackupPolicy()

void yaze::editor::EditorManager::ApplyDefaultBackupPolicy ( )
private

◆ CaptureRuntimeFeatureFlags()

◆ CaptureActiveProjectEditingState()

◆ CaptureActiveProjectContext()

◆ DetachActiveProjectContext()

void yaze::editor::EditorManager::DetachActiveProjectContext ( )
private

◆ BindProjectContextToSession()

◆ RestoreProjectContextForSession()

◆ RestoreProjectEditingStateForSession()

◆ SaveActiveProjectEditingWork()

◆ PrepareRawProjectFileSave()

◆ CommitRawProjectFileSave()

◆ ReplaceActiveSessionRom()

◆ ProjectFileDraftTargetsCurrentProject()

bool yaze::editor::EditorManager::ProjectFileDraftTargetsCurrentProject ( ) const
private

◆ RebaseCleanProjectFileDraft()

◆ RestoreProjectContextAfterFailedOpen()

◆ DiscardProvisionalSessionCreatedSince()

absl::Status yaze::editor::EditorManager::DiscardProvisionalSessionCreatedSince ( size_t previous_session_count)
private

◆ ApplyCurrentProjectRuntimeContext()

void yaze::editor::EditorManager::ApplyCurrentProjectRuntimeContext ( )
private

Definition at line 1459 of file editor_manager.cc.

References ApplyDefaultBackupPolicy(), yaze::editor::RomLifecycleManager::ApplyDefaultBackupPolicy(), 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::UserSettings::Preferences::backup_before_save, yaze::project::WorkspaceSettings::backup_keep_daily, yaze::project::WorkspaceSettings::backup_keep_daily_days, yaze::project::WorkspaceSettings::backup_on_save, yaze::project::WorkspaceSettings::backup_retention_count, yaze::zelda3::CustomObjectManager::ClearObjectFileMap(), current_project_, yaze::project::YazeProject::custom_object_files, yaze::project::YazeProject::custom_objects_folder, yaze::project::YazeProject::feature_flags, yaze::editor::UserSettings::Preferences::font_global_scale, yaze::project::WorkspaceSettings::font_global_scale, yaze::core::FeatureFlags::get(), yaze::core::RomSettings::Get(), yaze::zelda3::CustomObjectManager::Get(), yaze::zelda3::DrawRoutineRegistry::Get(), yaze::project::YazeProject::GetAbsolutePath(), GetCurrentRom(), yaze::zelda3::CustomObjectManager::Initialize(), yaze::editor::UserSettings::prefs(), project_management_panel_, yaze::project::YazeProject::project_opened(), yaze::zelda3::DrawRoutineRegistry::RefreshFeatureFlagMappings(), RefreshHackWorkflowBackend(), yaze::project::YazeProject::rom_address_overrides, yaze::project::YazeProject::rom_backup_folder, rom_lifecycle_, session_coordinator_, yaze::core::RomSettings::SetAddressOverrides(), yaze::editor::ContentRegistry::Context::SetCurrentProject(), yaze::zelda3::CustomObjectManager::SetObjectFileMap(), yaze::editor::RomLifecycleManager::SetProjectContext(), SyncLayoutScopeFromCurrentProject(), user_settings_, version_manager_, and yaze::project::YazeProject::workspace_settings.

Referenced by CommitRawProjectFileSave(), FinalizeNewProject(), LoadRomInternal(), ReplaceActiveSessionRom(), RestoreProjectContextAfterFailedOpen(), RestoreProjectContextForSession(), and SwapProjectRom().

◆ PrepareActiveProjectContextForSave()

absl::StatusOr< const project::YazeProject * > yaze::editor::EditorManager::PrepareActiveProjectContextForSave ( )
private

Definition at line 1564 of file editor_manager.cc.

References active_project_context_session_id_, CaptureActiveProjectContext(), CaptureRuntimeFeatureFlags(), and session_coordinator_.

Referenced by SaveRomInternal().

Here is the call graph for this function:

◆ MakeBuildStatus()

ProjectWorkflowStatus yaze::editor::EditorManager::MakeBuildStatus ( const std::string & summary,
const std::string & detail,
ProjectWorkflowState state,
const std::string & output_tail = "",
bool can_cancel = false ) const
private

◆ MakeRunStatus()

ProjectWorkflowStatus yaze::editor::EditorManager::MakeRunStatus ( const std::string & summary,
const std::string & detail,
ProjectWorkflowState state ) const
private

Definition at line 5578 of file editor_manager.cc.

References yaze::editor::ProjectWorkflowStatus::visible.

Referenced by RunCurrentProject().

◆ RunProjectBuildCommand()

absl::StatusOr< std::string > yaze::editor::EditorManager::RunProjectBuildCommand ( )
private

◆ ResolveProjectBuildCommand()

absl::StatusOr< std::string > yaze::editor::EditorManager::ResolveProjectBuildCommand ( ) const
private

◆ ResolveProjectRunTarget()

◆ CheckRomWritePolicy()

absl::Status yaze::editor::EditorManager::CheckRomWritePolicy ( const std::optional< std::string > & target_filename = std::nullopt)
private

Save the current ROM file.

DELEGATION:

RESPONSIBILITIES STILL IN EDITORMANAGER:

  • Coordinating editor saves (dungeon maps, overworld maps, graphics sheets)
  • Checking feature flags to determine what to save
  • Accessing current session's editors

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 3957 of file editor_manager.cc.

References yaze::editor::RomLifecycleManager::CheckRomWritePolicy(), GetCurrentRom(), and rom_lifecycle_.

Referenced by SaveRomInternal().

Here is the call graph for this function:

◆ CheckOracleRomSafetyPreSave()

absl::Status yaze::editor::EditorManager::CheckOracleRomSafetyPreSave ( Rom * rom)
private

Definition at line 3962 of file editor_manager.cc.

References yaze::editor::RomLifecycleManager::CheckOracleRomSafetyPreSave(), and rom_lifecycle_.

Referenced by SaveRomInternal().

Here is the call graph for this function:

◆ SaveRomInternal()

absl::Status yaze::editor::EditorManager::SaveRomInternal ( const std::optional< std::string > & save_as_filename)
private

Definition at line 4044 of file editor_manager.cc.

References yaze::core::HackManifest::AnalyzePcWriteRanges(), yaze::editor::RomLifecycleManager::ApplyDefaultBackupPolicy(), ASSIGN_OR_RETURN, yaze::editor::UserSettings::Preferences::backup_before_save, yaze::project::WorkspaceSettings::backup_keep_daily, yaze::project::WorkspaceSettings::backup_keep_daily_days, yaze::project::WorkspaceSettings::backup_on_save, yaze::project::WorkspaceSettings::backup_retention_count, yaze::editor::RomLifecycleManager::CancelRomWriteConfirm(), CheckOracleRomSafetyPreSave(), CheckRomWritePolicy(), yaze::editor::RomLifecycleManager::ClearPotItemBypass(), yaze::ScopedRomTransaction::Commit(), yaze::rom::ComputeDiffRanges(), yaze::editor::RomLifecycleManager::ConsumeWriteConflictBypass(), current_project_, yaze::core::FeatureFlags::Flags::dungeon, EnsureEditorAssetsLoaded(), yaze::gfx::Arena::Get(), yaze::core::FeatureFlags::get(), yaze::project::YazeProject::GetAbsolutePath(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), yaze::project::RecentFilesManager::GetInstance(), yaze::project::YazeProject::hack_manifest, yaze::editor::RomLifecycleManager::HasPendingPotItemSaveConfirmation(), yaze::editor::RomLifecycleManager::IsRomWriteConfirmPending(), yaze::editor::kDungeon, yaze::editor::PopupID::kDungeonPotItemSaveConfirm, yaze::editor::kMessage, yaze::editor::kOverworld, yaze::editor::PopupID::kSaveAs, yaze::core::FeatureFlags::Flags::Dungeon::kSavePotItems, yaze::editor::kScreen, yaze::editor::kWarning, yaze::editor::PopupID::kWriteConflictWarning, yaze::core::HackManifest::loaded(), LOG_DEBUG, yaze::editor::RomLifecycleManager::pending_pot_item_unloaded_rooms(), yaze::editor::RomLifecycleManager::pending_write_conflicts(), popup_manager_, yaze::editor::UserSettings::prefs(), PrepareActiveProjectContextForSave(), yaze::project::YazeProject::project_opened(), RETURN_IF_ERROR, yaze::project::YazeProject::rom_backup_folder, rom_file_manager_, rom_lifecycle_, yaze::zelda3::SaveAllGraphicsData(), yaze::editor::RomFileManager::SaveRom(), yaze::editor::RomFileManager::SaveRomAs(), session_coordinator_, yaze::editor::RomLifecycleManager::SetPendingWriteConflicts(), yaze::editor::RomLifecycleManager::SetPotItemConfirmPending(), yaze::editor::RomLifecycleManager::SetProjectContext(), yaze::editor::RomLifecycleManager::ShouldBypassPotItemConfirm(), yaze::editor::RomLifecycleManager::ShouldBypassWriteConflict(), yaze::editor::RomLifecycleManager::ShouldSuppressPotItemSave(), yaze::editor::ToastManager::Show(), toast_manager_, UpdateCurrentRomHash(), user_settings_, and yaze::project::YazeProject::workspace_settings.

Referenced by ResumePendingRomSave(), SaveRom(), and SaveRomAs().

◆ HasPendingRomSaveConfirmation()

◆ PendingRomSaveMatchesActiveSession()

bool yaze::editor::EditorManager::PendingRomSaveMatchesActiveSession ( ) const
private

◆ FinishPendingRomSaveAttempt()

void yaze::editor::EditorManager::FinishPendingRomSaveAttempt ( const absl::Status & status)
private

Definition at line 4011 of file editor_manager.cc.

References CancelPendingRomSave(), and HasPendingRomSaveConfirmation().

Referenced by ResumePendingRomSave(), SaveRom(), and SaveRomAs().

Here is the call graph for this function:

◆ CancelPendingRomSave()

◆ StartPendingRomSave()

absl::Status yaze::editor::EditorManager::StartPendingRomSave ( const std::optional< std::string > & save_as_filename)
private

Definition at line 3997 of file editor_manager.cc.

References CancelPendingRomSave(), GetCurrentRom(), GetCurrentSessionIndex(), pending_rom_save_, and session_coordinator_.

Referenced by SaveRom(), and SaveRomAs().

Here is the call graph for this function:

◆ LoadRomInternal()

◆ OpenRomOrProjectInternal()

absl::Status yaze::editor::EditorManager::OpenRomOrProjectInternal ( const std::string & filename)
private

◆ OpenProjectInternal()

◆ ValidateProjectRomSelection()

◆ ResolveSessionIndexById()

◆ MaybeGuardPendingSessionAction()

◆ ExecutePendingUnsavedSessionAction()

◆ SessionHasPendingUnsavedWork()

bool yaze::editor::EditorManager::SessionHasPendingUnsavedWork ( size_t session_index) const
private

◆ SessionHasPendingRomWork()

bool yaze::editor::EditorManager::SessionHasPendingRomWork ( size_t session_index) const
private

◆ HasAnySessionPendingUnsavedWork()

bool yaze::editor::EditorManager::HasAnySessionPendingUnsavedWork ( ) const
private

Definition at line 6427 of file editor_manager.cc.

References ModifiedSessionCount().

Referenced by CreateNewProject(), CreateNewProjectFromRom(), and MaybeGuardPendingSessionAction().

Here is the call graph for this function:

◆ HasPendingDungeonChangesForSession()

bool yaze::editor::EditorManager::HasPendingDungeonChangesForSession ( size_t session_index) const
private

◆ PendingDungeonRoomCountForSession()

int yaze::editor::EditorManager::PendingDungeonRoomCountForSession ( size_t session_index) const
private

Definition at line 6451 of file editor_manager.cc.

References yaze::editor::kDungeon, and session_coordinator_.

Referenced by DescribePendingUnsavedWork().

◆ PendingPaletteColorCountForSession()

size_t yaze::editor::EditorManager::PendingPaletteColorCountForSession ( size_t session_index) const
private

Definition at line 6471 of file editor_manager.cc.

References yaze::gfx::PaletteManager::Get(), yaze::gfx::PaletteManager::GetModifiedColorCount(), and session_coordinator_.

Referenced by DescribePendingUnsavedWork().

Here is the call graph for this function:

◆ ModifiedSessionCount()

int yaze::editor::EditorManager::ModifiedSessionCount ( ) const
private

◆ DescribePendingUnsavedWork()

std::string yaze::editor::EditorManager::DescribePendingUnsavedWork ( size_t session_index) const
private

◆ DescribeAllPendingUnsavedWork()

std::string yaze::editor::EditorManager::DescribeAllPendingUnsavedWork ( ) const
private

Definition at line 6544 of file editor_manager.cc.

References DescribePendingUnsavedWork(), ModifiedSessionCount(), session_coordinator_, and SessionHasPendingUnsavedWork().

Referenced by GetPendingUnsavedSessionActionPrompt().

Here is the call graph for this function:

◆ ConfigureEditorDependencies()

◆ SyncLayoutScopeFromCurrentProject()

void yaze::editor::EditorManager::SyncLayoutScopeFromCurrentProject ( )
private

Member Data Documentation

◆ quit_

bool yaze::editor::EditorManager::quit_ = false
private

Definition at line 534 of file editor_manager.h.

Referenced by ExecutePendingUnsavedSessionAction(), Quit(), and quit().

◆ show_workspace_layout

bool yaze::editor::EditorManager::show_workspace_layout = false
private

Definition at line 540 of file editor_manager.h.

◆ session_to_rename_

size_t yaze::editor::EditorManager::session_to_rename_ = 0
private

Definition at line 541 of file editor_manager.h.

◆ session_rename_buffer_

char yaze::editor::EditorManager::session_rename_buffer_[256] = {}
private

Definition at line 542 of file editor_manager.h.

◆ proposal_drawer_

ProposalDrawer yaze::editor::EditorManager::proposal_drawer_
private

Definition at line 548 of file editor_manager.h.

Referenced by InitializeServices(), InitializeSubsystems(), and UpdateSystemUIs().

◆ show_proposal_drawer_

bool yaze::editor::EditorManager::show_proposal_drawer_ = false
private

Definition at line 549 of file editor_manager.h.

◆ agent_ui_

AgentUiController yaze::editor::EditorManager::agent_ui_
private

◆ project_file_editor_

◆ dashboard_panel_

std::unique_ptr<DashboardPanel> yaze::editor::EditorManager::dashboard_panel_
private

◆ welcome_screen_

WelcomeScreen yaze::editor::EditorManager::welcome_screen_
private

Definition at line 560 of file editor_manager.h.

Referenced by SetupWelcomeScreenCallbacks().

◆ rom_load_options_dialog_

RomLoadOptionsDialog yaze::editor::EditorManager::rom_load_options_dialog_
private

Definition at line 561 of file editor_manager.h.

Referenced by DrawInterface(), LoadRomInternal(), and SetupDialogCallbacks().

◆ show_rom_load_options_

bool yaze::editor::EditorManager::show_rom_load_options_ = false
private

Definition at line 562 of file editor_manager.h.

Referenced by DrawInterface(), LoadRomInternal(), and SetupDialogCallbacks().

◆ welcome_mode_override_

StartupVisibility yaze::editor::EditorManager::welcome_mode_override_ = StartupVisibility::kAuto
private

◆ dashboard_mode_override_

StartupVisibility yaze::editor::EditorManager::dashboard_mode_override_ = StartupVisibility::kAuto
private

◆ sidebar_mode_override_

StartupVisibility yaze::editor::EditorManager::sidebar_mode_override_ = StartupVisibility::kAuto
private

◆ asset_load_mode_

AssetLoadMode yaze::editor::EditorManager::asset_load_mode_ = AssetLoadMode::kFull
private

Definition at line 566 of file editor_manager.h.

Referenced by asset_load_mode(), LoadAssetsForMode(), and SetAssetLoadMode().

◆ startup_editor_hint_

std::string yaze::editor::EditorManager::startup_editor_hint_
private

◆ startup_panel_hints_

std::vector<std::string> yaze::editor::EditorManager::startup_panel_hints_
private

◆ selection_properties_panel_

SelectionPropertiesPanel yaze::editor::EditorManager::selection_properties_panel_
private

◆ project_management_panel_

◆ version_

std::string yaze::editor::EditorManager::version_ = ""
private

Definition at line 576 of file editor_manager.h.

Referenced by EditorManager(), and version().

◆ status_

absl::Status yaze::editor::EditorManager::status_
private

◆ emulator_

emu::Emulator yaze::editor::EditorManager::emulator_
private

◆ current_editor_

Editor* yaze::editor::EditorManager::current_editor_ = nullptr
private

◆ renderer_

gfx::IRenderer* yaze::editor::EditorManager::renderer_ = nullptr
private

◆ current_project_

◆ pending_project_rom_selection_

std::optional<PendingProjectRomSelection> yaze::editor::EditorManager::pending_project_rom_selection_
private

◆ project_rom_selection_generation_

uint64_t yaze::editor::EditorManager::project_rom_selection_generation_ = 0
private

Definition at line 594 of file editor_manager.h.

Referenced by HandleSessionSwitched(), and LoadProjectWithRom().

◆ pending_project_open_transition_

bool yaze::editor::EditorManager::pending_project_open_transition_ = false
private

◆ pending_project_open_previous_session_id_

std::optional<size_t> yaze::editor::EditorManager::pending_project_open_previous_session_id_
private

◆ active_project_context_session_id_

◆ runtime_feature_flags_session_id_

◆ version_manager_

◆ shared_clipboard_

SharedClipboard yaze::editor::EditorManager::shared_clipboard_
private

Definition at line 607 of file editor_manager.h.

Referenced by ConfigureEditorDependencies().

◆ popup_manager_

◆ toast_manager_

◆ menu_builder_

MenuBuilder yaze::editor::EditorManager::menu_builder_
private

Definition at line 610 of file editor_manager.h.

Referenced by InitializeSubsystems(), and menu_builder().

◆ shortcut_manager_

ShortcutManager yaze::editor::EditorManager::shortcut_manager_
private

◆ user_settings_

◆ window_manager_

◆ window_host_

std::unique_ptr<WindowHost> yaze::editor::EditorManager::window_host_
private

◆ editor_registry_

EditorRegistry yaze::editor::EditorManager::editor_registry_
private

Definition at line 618 of file editor_manager.h.

Referenced by Initialize(), InitializeShortcutSystem(), and InitializeSubsystems().

◆ menu_orchestrator_

std::unique_ptr<MenuOrchestrator> yaze::editor::EditorManager::menu_orchestrator_
private

◆ project_manager_

ProjectManager yaze::editor::EditorManager::project_manager_
private

◆ rom_file_manager_

◆ ui_coordinator_

◆ window_delegate_

WindowDelegate yaze::editor::EditorManager::window_delegate_
private

◆ editor_activator_

EditorActivator yaze::editor::EditorManager::editor_activator_
private

Definition at line 624 of file editor_manager.h.

Referenced by InitializeSubsystems(), and SwitchToEditor().

◆ session_coordinator_

std::unique_ptr<SessionCoordinator> yaze::editor::EditorManager::session_coordinator_
private

Definition at line 625 of file editor_manager.h.

Referenced by ApplyCurrentProjectRuntimeContext(), AutosaveActiveSession(), CaptureActiveProjectContext(), CaptureActiveProjectEditingState(), CaptureRuntimeFeatureFlags(), CloseCurrentSession(), CommitRawProjectFileSave(), ConfigureEditorDependencies(), ConfirmPendingUnsavedSessionActionSaveAndContinue(), CreateNewProjectFromRom(), CreateNewSession(), DescribeAllPendingUnsavedWork(), DescribePendingUnsavedWork(), DiscardPendingRomBackupRestore(), DiscardProvisionalSessionCreatedSince(), DrawInterface(), DuplicateCurrentSession(), EnsureEditorAssetsLoaded(), EnsureGameDataLoaded(), ExecutePendingUnsavedSessionAction(), FinalizeNewProject(), GenerateUniqueEditorTitle(), GetActiveSessionCount(), GetCurrentEditorSet(), GetCurrentFeatureFlags(), GetCurrentGameData(), GetCurrentRom(), GetCurrentSessionId(), GetCurrentSessionIndex(), GetPendingUnsavedSessionActionPrompt(), HandleSessionClosed(), HandleSessionCreated(), HandleSessionRomLoaded(), HasDuplicateSession(), HasPendingDungeonChangesForSession(), ImportProject(), InitializeShortcutSystem(), InitializeSubsystems(), IsCurrentProjectDirty(), IsRomBackupRestorePending(), LoadAssets(), LoadAssetsLazy(), LoadProjectWithRom(), LoadRomInternal(), MarkCurrentProjectDirty(), ModifiedSessionCount(), OpenProjectInternal(), OpenRomOrProjectInternal(), PendingDungeonRoomCountForSession(), PendingPaletteColorCountForSession(), PendingRomSaveMatchesActiveSession(), PrepareActiveProjectContextForSave(), PrepareRawProjectFileSave(), RebaseCleanProjectFileDraft(), ReloadProjectRom(), RemoveSession(), ReplaceActiveSessionRom(), ResolveSessionIndexById(), RestoreProjectContextAfterFailedOpen(), RestoreRomBackup(), SaveActiveProjectEditingWork(), SaveProject(), SaveProjectAs(), SaveRomInternal(), session_coordinator(), session_coordinator(), SessionHasPendingRomWork(), SessionHasPendingUnsavedWork(), yaze::editor::EditorManager::SessionScope::SessionScope(), SetCurrentRom(), SetupDialogCallbacks(), ShowProjectFileEditor(), StartPendingRomSave(), SwapProjectRom(), SwitchToEditor(), SwitchToSession(), UpdateEditorState(), and ValidateProjectRomSelection().

◆ layout_manager_

◆ layout_coordinator_

◆ right_drawer_manager_

◆ status_bar_

◆ activity_bar_

std::unique_ptr<ActivityBar> yaze::editor::EditorManager::activity_bar_
private

Definition at line 632 of file editor_manager.h.

Referenced by DrawInterface(), and InitializeSubsystems().

◆ workspace_manager_

◆ autosave_timer_

float yaze::editor::EditorManager::autosave_timer_ = 0.0f
private

Definition at line 719 of file editor_manager.h.

Referenced by UpdateEditorState().

◆ settings_dirty_

bool yaze::editor::EditorManager::settings_dirty_ = false
private

◆ settings_dirty_timestamp_

float yaze::editor::EditorManager::settings_dirty_timestamp_ = 0.0f
private

◆ pending_layout_defaults_reset_

bool yaze::editor::EditorManager::pending_layout_defaults_reset_ = false
private

◆ pending_unsaved_session_action_

◆ rom_lifecycle_

◆ pending_rom_save_

std::optional<PendingRomSave> yaze::editor::EditorManager::pending_rom_save_
private

◆ deferred_actions_

std::vector<std::function<void()> > yaze::editor::EditorManager::deferred_actions_
private

Definition at line 736 of file editor_manager.h.

Referenced by QueueDeferredAction(), and SubscribeToEvents().

◆ pending_editor_deferred_actions_

std::atomic<int> yaze::editor::EditorManager::pending_editor_deferred_actions_ {0}
private

◆ ui_sync_frame_id_

std::atomic<uint64_t> yaze::editor::EditorManager::ui_sync_frame_id_ {0}
private

Definition at line 738 of file editor_manager.h.

Referenced by GetUiSyncStateSnapshot(), and SubscribeToEvents().

◆ active_project_build_

std::unique_ptr<BackgroundCommandTask> yaze::editor::EditorManager::active_project_build_
private

◆ active_project_build_reported_

bool yaze::editor::EditorManager::active_project_build_reported_ = false
private

◆ event_bus_

EventBus yaze::editor::EditorManager::event_bus_
private

◆ editor_context_

std::unique_ptr<GlobalEditorContext> yaze::editor::EditorManager::editor_context_
private

Definition at line 744 of file editor_manager.h.

Referenced by ConfigureEditorDependencies(), and EditorManager().

◆ hack_workflow_backend_

std::unique_ptr<workflow::HackWorkflowBackend> yaze::editor::EditorManager::hack_workflow_backend_
private

Definition at line 745 of file editor_manager.h.

Referenced by RefreshHackWorkflowBackend().


The documentation for this class was generated from the following files: