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

Manages workspace layouts, sessions, and presets. More...

#include <workspace_manager.h>

Collaboration diagram for yaze::editor::WorkspaceManager:

Classes

struct  SessionInfo
 

Public Member Functions

 WorkspaceManager (ToastManager *toast_manager)
 
void set_panel_manager (PanelManager *manager)
 
void set_layout_manager (LayoutManager *manager)
 
void set_apply_preset_callback (std::function< void(const std::string &)> callback)
 
absl::Status SaveWorkspaceLayout (const std::string &name="")
 
absl::Status LoadWorkspaceLayout (const std::string &name="")
 
absl::Status ResetWorkspaceLayout ()
 
void SaveWorkspacePreset (const std::string &name)
 
void LoadWorkspacePreset (const std::string &name)
 
void RefreshPresets ()
 
void LoadDeveloperLayout ()
 
void LoadDesignerLayout ()
 
void LoadModderLayout ()
 
void ShowAllWindows ()
 
void HideAllWindows ()
 
void MaximizeCurrentWindow ()
 
void RestoreAllWindows ()
 
void CloseAllFloatingWindows ()
 
void FocusNextWindow ()
 
void FocusPreviousWindow ()
 
void SplitWindowHorizontal ()
 
void SplitWindowVertical ()
 
void CloseCurrentWindow ()
 
void ExecuteWorkspaceCommand (const std::string &command_id)
 
size_t GetActiveSessionCount () const
 
bool HasDuplicateSession (const std::string &filepath) const
 
void set_sessions (std::deque< SessionInfo > *sessions)
 
const std::vector< std::string > & workspace_presets () const
 
bool workspace_presets_loaded () const
 

Private Attributes

ToastManagertoast_manager_
 
PanelManagerpanel_manager_ = nullptr
 
LayoutManagerlayout_manager_ = nullptr
 
std::function< void(const std::string &) apply_preset_callback_ )
 
std::deque< SessionInfo > * sessions_ = nullptr
 
std::string last_workspace_preset_
 
std::vector< std::string > workspace_presets_
 
bool workspace_presets_loaded_ = false
 

Detailed Description

Manages workspace layouts, sessions, and presets.

Definition at line 23 of file workspace_manager.h.

Constructor & Destructor Documentation

◆ WorkspaceManager()

yaze::editor::WorkspaceManager::WorkspaceManager ( ToastManager * toast_manager)
inlineexplicit

Definition at line 32 of file workspace_manager.h.

Member Function Documentation

◆ set_panel_manager()

void yaze::editor::WorkspaceManager::set_panel_manager ( PanelManager * manager)
inline

Definition at line 36 of file workspace_manager.h.

References panel_manager_.

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

◆ set_layout_manager()

void yaze::editor::WorkspaceManager::set_layout_manager ( LayoutManager * manager)
inline

Definition at line 40 of file workspace_manager.h.

References layout_manager_.

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

◆ set_apply_preset_callback()

void yaze::editor::WorkspaceManager::set_apply_preset_callback ( std::function< void(const std::string &)> callback)
inline

◆ SaveWorkspaceLayout()

absl::Status yaze::editor::WorkspaceManager::SaveWorkspaceLayout ( const std::string & name = "")

◆ LoadWorkspaceLayout()

absl::Status yaze::editor::WorkspaceManager::LoadWorkspaceLayout ( const std::string & name = "")

◆ ResetWorkspaceLayout()

◆ SaveWorkspacePreset()

◆ LoadWorkspacePreset()

◆ RefreshPresets()

void yaze::editor::WorkspaceManager::RefreshPresets ( )

◆ LoadDeveloperLayout()

void yaze::editor::WorkspaceManager::LoadDeveloperLayout ( )

Definition at line 185 of file workspace_manager.cc.

References apply_preset_callback_, yaze::editor::kWarning, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by ExecuteWorkspaceCommand().

Here is the call graph for this function:

◆ LoadDesignerLayout()

void yaze::editor::WorkspaceManager::LoadDesignerLayout ( )

Definition at line 193 of file workspace_manager.cc.

References apply_preset_callback_, yaze::editor::kWarning, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by ExecuteWorkspaceCommand().

Here is the call graph for this function:

◆ LoadModderLayout()

void yaze::editor::WorkspaceManager::LoadModderLayout ( )

Definition at line 201 of file workspace_manager.cc.

References apply_preset_callback_, yaze::editor::kWarning, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by ExecuteWorkspaceCommand().

Here is the call graph for this function:

◆ ShowAllWindows()

void yaze::editor::WorkspaceManager::ShowAllWindows ( )

Definition at line 209 of file workspace_manager.cc.

