yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::WindowDelegate Class Reference

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, WindowInforegistered_windows_
 

Detailed Description

Low-level window operations with minimal dependencies.

Provides window management functionality extracted from EditorManager:

  • Window visibility management
  • Docking operations
  • Layout persistence
  • Focus management

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.

Constructor & Destructor Documentation

◆ WindowDelegate()

yaze::editor::WindowDelegate::WindowDelegate ( )
default

◆ ~WindowDelegate()

yaze::editor::WindowDelegate::~WindowDelegate ( )
default

Member Function Documentation

◆ ShowAllWindows()

void yaze::editor::WindowDelegate::ShowAllWindows ( )

Definition at line 13 of file window_delegate.cc.

References registered_windows_.

Referenced by yaze::editor::UICoordinator::ShowAllWindows().

◆ HideAllWindows()

void yaze::editor::WindowDelegate::HideAllWindows ( )

Definition at line 20 of file window_delegate.cc.

References registered_windows_.

Referenced by yaze::editor::UICoordinator::HideAllWindows().

◆ ShowWindow()

void yaze::editor::WindowDelegate::ShowWindow ( const std::string &  window_id)

Definition at line 27 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ HideWindow()

void yaze::editor::WindowDelegate::HideWindow ( const std::string &  window_id)

Definition at line 34 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ ToggleWindow()

void yaze::editor::WindowDelegate::ToggleWindow ( const std::string &  window_id)

Definition at line 41 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ IsWindowVisible()

bool yaze::editor::WindowDelegate::IsWindowVisible ( const std::string &  window_id) const

Definition at line 48 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ FocusWindow()

void yaze::editor::WindowDelegate::FocusWindow ( const std::string &  window_id)

Definition at line 56 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ MaximizeWindow()

void yaze::editor::WindowDelegate::MaximizeWindow ( const std::string &  window_id)

Definition at line 63 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ RestoreWindow()

void yaze::editor::WindowDelegate::RestoreWindow ( const std::string &  window_id)

Definition at line 70 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ CenterWindow()

void yaze::editor::WindowDelegate::CenterWindow ( const std::string &  window_id)

Definition at line 77 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ DockWindow()

void yaze::editor::WindowDelegate::DockWindow ( const std::string &  window_id,
ImGuiDir  dock_direction 
)

Definition at line 84 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ UndockWindow()

void yaze::editor::WindowDelegate::UndockWindow ( const std::string &  window_id)

Definition at line 92 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ SetDockSpace()

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.

◆ SaveLayout()

absl::Status yaze::editor::WindowDelegate::SaveLayout ( const std::string &  preset_name)

Definition at line 105 of file window_delegate.cc.

References GetLayoutFilePath().

Here is the call graph for this function:

◆ LoadLayout()

absl::Status yaze::editor::WindowDelegate::LoadLayout ( const std::string &  preset_name)
Todo:
Parse and apply layout data

Definition at line 139 of file window_delegate.cc.

References GetLayoutFilePath().

Here is the call graph for this function:

◆ ResetLayout()

absl::Status yaze::editor::WindowDelegate::ResetLayout ( )

Definition at line 172 of file window_delegate.cc.

◆ GetAvailableLayouts()

std::vector< std::string > yaze::editor::WindowDelegate::GetAvailableLayouts ( ) const
Todo:
Use proper config path

Definition at line 179 of file window_delegate.cc.

◆ SaveWorkspaceLayout()

void yaze::editor::WindowDelegate::SaveWorkspaceLayout ( )

◆ LoadWorkspaceLayout()

void yaze::editor::WindowDelegate::LoadWorkspaceLayout ( )

◆ ResetWorkspaceLayout()

void yaze::editor::WindowDelegate::ResetWorkspaceLayout ( )

◆ LoadDeveloperLayout()

void yaze::editor::WindowDelegate::LoadDeveloperLayout ( )
Todo:
Implement developer-specific layout

Definition at line 261 of file window_delegate.cc.

Referenced by yaze::editor::EditorManager::LoadDeveloperLayout().

◆ LoadDesignerLayout()

void yaze::editor::WindowDelegate::LoadDesignerLayout ( )
Todo:
Implement designer-specific layout

Definition at line 266 of file window_delegate.cc.

Referenced by yaze::editor::EditorManager::LoadDesignerLayout().

◆ LoadModderLayout()

void yaze::editor::WindowDelegate::LoadModderLayout ( )
Todo:
Implement modder-specific layout

Definition at line 271 of file window_delegate.cc.

Referenced by yaze::editor::EditorManager::LoadModderLayout().

◆ GetVisibleWindows()

std::vector< std::string > yaze::editor::WindowDelegate::GetVisibleWindows ( ) const
Todo:
Implement actual visibility checking

Definition at line 199 of file window_delegate.cc.

◆ GetHiddenWindows()

std::vector< std::string > yaze::editor::WindowDelegate::GetHiddenWindows ( ) const
Todo:
Implement actual visibility checking

Definition at line 205 of file window_delegate.cc.

◆ GetWindowSize()

ImVec2 yaze::editor::WindowDelegate::GetWindowSize ( const std::string &  window_id) const
Todo:
Implement actual size retrieval

Definition at line 211 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ GetWindowPosition()

ImVec2 yaze::editor::WindowDelegate::GetWindowPosition ( const std::string &  window_id) const
Todo:
Implement actual position retrieval

Definition at line 219 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

◆ ShowWindowsInCategory()

void yaze::editor::WindowDelegate::ShowWindowsInCategory ( const std::string &  category)
Todo:
Implement category-based window showing

Definition at line 227 of file window_delegate.cc.

◆ HideWindowsInCategory()

void yaze::editor::WindowDelegate::HideWindowsInCategory ( const std::string &  category)
Todo:
Implement category-based window hiding

Definition at line 232 of file window_delegate.cc.

◆ ShowOnlyWindow()

void yaze::editor::WindowDelegate::ShowOnlyWindow ( const std::string &  window_id)
Todo:
Implement show-only functionality

Definition at line 237 of file window_delegate.cc.

◆ RegisterWindow()

void yaze::editor::WindowDelegate::RegisterWindow ( const std::string &  window_id,
const std::string &  category = "" 
)

◆ UnregisterWindow()

void yaze::editor::WindowDelegate::UnregisterWindow ( const std::string &  window_id)

Definition at line 253 of file window_delegate.cc.

References registered_windows_.

◆ LoadMinimalLayout()

void yaze::editor::WindowDelegate::LoadMinimalLayout ( )
Todo:
Implement minimal layout

Definition at line 276 of file window_delegate.cc.

◆ IsWindowRegistered()

bool yaze::editor::WindowDelegate::IsWindowRegistered ( const std::string &  window_id) const
private

◆ GetLayoutFilePath()

std::string yaze::editor::WindowDelegate::GetLayoutFilePath ( const std::string &  preset_name) const
private
Todo:
Use proper config directory path

Definition at line 286 of file window_delegate.cc.

Referenced by LoadLayout(), and SaveLayout().

◆ ApplyLayoutToWindow()

void yaze::editor::WindowDelegate::ApplyLayoutToWindow ( const std::string &  window_id,
const std::string &  layout_data 
)
private
Todo:
Implement layout application

Definition at line 291 of file window_delegate.cc.

References IsWindowRegistered().

Here is the call graph for this function:

Member Data Documentation

◆ registered_windows_

std::unordered_map<std::string, WindowInfo> yaze::editor::WindowDelegate::registered_windows_
private

The documentation for this class was generated from the following files: