3#include "absl/strings/str_format.h"
10 : layout_manager_(layout_manager), panel_manager_(panel_manager) {}
43 if (preset_name ==
"Minimal") {
45 }
else if (preset_name ==
"Developer") {
47 }
else if (preset_name ==
"Designer") {
49 }
else if (preset_name ==
"Modder") {
66 const std::string& card_id,
size_t session_id)
const {
80 size_t session_id)
const {
105 for (
const auto& panel_id : preset.optional_panels) {
168 const std::string& card_id,
size_t session_id)
const {
172 if (session_id == 0) {
175 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.
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.
LayoutOrchestrator()=default
PanelManager * panel_manager_
std::string GetPrefixedPanelId(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.
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.
static PanelLayoutPreset GetDesignerPreset()
Get the "designer" workspace preset (visual-focused)
static PanelLayoutPreset GetDefaultPreset(EditorType type)
Get the default layout preset for an editor type.
static PanelLayoutPreset GetModderPreset()
Get the "modder" workspace preset (full-featured)
static PanelLayoutPreset GetMinimalPreset()
Get the "minimal" workspace preset (minimal cards)
static PanelLayoutPreset GetDeveloperPreset()
Get the "developer" workspace preset (debug-focused)
Central registry for all editor cards with session awareness and dependency injection.
const PanelDescriptor * GetPanelDescriptor(size_t session_id, const std::string &base_card_id) const
bool ShowPanel(size_t session_id, const std::string &base_card_id)
std::string MakePanelId(size_t session_id, const std::string &base_id) const
bool HidePanel(size_t session_id, const std::string &base_card_id)
LayoutType
Predefined layout types for different editor workflows.
std::string GetWindowTitle() const
Get the effective window title for DockBuilder.
Defines default panel visibility for an editor type.
std::vector< std::string > default_visible_panels