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

Handles editor switching, layout initialization, and jump-to navigation. More...

#include <editor_activator.h>

Collaboration diagram for yaze::editor::EditorActivator:

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.
 
void JumpToMessage (int message_id)
 Jump to a specific message ID in the Message editor.
 
void JumpToAssemblySymbol (const std::string &symbol)
 Jump to an assembly symbol definition in the Assembly editor.
 

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
 

Detailed Description

Handles editor switching, layout initialization, and jump-to navigation.

Extracted from EditorManager to reduce cognitive complexity. Centralizes editor activation logic:

  • SwitchToEditor: Toggle/activate editors with panel management
  • InitializeEditorLayout: Set up DockBuilder layouts for editors
  • JumpToDungeonRoom/JumpToOverworldMap: Cross-editor navigation

Definition at line 32 of file editor_activator.h.

Constructor & Destructor Documentation

◆ EditorActivator()

yaze::editor::EditorActivator::EditorActivator ( )
default

◆ ~EditorActivator()

yaze::editor::EditorActivator::~EditorActivator ( )
default

Member Function Documentation

◆ Initialize()

◆ SwitchToEditor()

void yaze::editor::EditorActivator::SwitchToEditor ( EditorType type,
bool force_visible = false,
bool from_dialog = false )

◆ InitializeEditorLayout()

void yaze::editor::EditorActivator::InitializeEditorLayout ( EditorType type)

Initialize the DockBuilder layout for an editor.

Parameters
typeThe editor type to initialize layout for

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

Here is the call graph for this function:

◆ JumpToDungeonRoom()

void yaze::editor::EditorActivator::JumpToDungeonRoom ( int room_id)

◆ JumpToOverworldMap()

void yaze::editor::EditorActivator::JumpToOverworldMap ( int map_id)

◆ JumpToMessage()

void yaze::editor::EditorActivator::JumpToMessage ( int message_id)

◆ JumpToAssemblySymbol()

void yaze::editor::EditorActivator::JumpToAssemblySymbol ( const std::string & symbol)

Jump to an assembly symbol definition in the Assembly editor.

Parameters
symbolLabel/routine name (e.g., "HouseTag_TelepathicPlea").

Definition at line 314 of file editor_activator.cc.

References deps_, yaze::editor::EditorActivator::Dependencies::ensure_editor_assets_loaded, yaze::editor::EditorActivator::Dependencies::get_current_editor_set, yaze::editor::kAssembly, yaze::editor::kError, yaze::editor::kWarning, yaze::editor::ToastManager::Show(), SwitchToEditor(), and yaze::editor::EditorActivator::Dependencies::toast_manager.

Referenced by Initialize().

Here is the call graph for this function:

◆ ActivatePanelBasedEditor()

◆ DeactivatePanelBasedEditor()

◆ HandleNonEditorClassSwitch()

Member Data Documentation

◆ deps_

◆ initialized_

bool yaze::editor::EditorActivator::initialized_ = false
private

Definition at line 98 of file editor_activator.h.

Referenced by Initialize(), InitializeEditorLayout(), and SwitchToEditor().


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