Low-level window operations with minimal dependencies. More...
#include <window_delegate.h>
Classes | |
| struct | WindowInfo |
Public Member Functions | |
| WindowDelegate ()=default | |
| ~WindowDelegate ()=default | |
| void | ShowAllWindows () |
| void | HideAllWindows () |
| void | ShowWindow (const std::string &window_id) |
| void | HideWindow (const std::string &window_id) |
| void | ToggleWindow (const std::string &window_id) |
| bool | IsWindowVisible (const std::string &window_id) const |
| void | FocusWindow (const std::string &window_id) |
| void | MaximizeWindow (const std::string &window_id) |
| void | RestoreWindow (const std::string &window_id) |
| void | CenterWindow (const std::string &window_id) |
| void | DockWindow (const std::string &window_id, ImGuiDir dock_direction) |
| void | UndockWindow (const std::string &window_id) |
| void | SetDockSpace (const std::string &dock_space_id, const ImVec2 &size=ImVec2(0, 0)) |
| absl::Status | SaveLayout (const std::string &preset_name) |
| absl::Status | LoadLayout (const std::string &preset_name) |
| absl::Status | ResetLayout () |
| std::vector< std::string > | GetAvailableLayouts () const |
| void | SaveWorkspaceLayout () |
| void | LoadWorkspaceLayout () |
| void | ResetWorkspaceLayout () |
| void | LoadDeveloperLayout () |
| void | LoadDesignerLayout () |
| void | LoadModderLayout () |
| std::vector< std::string > | GetVisibleWindows () const |
| std::vector< std::string > | GetHiddenWindows () const |
| ImVec2 | GetWindowSize (const std::string &window_id) const |
| ImVec2 | GetWindowPosition (const std::string &window_id) const |
| void | ShowWindowsInCategory (const std::string &category) |
| void | HideWindowsInCategory (const std::string &category) |
| void | ShowOnlyWindow (const std::string &window_id) |
| void | RegisterWindow (const std::string &window_id, const std::string &category="") |
| void | UnregisterWindow (const std::string &window_id) |
| void | LoadMinimalLayout () |
Private Member Functions | |
| bool | IsWindowRegistered (const std::string &window_id) const |
| std::string | GetLayoutFilePath (const std::string &preset_name) const |
| void | ApplyLayoutToWindow (const std::string &window_id, const std::string &layout_data) |
Private Attributes | |
| std::unordered_map< std::string, WindowInfo > | registered_windows_ |
Low-level window operations with minimal dependencies.
Provides window management functionality extracted from EditorManager:
This class has minimal dependencies (only ImGui and absl) to avoid linker issues and circular dependencies.
Definition at line 26 of file window_delegate.h.
|
default |
|
default |
| void yaze::editor::WindowDelegate::ShowAllWindows | ( | ) |
Definition at line 13 of file window_delegate.cc.
References registered_windows_.
Referenced by yaze::editor::UICoordinator::ShowAllWindows().
| void yaze::editor::WindowDelegate::HideAllWindows | ( | ) |
Definition at line 20 of file window_delegate.cc.
References registered_windows_.
Referenced by yaze::editor::UICoordinator::HideAllWindows().
| void yaze::editor::WindowDelegate::ShowWindow | ( | const std::string & | window_id | ) |
Definition at line 27 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::HideWindow | ( | const std::string & | window_id | ) |
Definition at line 34 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::ToggleWindow | ( | const std::string & | window_id | ) |
Definition at line 41 of file window_delegate.cc.
References IsWindowRegistered().

| bool yaze::editor::WindowDelegate::IsWindowVisible | ( | const std::string & | window_id | ) | const |
Definition at line 48 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::FocusWindow | ( | const std::string & | window_id | ) |
Definition at line 56 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::MaximizeWindow | ( | const std::string & | window_id | ) |
Definition at line 63 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::RestoreWindow | ( | const std::string & | window_id | ) |
Definition at line 70 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::CenterWindow | ( | const std::string & | window_id | ) |
Definition at line 77 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::DockWindow | ( | const std::string & | window_id, |
| ImGuiDir | dock_direction | ||
| ) |
Definition at line 84 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::UndockWindow | ( | const std::string & | window_id | ) |
Definition at line 92 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::SetDockSpace | ( | const std::string & | dock_space_id, |
| const ImVec2 & | size = ImVec2(0, 0) |
||
| ) |
Definition at line 99 of file window_delegate.cc.
| absl::Status yaze::editor::WindowDelegate::SaveLayout | ( | const std::string & | preset_name | ) |
Definition at line 105 of file window_delegate.cc.
References GetLayoutFilePath().

| absl::Status yaze::editor::WindowDelegate::LoadLayout | ( | const std::string & | preset_name | ) |
Definition at line 139 of file window_delegate.cc.
References GetLayoutFilePath().

| absl::Status yaze::editor::WindowDelegate::ResetLayout | ( | ) |
Definition at line 172 of file window_delegate.cc.
| std::vector< std::string > yaze::editor::WindowDelegate::GetAvailableLayouts | ( | ) | const |
Definition at line 179 of file window_delegate.cc.
| void yaze::editor::WindowDelegate::SaveWorkspaceLayout | ( | ) |
Definition at line 298 of file window_delegate.cc.
Referenced by yaze::editor::EditorManager::SaveWorkspaceLayout().
| void yaze::editor::WindowDelegate::LoadWorkspaceLayout | ( | ) |
Definition at line 303 of file window_delegate.cc.
Referenced by yaze::editor::EditorManager::LoadWorkspaceLayout().
| void yaze::editor::WindowDelegate::ResetWorkspaceLayout | ( | ) |
Definition at line 308 of file window_delegate.cc.
Referenced by yaze::editor::EditorManager::ResetWorkspaceLayout().
| void yaze::editor::WindowDelegate::LoadDeveloperLayout | ( | ) |
Definition at line 261 of file window_delegate.cc.
Referenced by yaze::editor::EditorManager::LoadDeveloperLayout().
| void yaze::editor::WindowDelegate::LoadDesignerLayout | ( | ) |
Definition at line 266 of file window_delegate.cc.
Referenced by yaze::editor::EditorManager::LoadDesignerLayout().
| void yaze::editor::WindowDelegate::LoadModderLayout | ( | ) |
Definition at line 271 of file window_delegate.cc.
Referenced by yaze::editor::EditorManager::LoadModderLayout().
| std::vector< std::string > yaze::editor::WindowDelegate::GetVisibleWindows | ( | ) | const |
Definition at line 199 of file window_delegate.cc.
| std::vector< std::string > yaze::editor::WindowDelegate::GetHiddenWindows | ( | ) | const |
Definition at line 205 of file window_delegate.cc.
| ImVec2 yaze::editor::WindowDelegate::GetWindowSize | ( | const std::string & | window_id | ) | const |
Definition at line 211 of file window_delegate.cc.
References IsWindowRegistered().

| ImVec2 yaze::editor::WindowDelegate::GetWindowPosition | ( | const std::string & | window_id | ) | const |
Definition at line 219 of file window_delegate.cc.
References IsWindowRegistered().

| void yaze::editor::WindowDelegate::ShowWindowsInCategory | ( | const std::string & | category | ) |
Definition at line 227 of file window_delegate.cc.
| void yaze::editor::WindowDelegate::HideWindowsInCategory | ( | const std::string & | category | ) |
Definition at line 232 of file window_delegate.cc.
| void yaze::editor::WindowDelegate::ShowOnlyWindow | ( | const std::string & | window_id | ) |
Definition at line 237 of file window_delegate.cc.
| void yaze::editor::WindowDelegate::RegisterWindow | ( | const std::string & | window_id, |
| const std::string & | category = "" |
||
| ) |
Definition at line 242 of file window_delegate.cc.
References yaze::editor::WindowDelegate::WindowInfo::category, yaze::editor::WindowDelegate::WindowInfo::id, yaze::editor::WindowDelegate::WindowInfo::is_registered, and registered_windows_.
| void yaze::editor::WindowDelegate::UnregisterWindow | ( | const std::string & | window_id | ) |
Definition at line 253 of file window_delegate.cc.
References registered_windows_.
| void yaze::editor::WindowDelegate::LoadMinimalLayout | ( | ) |
Definition at line 276 of file window_delegate.cc.
|
private |
Definition at line 281 of file window_delegate.cc.
References registered_windows_.
Referenced by ApplyLayoutToWindow(), CenterWindow(), DockWindow(), FocusWindow(), GetWindowPosition(), GetWindowSize(), HideWindow(), IsWindowVisible(), MaximizeWindow(), RestoreWindow(), ShowWindow(), ToggleWindow(), and UndockWindow().
|
private |
Definition at line 286 of file window_delegate.cc.
Referenced by LoadLayout(), and SaveLayout().
|
private |
Definition at line 291 of file window_delegate.cc.
References IsWindowRegistered().

|
private |
Definition at line 92 of file window_delegate.h.
Referenced by HideAllWindows(), IsWindowRegistered(), RegisterWindow(), ShowAllWindows(), and UnregisterWindow().