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.
 

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 30 of file editor_activator.h.

Constructor & Destructor Documentation

◆ EditorActivator()

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

◆ ~EditorActivator()

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

Member Function Documentation

◆ Initialize()

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

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

Here is the call graph for this function:

◆ JumpToDungeonRoom()

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

Jump to a specific dungeon room.

Parameters
room_idThe 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().

Here is the call graph for this function:

◆ JumpToOverworldMap()

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

Jump to a specific overworld map.

Parameters
map_idThe 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().

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 82 of file editor_activator.h.

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


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