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

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 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 ()
 
RightPanelManagerright_panel_manager ()
 
StatusBarstatus_bar ()
 
ToastManagertoast_manager ()
 
PanelManagerGetPanelManager ()
 
PanelManagerpanel_manager ()
 
const PanelManagerpanel_manager () const
 
PanelHostpanel_host ()
 
const PanelHostpanel_host () const
 
PanelManagercard_registry ()
 
const PanelManagercard_registry () 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 *
 
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
 
absl::Status RestoreRomBackup (const std::string &backup_path)
 
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
 
UICoordinatorui_coordinator ()
 
yaze::zelda3::Overworldoverworld () const
 
size_t GetCurrentSessionIndex () const
 
core::FeatureFlags::FlagsGetCurrentFeatureFlags ()
 
void SetFontGlobalScale (float scale)
 
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)
 
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 ()
 
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 ()
 
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 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 ()
 
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 ()
 
project::YazeProjectGetCurrentProject ()
 
const project::YazeProjectGetCurrentProject () const
 
core::VersionManagerGetVersionManager ()
 
void ShowProjectManagement ()
 Injects dependencies into all editors within an EditorSet.
 
void ShowProjectFileEditor ()
 
- Public Member Functions inherited from yaze::editor::ISessionConfigurator
virtual ~ISessionConfigurator ()=default
 
- Public Member Functions inherited from yaze::editor::IEditorSwitcher
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
 
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)
 
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 DrawInterface ()
 
void DrawSecondaryWindows ()
 
void UpdateSystemUIs ()
 
void RunEmulator ()
 
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 ()
 
absl::Status CheckRomWritePolicy ()
 Save the current ROM file.
 
absl::Status CheckOracleRomSafetyPreSave (Rom *rom)
 
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
 
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::unique_ptr< core::VersionManagerversion_manager_
 
SharedClipboard shared_clipboard_
 
std::unique_ptr< PopupManagerpopup_manager_
 
ToastManager toast_manager_
 
MenuBuilder menu_builder_
 
ShortcutManager shortcut_manager_
 
UserSettings user_settings_
 
PanelManager panel_manager_
 
std::unique_ptr< PanelHostpanel_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< RightPanelManagerright_panel_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
 
RomLifecycleManager rom_lifecycle_
 
std::vector< std::function< void()> > deferred_actions_
 
std::atomic< int > pending_editor_deferred_actions_ {0}
 
std::atomic< uint64_t > ui_sync_frame_id_ {0}
 
EventBus event_bus_
 
std::unique_ptr< GlobalEditorContexteditor_context_
 

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 89 of file editor_manager.h.

Member Enumeration Documentation

◆ PotItemSaveDecision

Enumerator
kSaveWithPotItems 
kSaveWithoutPotItems 
kCancel 

Definition at line 98 of file editor_manager.h.

Constructor & Destructor Documentation

◆ EditorManager()

◆ ~EditorManager()

yaze::editor::EditorManager::~EditorManager ( )

Definition at line 825 of file editor_manager.cc.

Member Function Documentation

◆ Initialize()

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

◆ OpenEditorAndPanelsFromFlags()

◆ ProcessStartupActions()

◆ ApplyStartupVisibility()

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

◆ SetAssetLoadMode()

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

◆ asset_load_mode()

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

Definition at line 120 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 (PanelManager) - 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 2044 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 2052 of file editor_manager.cc.

References yaze::gui::Animator::ClearAllAnimations(), yaze::gui::GetAnimator(), and right_panel_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 129 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 132 of file editor_manager.h.

References menu_builder_.

◆ workspace_manager()

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

◆ right_panel_manager()

RightPanelManager * yaze::editor::EditorManager::right_panel_manager ( )
inline

◆ status_bar()

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

Definition at line 137 of file editor_manager.h.

References status_bar_.

◆ toast_manager()

◆ GetPanelManager()

PanelManager * yaze::editor::EditorManager::GetPanelManager ( )
inline

Definition at line 139 of file editor_manager.h.

References panel_manager_.

◆ panel_manager() [1/2]

◆ panel_manager() [2/2]

const PanelManager & yaze::editor::EditorManager::panel_manager ( ) const
inline

Definition at line 141 of file editor_manager.h.

References panel_manager_.

◆ panel_host() [1/2]

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

