yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
layout_orchestrator.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_LAYOUT_LAYOUT_ORCHESTRATOR_H_
2#define YAZE_APP_EDITOR_LAYOUT_LAYOUT_ORCHESTRATOR_H_
3
4#include <string>
5#include <vector>
6
7#include "app/editor/editor.h"
11
12namespace yaze {
13namespace editor {
14
29 public:
30 LayoutOrchestrator() = default;
33
39
50 void ApplyPreset(EditorType type, size_t session_id = 0);
51
57 void ApplyNamedPreset(const std::string& preset_name,
58 size_t session_id = 0);
59
65 void ResetToDefault(EditorType type, size_t session_id = 0);
66
73 std::string GetWindowTitle(const std::string& card_id,
74 size_t session_id = 0) const;
75
81 std::vector<std::string> GetVisiblePanels(size_t session_id) const;
82
88 void ShowPresetPanels(const PanelLayoutPreset& preset,
89 size_t session_id,
90 EditorType editor_type);
91
97 void HideOptionalPanels(EditorType type, size_t session_id = 0);
98
103
108
113
117 bool IsInitialized() const {
118 return layout_manager_ != nullptr && panel_manager_ != nullptr;
119 }
120
121 private:
125 void ApplyDockLayout(EditorType type);
126
130 std::string GetPrefixedPanelId(const std::string& card_id,
131 size_t session_id) const;
132
135 bool rebuild_requested_ = false;
136};
137
138} // namespace editor
139} // namespace yaze
140
141#endif // YAZE_APP_EDITOR_LAYOUT_LAYOUT_ORCHESTRATOR_H_
142
Manages ImGui DockBuilder layouts for each editor type.
Coordinates between LayoutManager, PanelManager, and LayoutPresets.
std::vector< std::string > GetVisiblePanels(size_t session_id) const
Get all visible panels for a session.
void ResetToDefault(EditorType type, size_t session_id=0)
Reset to default layout for an editor type.
bool IsInitialized() const
Check if orchestrator is properly initialized.
PanelManager * panel_manager()
Get the card registry.
void ApplyDockLayout(EditorType type)
Apply DockBuilder layout for an editor type.
void RequestLayoutRebuild()
Request layout rebuild on next frame.
std::string GetPrefixedPanelId(const std::string &card_id, size_t session_id) const
Get prefixed card ID for a session.
void ApplyPreset(EditorType type, size_t session_id=0)
Apply the default layout preset for an editor type.
void HideOptionalPanels(EditorType type, size_t session_id=0)
Hide all optional panels for an editor type.
void ApplyNamedPreset(const std::string &preset_name, size_t session_id=0)
Apply a named workspace preset (Developer, Designer, Modder)
LayoutManager * layout_manager()
Get the layout manager.
void Initialize(LayoutManager *layout_manager, PanelManager *panel_manager)
Initialize with dependencies.
std::string GetWindowTitle(const std::string &card_id, size_t session_id=0) const
Get window title for a card from the registry.
void ShowPresetPanels(const PanelLayoutPreset &preset, size_t session_id, EditorType editor_type)
Show panels specified in a preset.
Central registry for all editor cards with session awareness and dependency injection.
Defines default panel visibility for an editor type.