Handles editor switching, layout initialization, and jump-to navigation. More...
#include <editor_activator.h>

Classes | |
| struct | Dependencies |
Public Member Functions | |
| EditorActivator ()=default | |
| ~EditorActivator ()=default | |
| void | Initialize (const Dependencies &deps) |
| void | SwitchToEditor (EditorType type, bool force_visible=false, bool from_dialog=false) |
| Switch to an editor, optionally forcing visibility. | |
| void | InitializeEditorLayout (EditorType type) |
| Initialize the DockBuilder layout for an editor. | |
| void | JumpToDungeonRoom (int room_id) |
| Jump to a specific dungeon room. | |
| void | JumpToOverworldMap (int map_id) |
| Jump to a specific overworld map. | |
Private Member Functions | |
| void | ActivatePanelBasedEditor (EditorType type, Editor *editor) |
| void | DeactivatePanelBasedEditor (EditorType type, Editor *editor, EditorSet *editor_set) |
| void | HandleNonEditorClassSwitch (EditorType type, bool force_visible) |
Private Attributes | |
| Dependencies | deps_ |
| bool | initialized_ = false |
Handles editor switching, layout initialization, and jump-to navigation.
Extracted from EditorManager to reduce cognitive complexity. Centralizes editor activation logic:
Definition at line 30 of file editor_activator.h.
|
default |
|
default |
| void yaze::editor::EditorActivator::Initialize | ( | const Dependencies & | deps | ) |
Definition at line 18 of file editor_activator.cc.
References deps_, and initialized_.
Referenced by yaze::editor::EditorManager::EditorManager().
| void yaze::editor::EditorActivator::SwitchToEditor | ( | EditorType | type, |
| bool | force_visible = false, | ||
| bool | from_dialog = false ) |
Switch to an editor, optionally forcing visibility.
| type | The editor type to switch to |
| force_visible | If true, always make editor visible |
| from_dialog | If true, keep editor selection dialog open |
Definition at line 23 of file editor_activator.cc.
References ActivatePanelBasedEditor(), DeactivatePanelBasedEditor(), deps_, yaze::editor::EditorActivator::Dependencies::get_current_editor_set, HandleNonEditorClassSwitch(), initialized_, yaze::editor::EditorRegistry::IsPanelBasedEditor(), LOG_WARN, yaze::editor::EditorActivator::Dependencies::queue_deferred_action, yaze::editor::UICoordinator::SetEditorSelectionVisible(), SwitchToEditor(), and yaze::editor::EditorActivator::Dependencies::ui_coordinator.
Referenced by JumpToDungeonRoom(), JumpToOverworldMap(), yaze::editor::EditorManager::SwitchToEditor(), and SwitchToEditor().
| void yaze::editor::EditorActivator::InitializeEditorLayout | ( | EditorType | type | ) |
Initialize the DockBuilder layout for an editor.
| type | The editor type to initialize layout for |
Definition at line 177 of file editor_activator.cc.
References deps_, initialized_, InitializeEditorLayout(), yaze::editor::LayoutManager::InitializeEditorLayout(), yaze::editor::LayoutManager::IsLayoutInitialized(), yaze::editor::EditorActivator::Dependencies::layout_manager, LOG_INFO, and yaze::editor::EditorActivator::Dependencies::queue_deferred_action.
Referenced by InitializeEditorLayout().

| void yaze::editor::EditorActivator::JumpToDungeonRoom | ( | int | room_id | ) |
Jump to a specific dungeon room.
| room_id | The ID of the dungeon room to jump to |
Definition at line 198 of file editor_activator.cc.
References deps_, yaze::editor::EditorActivator::Dependencies::get_current_editor_set, yaze::editor::kDungeon, and SwitchToEditor().
Referenced by yaze::editor::EditorManager::JumpToDungeonRoom().

| void yaze::editor::EditorActivator::JumpToOverworldMap | ( | int | map_id | ) |
Jump to a specific overworld map.
| map_id | The ID of the overworld map to jump to |
Definition at line 209 of file editor_activator.cc.
References deps_, yaze::editor::EditorActivator::Dependencies::get_current_editor_set, yaze::editor::kOverworld, and SwitchToEditor().
Referenced by yaze::editor::EditorManager::JumpToOverworldMap().

|
private |
Definition at line 74 of file editor_activator.cc.
References deps_, yaze::editor::PanelManager::GetActiveCategory(), yaze::editor::EditorRegistry::GetEditorCategory(), yaze::editor::LayoutManager::IsLayoutInitialized(), yaze::editor::EditorActivator::Dependencies::layout_manager, yaze::editor::PanelManager::OnEditorSwitch(), yaze::editor::EditorActivator::Dependencies::panel_manager, and yaze::editor::EditorActivator::Dependencies::queue_deferred_action.
Referenced by SwitchToEditor().

|
private |
Definition at line 98 of file editor_activator.cc.
References yaze::editor::EditorSet::active_editors_, deps_, yaze::editor::PanelManager::GetActiveCategory(), yaze::editor::EditorRegistry::GetEditorCategory(), yaze::editor::EditorRegistry::IsPanelBasedEditor(), yaze::editor::PanelManager::OnEditorSwitch(), and yaze::editor::EditorActivator::Dependencies::panel_manager.
Referenced by SwitchToEditor().

|
private |
Definition at line 116 of file editor_activator.cc.
References yaze::editor::RightPanelManager::ClosePanel(), deps_, yaze::editor::EditorActivator::Dependencies::get_current_session_id, yaze::editor::RightPanelManager::GetActivePanel(), yaze::editor::LayoutManager::InitializeEditorLayout(), yaze::editor::UICoordinator::IsAsmEditorVisible(), yaze::editor::UICoordinator::IsEmulatorVisible(), yaze::editor::LayoutManager::IsLayoutInitialized(), yaze::editor::kAssembly, yaze::editor::kEmulator, yaze::editor::kHex, yaze::editor::kSettings, yaze::editor::RightPanelManager::kSettings, yaze::editor::EditorActivator::Dependencies::layout_manager, LOG_INFO, yaze::editor::RightPanelManager::OpenPanel(), yaze::editor::EditorActivator::Dependencies::panel_manager, yaze::editor::EditorActivator::Dependencies::queue_deferred_action, yaze::editor::EditorActivator::Dependencies::right_panel_manager, yaze::editor::PanelManager::SetActiveCategory(), yaze::editor::UICoordinator::SetAsmEditorVisible(), yaze::editor::UICoordinator::SetEmulatorVisible(), yaze::editor::PanelManager::ShowPanel(), and yaze::editor::EditorActivator::Dependencies::ui_coordinator.
Referenced by SwitchToEditor().
|
private |
Definition at line 81 of file editor_activator.h.
Referenced by ActivatePanelBasedEditor(), DeactivatePanelBasedEditor(), HandleNonEditorClassSwitch(), Initialize(), InitializeEditorLayout(), JumpToDungeonRoom(), JumpToOverworldMap(), and SwitchToEditor().
|
private |
Definition at line 82 of file editor_activator.h.
Referenced by Initialize(), InitializeEditorLayout(), and SwitchToEditor().