Definition at line 142 of file editor_manager.h.

References panel_host_.

◆ panel_host() [2/2]

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

Definition at line 143 of file editor_manager.h.

References panel_host_.

◆ card_registry() [1/2]

PanelManager & yaze::editor::EditorManager::card_registry ( )
inline

Definition at line 146 of file editor_manager.h.

References panel_manager_.

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

◆ card_registry() [2/2]

const PanelManager & yaze::editor::EditorManager::card_registry ( ) const
inline

Definition at line 147 of file editor_manager.h.

References panel_manager_.

◆ GetLeftLayoutOffset()

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

Definition at line 151 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 154 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 157 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()

Rom * yaze::editor::EditorManager::GetCurrentRom ( ) const
inlineoverridevirtual

Implements yaze::editor::IEditorSwitcher.

Definition at line 162 of file editor_manager.h.

References session_coordinator_.

Referenced by yaze::editor::MenuOrchestrator::CanSaveRom(), CheckRomWritePolicy(), yaze::editor::UICoordinator::DrawGlobalSearch(), DrawInterface(), yaze::editor::UICoordinator::DrawMenuBarExtras(), yaze::editor::UICoordinator::DrawNotificationBell(), yaze::editor::PopupManager::DrawRomBackupManagerPopup(), yaze::editor::PopupManager::DrawRomInfoPopup(), yaze::editor::PopupManager::DrawSaveAsPopup(), yaze::editor::UICoordinator::DrawSessionButton(), yaze::editor::PopupManager::DrawSessionManagerPopup(), yaze::editor::UICoordinator::DrawWelcomeScreen(), yaze::Controller::GetCurrentRom(), GetRomBackups(), yaze::editor::MenuOrchestrator::GetRomFilename(), HandleSessionClosed(), HandleUIActionRequest(), yaze::editor::MenuOrchestrator::HasActiveRom(), LoadAssets(), LoadAssetsLazy(), LoadProjectWithRom(), LoadRom(), yaze::editor::MenuOrchestrator::OnCheckRomVersion(), yaze::editor::MenuOrchestrator::OnCreateBackup(), yaze::Controller::OnLoad(), yaze::editor::MenuOrchestrator::OnRunDataIntegrityCheck(), yaze::editor::MenuOrchestrator::OnTestSaveLoad(), yaze::editor::MenuOrchestrator::OnToggleAsarPatch(), yaze::editor::MenuOrchestrator::OnUpgradeRom(), yaze::editor::MenuOrchestrator::OnValidateRom(), OpenRomOrProject(), PruneRomBackups(), RefreshResourceLabelProvider(), RestoreRomBackup(), RunEmulator(), SaveProject(), SaveRom(), SaveRomAs(), SetCurrentRom(), SetupDialogCallbacks(), yaze::editor::UICoordinator::ShouldShowActivityBar(), ShowProjectManagement(), UpdateCurrentRomHash(), UpdateEditorState(), and UpdateSystemUIs().

◆ GetCurrentGameData()

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

Definition at line 166 of file editor_manager.h.

References session_coordinator_.

◆ GetCurrentEditorSet()

◆ GetCurrentEditor()

◆ 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 187 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 3581 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:

◆ RestoreRomBackup()

◆ PruneRomBackups()

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

Definition at line 3605 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 ( )
inline

Definition at line 193 of file editor_manager.h.

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

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

Here is the call graph for this function:

◆ CancelRomWriteConfirm()

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

Definition at line 194 of file editor_manager.h.

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

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 195 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 200 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 203 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 ( )
inline

Definition at line 204 of file editor_manager.h.

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

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()

◆ overworld()

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

Definition at line 3536 of file editor_manager.cc.

References GetCurrentEditorSet().

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

Here is the call graph for this function:

◆ GetCurrentSessionIndex()

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

Definition at line 3645 of file editor_manager.cc.

References session_coordinator_.

Referenced by GetCurrentFeatureFlags().

◆ GetCurrentFeatureFlags()

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

Definition at line 227 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()

void yaze::editor::EditorManager::SetFontGlobalScale ( float scale)
inline

◆ RefreshWorkspacePresets()

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

Definition at line 251 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 252 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 255 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 3707 of file editor_manager.cc.

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

◆ IsPanelBasedEditor()

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

Definition at line 368 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 266 of file editor_manager.h.

References ui_coordinator_.

◆ SetSidebarVisible()

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

Definition at line 269 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 3619 of file editor_manager.cc.

References session_coordinator_.

◆ CloseCurrentSession()

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

Definition at line 3625 of file editor_manager.cc.

References session_coordinator_.

◆ RemoveSession()

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

◆ SwitchToSession()

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

◆ GetActiveSessionCount()

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

◆ SaveWorkspaceLayout()

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

Definition at line 289 of file editor_manager.h.

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

Referenced by yaze::editor::MenuOrchestrator::OnSaveWorkspaceLayout().

Here is the call graph for this function:

◆ LoadWorkspaceLayout()

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

Definition at line 290 of file editor_manager.h.

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

Referenced by yaze::editor::MenuOrchestrator::OnLoadWorkspaceLayout().

Here is the call graph for this function:

◆ ResetWorkspaceLayout()

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

◆ ShowAllWindows()

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

Definition at line 292 of file editor_manager.h.

References ui_coordinator_.

◆ HideAllWindows()

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

Definition at line 296 of file editor_manager.h.

References ui_coordinator_.

Referenced by yaze::editor::MenuOrchestrator::OnHideAllWindows().

◆ LoadDeveloperLayout()

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

Definition at line 302 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 303 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 304 of file editor_manager.h.

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

Here is the call graph for this function:

◆ ApplyLayoutPreset()

◆ ApplyLayoutProfile()

◆ CaptureTemporaryLayoutSnapshot()

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

◆ RestoreTemporaryLayoutSnapshot()

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

◆ ClearTemporaryLayoutSnapshot()

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

Definition at line 433 of file editor_manager.cc.

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

Referenced by yaze::editor::MenuOrchestrator::AddWindowMenuItems().

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 3676 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 3739 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 ( )
inline

Definition at line 319 of file editor_manager.h.

References quit_.

Referenced by yaze::editor::MenuOrchestrator::OnQuit().

◆ QueueDeferredAction()

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

◆ GetUiSyncStateSnapshot()

◆ ConfigureSession()

void yaze::editor::EditorManager::ConfigureSession ( RomSession * session)
overridevirtual

◆ ShowImGuiDemo()

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

Definition at line 342 of file editor_manager.h.

References ui_coordinator_.

Referenced by yaze::editor::MenuOrchestrator::OnShowImGuiDemo().

◆ ShowImGuiMetrics()

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

Definition at line 346 of file editor_manager.h.

References ui_coordinator_.

Referenced by yaze::editor::MenuOrchestrator::OnShowImGuiMetrics().

◆ GetAgentEditor()

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

Definition at line 361 of file editor_manager.h.

◆ GetAgentUiController()

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

Definition at line 362 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 2470 of file editor_manager.cc.

References ApplyDefaultBackupPolicy(), yaze::zelda3::CustomObjectManager::ClearObjectFileMap(), yaze::core::RomSettings::ClearOverrides(), ConfigureEditorDependencies(), yaze::test::TestManager::Get(), yaze::core::RomSettings::Get(), yaze::zelda3::CustomObjectManager::Get(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), yaze::project::RecentFilesManager::GetInstance(), yaze::editor::kError, yaze::editor::kWarning, LoadAssetsForMode(), yaze::editor::RomFileManager::LoadRom(), yaze::util::MakeRomFileDialogOptions(), yaze::editor::RomLoadOptionsDialog::Open(), OpenRomOrProject(), RefreshResourceLabelProvider(), RETURN_IF_ERROR, rom_file_manager_, rom_load_options_dialog_, session_coordinator_, yaze::test::TestManager::SetCurrentRom(), yaze::editor::ToastManager::Show(), show_rom_load_options_, yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::util::FileDialogWrapper::ShowOpenFileDialogAsync(), toast_manager_, ui_coordinator_, and UpdateCurrentRomHash().

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

◆ SaveRom()

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

Definition at line 2797 of file editor_manager.cc.

References yaze::core::HackManifest::AnalyzePcWriteRanges(), yaze::editor::RomLifecycleManager::ApplyDefaultBackupPolicy(), 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::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(), 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::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(), 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::RomLifecycleManager::SetPendingWriteConflicts(), yaze::editor::RomLifecycleManager::SetPotItemConfirmPending(), yaze::editor::RomLifecycleManager::ShouldBypassPotItemConfirm(), yaze::editor::RomLifecycleManager::ShouldBypassWriteConflict(), yaze::editor::RomLifecycleManager::ShouldSuppressPotItemSave(), yaze::editor::ToastManager::Show(), toast_manager_, user_settings_, and yaze::project::YazeProject::workspace_settings.

