1#ifndef YAZE_APP_EDITOR_LAYOUT_LAYOUT_MANAGER_H_
2#define YAZE_APP_EDITOR_LAYOUT_LAYOUT_MANAGER_H_
5#include <unordered_map>
9#include "imgui/imgui.h"
132 bool clear_after_restore =
false);
179 bool HasLayout(
const std::string& name)
const;
298 std::unordered_map<std::string, std::unordered_map<std::string, bool>>
312 std::unordered_map<std::string, std::unordered_map<std::string, bool>>
Manages ImGui DockBuilder layouts for each editor type.
void SetLayoutType(LayoutType type)
Set the current layout type for rebuild.
void LoadLayout(const std::string &name)
Load a saved layout by name.
std::string GetWindowTitle(const std::string &card_id) const
Get window title for a card ID from registry.
EditorType current_editor_type_
void BuildScreenLayout(ImGuiID dockspace_id)
ImGuiID last_dockspace_id_
void BuildPaletteLayout(ImGuiID dockspace_id)
void BuildDungeonLayout(ImGuiID dockspace_id)
void CaptureTemporarySessionLayout(size_t session_id)
Capture the current workspace as a temporary session layout.
void SetProjectLayoutKey(const std::string &key)
Set the active project layout key (enables project scope)
void SetPanelManager(PanelManager *manager)
Set the panel manager for window title lookups.
std::unordered_map< std::string, std::unordered_map< std::string, bool > > saved_layouts_
void SaveLayoutsToDisk(LayoutScope scope) const
void BuildGraphicsLayout(ImGuiID dockspace_id)
void RebuildLayout(EditorType type, ImGuiID dockspace_id)
Force rebuild of layout for a specific editor type.
void BuildEmulatorLayout(ImGuiID dockspace_id)
void LoadLayoutsFromDisk()
Load layouts for the active scope (global + optional project)
void UseGlobalLayouts()
Clear project scope and return to global layouts only.
void BuildAssemblyLayout(ImGuiID dockspace_id)
void ClearInitializationFlags()
Clear all initialization flags (for testing)
LayoutType current_layout_type_
bool HasTemporarySessionLayout() const
Whether a temporary session layout is available.
void BuildMessageLayout(ImGuiID dockspace_id)
bool DeleteLayout(const std::string &name)
Delete a saved layout by name.
std::unordered_map< std::string, std::string > saved_imgui_layouts_
std::vector< std::string > GetSavedLayoutNames() const
Get list of all saved layout names.
std::unordered_map< EditorType, bool > layouts_initialized_
void LoadLayoutsFromDiskInternal(LayoutScope scope, bool merge)
bool IsLayoutInitialized(EditorType type) const
Check if a layout has been initialized for an editor.
LayoutType GetLayoutType() const
Get the current layout type.
bool RestoreTemporarySessionLayout(size_t session_id, bool clear_after_restore=false)
Restore the temporary session layout if one has been captured.
void BuildSettingsLayout(ImGuiID dockspace_id)
std::string temp_session_imgui_layout_
std::unordered_map< std::string, std::unordered_map< std::string, bool > > saved_pinned_layouts_
void ResetToDefaultLayout(EditorType type)
Reset the layout for an editor to its default.
LayoutScope GetActiveScope() const
Get the active layout scope.
void BuildOverworldLayout(ImGuiID dockspace_id)
void ClearRebuildRequest()
Clear rebuild request flag.
void ClearTemporarySessionLayout()
Clear temporary session layout snapshot state.
PanelManager * panel_manager() const
Get the panel manager.
void MarkLayoutInitialized(EditorType type)
Mark a layout as initialized.
void SaveCurrentLayout(const std::string &name, bool persist=true)
Save the current layout with a custom name.
void RequestRebuild()
Request a layout rebuild on next frame.
static std::vector< LayoutProfile > GetBuiltInProfiles()
Get built-in layout profiles.
void InitializeEditorLayout(EditorType type, ImGuiID dockspace_id)
Initialize the default layout for a specific editor type.
bool IsRebuildRequested() const
Check if rebuild was requested.
bool HasLayout(const std::string &name) const
Check if a layout exists.
std::unordered_map< std::string, LayoutScope > layout_scopes_
void BuildLayoutFromPreset(EditorType type, ImGuiID dockspace_id)
void BuildSpriteLayout(ImGuiID dockspace_id)
bool ApplyBuiltInProfile(const std::string &profile_id, size_t session_id, EditorType editor_type, LayoutProfile *out_profile=nullptr)
Apply a built-in layout profile by profile ID.
std::unordered_map< std::string, bool > temp_session_pinned_
void BuildMusicLayout(ImGuiID dockspace_id)
PanelManager * panel_manager_
std::string project_layout_key_
bool has_temp_session_layout_
std::unordered_map< std::string, bool > temp_session_visibility_
Central registry for all editor cards with session awareness and dependency injection.
LayoutScope
Storage scope for saved layouts.
LayoutType
Predefined layout types for different editor workflows.
Built-in workflow-oriented layout profiles.