yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
editor_activator.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SYSTEM_EDITOR_ACTIVATOR_H_
2#define YAZE_APP_EDITOR_SYSTEM_EDITOR_ACTIVATOR_H_
3
4#include <functional>
5#include <string>
6
7#include "app/editor/editor.h"
8
9namespace yaze {
10namespace editor {
11
12// Forward declarations
13class EditorSet;
14class PanelManager;
15class LayoutManager;
16class UICoordinator;
17class RightPanelManager;
18class ToastManager;
19
31 public:
32 struct Dependencies {
39 std::function<size_t()> get_current_session_id;
40 std::function<void(std::function<void()>)> queue_deferred_action;
41 };
42
43 EditorActivator() = default;
44 ~EditorActivator() = default;
45
46 void Initialize(const Dependencies& deps);
47
54 void SwitchToEditor(EditorType type, bool force_visible = false,
55 bool from_dialog = false);
56
62
67 void JumpToDungeonRoom(int room_id);
68
73 void JumpToOverworldMap(int map_id);
74
75 private:
76 void ActivatePanelBasedEditor(EditorType type, Editor* editor);
78 EditorSet* editor_set);
79 void HandleNonEditorClassSwitch(EditorType type, bool force_visible);
80
82 bool initialized_ = false;
83};
84
85} // namespace editor
86} // namespace yaze
87
88#endif // YAZE_APP_EDITOR_SYSTEM_EDITOR_ACTIVATOR_H_
89
Handles editor switching, layout initialization, and jump-to navigation.
void HandleNonEditorClassSwitch(EditorType type, bool force_visible)
void ActivatePanelBasedEditor(EditorType type, Editor *editor)
void SwitchToEditor(EditorType type, bool force_visible=false, bool from_dialog=false)
Switch to an editor, optionally forcing visibility.
void Initialize(const Dependencies &deps)
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 DeactivatePanelBasedEditor(EditorType type, Editor *editor, EditorSet *editor_set)
Contains a complete set of editors for a single ROM instance.
Interface for editor classes.
Definition editor.h:179
Manages ImGui DockBuilder layouts for each editor type.
Central registry for all editor cards with session awareness and dependency injection.
Manages right-side sliding panels for agent chat, proposals, settings.
Handles all UI drawing operations and state management.
std::function< EditorSet *()> get_current_editor_set
std::function< void(std::function< void()>)> queue_deferred_action