Referenced by yaze::editor::PopupManager::DrawRomWriteConfirmPopup(), yaze::editor::PopupManager::DrawWriteConflictWarningPopup(), HandleUIActionRequest(), yaze::editor::MenuOrchestrator::OnSaveRom(), ResolvePotItemSaveConfirmation(), and SaveRomAs().

◆ SaveRomAs()

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

◆ OpenRomOrProject()

◆ CreateNewProject()

◆ OpenProject()

◆ SaveProject()

◆ SaveProjectAs()

◆ HasPendingPotItemSaveConfirmation()

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

Definition at line 379 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 385 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()

absl::Status yaze::editor::EditorManager::ImportProject ( const std::string & project_path)

◆ RepairCurrentProject()

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

◆ LoadProjectWithRom()

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

Definition at line 3174 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::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(), yaze::project::YazeProject::code_folder, ConfigureEditorDependencies(), current_project_, yaze::project::YazeProject::custom_object_files, yaze::project::YazeProject::custom_objects_folder, 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::core::RomSettings::Get(), yaze::zelda3::CustomObjectManager::Get(), yaze::zelda3::DrawRoutineRegistry::Get(), yaze::project::YazeProject::GetAbsolutePath(), GetCurrentEditorSet(), GetCurrentRom(), GetCurrentSessionId(), yaze::project::YazeProject::GetDisplayName(), yaze::project::RecentFilesManager::GetInstance(), yaze::zelda3::CustomObjectManager::Initialize(), yaze::Rom::is_loaded(), IsRomHashMismatch(), yaze::editor::PanelManager::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(), panel_manager_, yaze::editor::UserSettings::prefs(), project_management_panel_, yaze::zelda3::DrawRoutineRegistry::RefreshFeatureFlagMappings(), RefreshResourceLabelProvider(), RETURN_IF_ERROR, yaze::project::YazeProject::rom_address_overrides, yaze::project::YazeProject::rom_backup_folder, rom_file_manager_, yaze::project::YazeProject::rom_filename, yaze::project::YazeProject::Save(), session_coordinator_, yaze::editor::PanelManager::SetActiveCategory(), yaze::core::RomSettings::SetAddressOverrides(), yaze::editor::RomFileManager::SetBackupBeforeSave(), yaze::editor::RomFileManager::SetBackupFolder(), yaze::editor::RomFileManager::SetBackupKeepDaily(), yaze::editor::RomFileManager::SetBackupKeepDailyDays(), yaze::editor::RomFileManager::SetBackupRetentionCount(), yaze::editor::ContentRegistry::Context::SetCurrentProject(), yaze::test::TestManager::SetCurrentRom(), yaze::editor::PanelManager::SetFileBrowserPath(), yaze::zelda3::CustomObjectManager::SetObjectFileMap(), yaze::editor::ToastManager::Show(), yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::util::FileDialogWrapper::ShowOpenFileDialogAsync(), toast_manager_, ui_coordinator_, UpdateCurrentRomHash(), user_settings_, version_manager_, and yaze::project::YazeProject::workspace_settings.

Referenced by InitializeSubsystems(), LoadProjectWithRom(), OpenProject(), and OpenRomOrProject().

◆ GetCurrentProject() [1/2]

◆ GetCurrentProject() [2/2]

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

Definition at line 395 of file editor_manager.h.

References current_project_.

◆ GetVersionManager()

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

Definition at line 398 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 3768 of file editor_manager.cc.

References current_project_, GetCurrentRom(), yaze::editor::RightPanelManager::kProject, project_management_panel_, right_panel_manager_, and version_manager_.

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

Here is the call graph for this function:

◆ ShowProjectFileEditor()

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

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

Referenced by LoadProjectWithRom(), LoadRom(), OpenRomOrProject(), and RestoreRomBackup().

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 1933 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 1851 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 1862 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 1891 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 1923 of file editor_manager.cc.

References yaze::editor::PanelManager::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 1887 of file editor_manager.cc.

References yaze::editor::kMessage.

Referenced by EnsureEditorAssetsLoaded().

◆ InitializeTestSuites()

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

Definition at line 1102 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()

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

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

Referenced by DrawInterface(), and Initialize().

◆ HandleSessionSwitched()

◆ HandleSessionCreated()

void yaze::editor::EditorManager::HandleSessionCreated ( size_t index,
RomSession * session )
private

◆ HandleSessionClosed()

void yaze::editor::EditorManager::HandleSessionClosed ( size_t index)
private

◆ SubscribeToEvents()

◆ InitializeSubsystems()

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

Definition at line 502 of file editor_manager.cc.

References activity_bar_, agent_ui_, ApplyLayoutPreset(), yaze::project::YazeProject::assets_folder, yaze::project::YazeProject::code_folder, 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(), yaze::editor::LayoutCoordinator::Initialize(), yaze::editor::EditorActivator::Initialize(), yaze::editor::RomLifecycleManager::Initialize(), yaze::editor::RightPanelManager::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_, LoadProjectWithRom(), yaze::util::MakeRomFileDialogOptions(), menu_builder_, menu_orchestrator_, panel_host_, yaze::editor::LayoutCoordinator::Dependencies::panel_manager, yaze::editor::EditorActivator::Dependencies::panel_manager, panel_manager_, popup_manager_, project_management_panel_, project_manager_, yaze::project::YazeProject::project_opened(), proposal_drawer_, yaze::editor::EditorActivator::Dependencies::queue_deferred_action, QueueDeferredAction(), yaze::editor::LayoutCoordinator::Dependencies::right_panel_manager, yaze::editor::EditorActivator::Dependencies::right_panel_manager, right_panel_manager_, rom_file_manager_, yaze::project::YazeProject::rom_filename, rom_lifecycle_, yaze::project::YazeProject::Save(), 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::SetEventBus(), yaze::editor::PanelManager::SetEventBus(), yaze::editor::PanelManager::SetFileBrowserPath(), 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_, toast_manager(), yaze::editor::LayoutCoordinator::Dependencies::toast_manager, yaze::editor::EditorActivator::Dependencies::toast_manager, toast_manager_, yaze::editor::LayoutCoordinator::Dependencies::ui_coordinator, yaze::editor::EditorActivator::Dependencies::ui_coordinator, ui_coordinator_, user_settings_, window_delegate_, and workspace_manager_.

Referenced by EditorManager().

◆ RegisterEditors()

◆ RegisterEmulatorPanels()

◆ InitializeServices()

◆ SetupComponentCallbacks()

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

Definition at line 1370 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 1481 of file editor_manager.cc.

References yaze::editor::PanelManager::EnableFileBrowser(), yaze::TimingManager::Get(), yaze::editor::PanelManager::GetActiveSessionId(), GetCurrentEditorSet(), yaze::editor::LayoutPresets::GetDefaultPanels(), yaze::editor::EditorRegistry::GetEditorTypeFromCategory(), yaze::TimingManager::GetElapsedTime(), yaze::editor::PanelManager::GetPanelsInCategory(), yaze::editor::kAssembly, yaze::editor::PanelManager::kDashboardCategory, yaze::editor::kEditor, yaze::editor::kSettings, yaze::editor::kUnknown, yaze::editor::UserSettings::Preferences::panel_browser_category_width, panel_manager_, yaze::editor::UserSettings::Preferences::panel_visibility_state, yaze::editor::UserSettings::prefs(), ResolveEditorForCategory(), yaze::editor::PanelManager::RestoreVisibilityState(), yaze::editor::PanelManager::SetCategoryChangedCallback(), yaze::editor::PanelManager::SetEditorResolver(), yaze::editor::PanelManager::SetFileClickedCallback(), yaze::editor::PanelManager::SetOnCategorySelectedCallback(), yaze::editor::PanelManager::SetOnPanelClickedCallback(), yaze::editor::PanelManager::SetPanelBrowserCategoryWidthChangedCallback(), yaze::editor::PanelManager::SetSidebarStateChangedCallback(), yaze::editor::PanelManager::SetSidePanelWidthChangedCallback(), settings_dirty_, settings_dirty_timestamp_, yaze::editor::PanelManager::ShowPanel(), yaze::editor::UserSettings::Preferences::sidebar_active_category, yaze::editor::UserSettings::Preferences::sidebar_panel_width, SwitchToEditor(), SyncEditorContextForCategory(), ui_coordinator_, and user_settings_.

