|
SDEngine
Game Engine
|
Manages window layouts using ImGui DockBuilder for presets and INI for user layouts. More...
#include <LayoutManager.hpp>
Public Types | |
| enum class | Preset { DEFAULT , MINIMAL } |
Public Member Functions | |
| LayoutManager () | |
| ~LayoutManager ()=default | |
| void | init () |
| Initialize - loads last used layout name but doesn't apply yet. | |
| void | apply_preset (Preset preset, ApplicationRuntime runtime) |
| Apply a preset layout (uses DockBuilder API) - call this after dockspace exists. | |
| void | apply_pending_layout (ApplicationRuntime runtime) |
| Apply the pending layout (call from first frame when dockspace is ready) | |
| void | save_layout (const std::string &name) |
| Save current layout to a user-named file. | |
| bool | load_layout (const std::string &name, ApplicationRuntime runtime) |
| Load a user-saved layout. | |
| void | delete_layout (const std::string &name, ApplicationRuntime runtime) |
| Delete a user layout. | |
| std::vector< std::string > | get_user_layout_names () const |
| Get list of user-saved layout names. | |
| bool | has_layout (const std::string &name) const |
| Check if a user layout exists. | |
| const std::string & | get_current_layout () const |
| Get the currently active layout/preset name. | |
Private Member Functions | |
| void | ensure_layouts_directory_exists () |
| std::string | get_layout_path (const std::string &name) const |
| void | save_current_layout_name () |
| void | refresh_layout_list () |
Private Attributes | |
| std::map< std::string, std::string > | m_user_layouts |
| std::string | m_current_layout = "Default" |
| std::string | m_pending_layout |
| bool | m_is_initialized = false |
| bool | m_has_applied_initial_layout = false |
Manages window layouts using ImGui DockBuilder for presets and INI for user layouts.
|
strong |
|
default |
|
default |
| void sd::LayoutManager::apply_pending_layout | ( | ApplicationRuntime | runtime | ) |
Apply the pending layout (call from first frame when dockspace is ready)
| void sd::LayoutManager::apply_preset | ( | Preset | preset, |
| ApplicationRuntime | runtime | ||
| ) |
Apply a preset layout (uses DockBuilder API) - call this after dockspace exists.
| void sd::LayoutManager::delete_layout | ( | const std::string & | name, |
| ApplicationRuntime | runtime | ||
| ) |
Delete a user layout.
|
private |
|
inline |
Get the currently active layout/preset name.
|
private |
| std::vector< std::string > sd::LayoutManager::get_user_layout_names | ( | ) | const |
Get list of user-saved layout names.
| void sd::LayoutManager::init | ( | ) |
Initialize - loads last used layout name but doesn't apply yet.
| bool sd::LayoutManager::load_layout | ( | const std::string & | name, |
| ApplicationRuntime | runtime | ||
| ) |
Load a user-saved layout.
|
private |
|
private |
Save current layout to a user-named file.
|
private |
|
private |
|
private |