3#include "absl/strings/str_format.h"
10 : layout_manager_(layout_manager), window_manager_(window_manager) {}
43 if (preset_name ==
"Minimal") {
45 }
else if (preset_name ==
"Logic Debugger") {
47 }
else if (preset_name ==
"Overworld Artist") {
49 }
else if (preset_name ==
"Dungeon Master") {
51 }
else if (preset_name ==
"Audio Engineer") {
68 size_t session_id)
const {
76 size_t session_id)
const {
101 for (
const auto& panel_id : preset.optional_panels) {
164 size_t session_id)
const {
168 if (session_id == 0) {
171 return absl::StrFormat(
"s%zu.%s", session_id, card_id);
Manages ImGui DockBuilder layouts for each editor type.
void SetLayoutType(LayoutType type)
Set the current layout type for rebuild.
void RequestRebuild()
Request a layout rebuild on next frame.
void Initialize(LayoutManager *layout_manager, WorkspaceWindowManager *window_manager)
Initialize with dependencies.
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.
WorkspaceWindowManager * window_manager()
Get the card registry.
void ApplyDockLayout(EditorType type)
Apply DockBuilder layout for an editor type.
void RequestLayoutRebuild()
Request layout rebuild on next frame.
LayoutOrchestrator()=default
std::string GetPrefixedWindowId(const std::string &card_id, size_t session_id) const
Get prefixed card ID for a session.
LayoutManager * layout_manager_
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.
WorkspaceWindowManager * window_manager_
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.
static PanelLayoutPreset GetLogicDebuggerPreset()
Get the "logic debugger" workspace preset (QA and debug focused)
static PanelLayoutPreset GetDungeonMasterPreset()
Get the "dungeon master" workspace preset.
static PanelLayoutPreset GetAudioEngineerPreset()
Get the "audio engineer" workspace preset (music focused)
static PanelLayoutPreset GetOverworldArtistPreset()
Get the "overworld artist" workspace preset.
static PanelLayoutPreset GetDefaultPreset(EditorType type)
Get the default layout preset for an editor type.
static PanelLayoutPreset GetMinimalPreset()
Get the "minimal" workspace preset (minimal cards)
Central registry for all editor cards with session awareness and dependency injection.
std::string GetWorkspaceWindowName(size_t session_id, const std::string &base_window_id) const
Resolve the exact ImGui window name for a panel by base ID.
bool CloseWindow(size_t session_id, const std::string &base_window_id)
std::string MakeWindowId(size_t session_id, const std::string &base_id) const
bool OpenWindow(size_t session_id, const std::string &base_window_id)
LayoutType
Predefined layout types for different editor workflows.
Defines default panel visibility for an editor type.
std::vector< std::string > default_visible_panels