References yaze::editor::kInfo, panel_manager_, yaze::editor::ToastManager::Show(), yaze::editor::PanelManager::ShowAll(), and toast_manager_.

Referenced by ExecuteWorkspaceCommand().

Here is the call graph for this function:

◆ HideAllWindows()

void yaze::editor::WorkspaceManager::HideAllWindows ( )

Definition at line 218 of file workspace_manager.cc.

References yaze::editor::PanelManager::HideAll(), yaze::editor::kInfo, panel_manager_, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by ExecuteWorkspaceCommand().

Here is the call graph for this function:

◆ MaximizeCurrentWindow()

void yaze::editor::WorkspaceManager::MaximizeCurrentWindow ( )

Definition at line 227 of file workspace_manager.cc.

References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by ExecuteWorkspaceCommand().

Here is the call graph for this function:

◆ RestoreAllWindows()

void yaze::editor::WorkspaceManager::RestoreAllWindows ( )

Definition at line 240 of file workspace_manager.cc.

References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by ExecuteWorkspaceCommand().

Here is the call graph for this function:

◆ CloseAllFloatingWindows()

void yaze::editor::WorkspaceManager::CloseAllFloatingWindows ( )

Definition at line 255 of file workspace_manager.cc.

References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by ExecuteWorkspaceCommand().

Here is the call graph for this function:

◆ FocusNextWindow()

void yaze::editor::WorkspaceManager::FocusNextWindow ( )
Todo
Implement proper window cycling

Definition at line 297 of file workspace_manager.cc.

◆ FocusPreviousWindow()

void yaze::editor::WorkspaceManager::FocusPreviousWindow ( )
Todo
Implement window cycling backward

Definition at line 305 of file workspace_manager.cc.

◆ SplitWindowHorizontal()

void yaze::editor::WorkspaceManager::SplitWindowHorizontal ( )

Definition at line 309 of file workspace_manager.cc.

Referenced by ExecuteWorkspaceCommand().

◆ SplitWindowVertical()

void yaze::editor::WorkspaceManager::SplitWindowVertical ( )

Definition at line 320 of file workspace_manager.cc.

Referenced by ExecuteWorkspaceCommand().

◆ CloseCurrentWindow()

void yaze::editor::WorkspaceManager::CloseCurrentWindow ( )

Definition at line 331 of file workspace_manager.cc.

Referenced by ExecuteWorkspaceCommand().

◆ ExecuteWorkspaceCommand()

◆ GetActiveSessionCount()

size_t yaze::editor::WorkspaceManager::GetActiveSessionCount ( ) const

Definition at line 270 of file workspace_manager.cc.

References sessions_.

◆ HasDuplicateSession()

bool yaze::editor::WorkspaceManager::HasDuplicateSession ( const std::string & filepath) const

Definition at line 283 of file workspace_manager.cc.

References sessions_.

◆ set_sessions()

void yaze::editor::WorkspaceManager::set_sessions ( std::deque< SessionInfo > * sessions)
inline

Definition at line 80 of file workspace_manager.h.

References sessions_.

◆ workspace_presets()

const std::vector< std::string > & yaze::editor::WorkspaceManager::workspace_presets ( ) const
inline

Definition at line 82 of file workspace_manager.h.

References workspace_presets_.

◆ workspace_presets_loaded()

bool yaze::editor::WorkspaceManager::workspace_presets_loaded ( ) const
inline

Definition at line 85 of file workspace_manager.h.

References workspace_presets_loaded_.

Member Data Documentation

◆ toast_manager_

◆ panel_manager_

PanelManager* yaze::editor::WorkspaceManager::panel_manager_ = nullptr
private

◆ layout_manager_

LayoutManager* yaze::editor::WorkspaceManager::layout_manager_ = nullptr
private

◆ apply_preset_callback_

std::function<void(const std::string&) yaze::editor::WorkspaceManager::apply_preset_callback_)
private

◆ sessions_

std::deque<SessionInfo>* yaze::editor::WorkspaceManager::sessions_ = nullptr
private

Definition at line 92 of file workspace_manager.h.

Referenced by GetActiveSessionCount(), HasDuplicateSession(), and set_sessions().

◆ last_workspace_preset_

std::string yaze::editor::WorkspaceManager::last_workspace_preset_
private

Definition at line 93 of file workspace_manager.h.

Referenced by LoadWorkspacePreset(), and SaveWorkspacePreset().

◆ workspace_presets_

std::vector<std::string> yaze::editor::WorkspaceManager::workspace_presets_
private

Definition at line 94 of file workspace_manager.h.

Referenced by RefreshPresets(), SaveWorkspacePreset(), and workspace_presets().

◆ workspace_presets_loaded_

bool yaze::editor::WorkspaceManager::workspace_presets_loaded_ = false
private

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