Referenced by SetupComponentCallbacks().

◆ InitializeShortcutSystem()

◆ ProcessInput()

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

Definition at line 2061 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()

◆ DrawInterface()

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

◆ DrawSecondaryWindows()

◆ UpdateSystemUIs()

◆ RunEmulator()

◆ 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()

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

◆ ApplyDefaultBackupPolicy()

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

◆ CheckRomWritePolicy()

absl::Status yaze::editor::EditorManager::CheckRomWritePolicy ( )
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 2789 of file editor_manager.cc.

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

Referenced by SaveRom().

Here is the call graph for this function:

◆ CheckOracleRomSafetyPreSave()

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

Definition at line 2793 of file editor_manager.cc.

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

Referenced by SaveRom().

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 463 of file editor_manager.h.

Referenced by Quit(), and quit().

◆ show_workspace_layout

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

Definition at line 469 of file editor_manager.h.

◆ session_to_rename_

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

Definition at line 470 of file editor_manager.h.

◆ session_rename_buffer_

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

Definition at line 471 of file editor_manager.h.

◆ proposal_drawer_

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

Definition at line 477 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 478 of file editor_manager.h.

◆ agent_ui_

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

◆ project_file_editor_

ProjectFileEditor yaze::editor::EditorManager::project_file_editor_
private

◆ dashboard_panel_

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

◆ welcome_screen_

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

Definition at line 489 of file editor_manager.h.

Referenced by SetupWelcomeScreenCallbacks().

◆ rom_load_options_dialog_

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

Definition at line 490 of file editor_manager.h.

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

◆ show_rom_load_options_

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

Definition at line 491 of file editor_manager.h.

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

◆ welcome_mode_override_

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

Definition at line 492 of file editor_manager.h.

Referenced by ApplyStartupVisibility(), and ApplyStartupVisibilityOverrides().

◆ dashboard_mode_override_

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

Definition at line 493 of file editor_manager.h.

Referenced by ApplyStartupVisibility(), and ApplyStartupVisibilityOverrides().

◆ sidebar_mode_override_

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

Definition at line 494 of file editor_manager.h.

Referenced by ApplyStartupVisibility(), and ApplyStartupVisibilityOverrides().

◆ asset_load_mode_

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

◆ selection_properties_panel_

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

◆ project_management_panel_

std::unique_ptr<ProjectManagementPanel> yaze::editor::EditorManager::project_management_panel_
private

◆ version_

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

Definition at line 503 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_

◆ version_manager_

std::unique_ptr<core::VersionManager> yaze::editor::EditorManager::version_manager_
private

◆ shared_clipboard_

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

Definition at line 517 of file editor_manager.h.

Referenced by ConfigureEditorDependencies().

◆ popup_manager_

std::unique_ptr<PopupManager> yaze::editor::EditorManager::popup_manager_
private

◆ toast_manager_

◆ menu_builder_

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

Definition at line 520 of file editor_manager.h.

Referenced by InitializeSubsystems(), and menu_builder().

◆ shortcut_manager_

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

◆ user_settings_

◆ panel_manager_

◆ panel_host_

std::unique_ptr<PanelHost> yaze::editor::EditorManager::panel_host_
private

◆ editor_registry_

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

Definition at line 527 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_

RomFileManager yaze::editor::EditorManager::rom_file_manager_
private

◆ ui_coordinator_

◆ window_delegate_

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

◆ editor_activator_

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

Definition at line 533 of file editor_manager.h.

Referenced by InitializeSubsystems(), and SwitchToEditor().

◆ session_coordinator_

◆ layout_manager_

◆ layout_coordinator_

◆ right_panel_manager_

◆ status_bar_

StatusBar yaze::editor::EditorManager::status_bar_
private

◆ activity_bar_

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

Definition at line 541 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 551 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

◆ rom_lifecycle_

◆ deferred_actions_

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

Definition at line 561 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 563 of file editor_manager.h.

Referenced by GetUiSyncStateSnapshot(), and SubscribeToEvents().

◆ event_bus_

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

◆ editor_context_

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

Definition at line 567 of file editor_manager.h.

Referenced by ConfigureEditorDependencies(), and EditorManager().


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