Manages workspace layouts, sessions, and presets. More...
#include <workspace_manager.h>

Classes | |
| struct | SessionInfo |
Public Member Functions | |
| WorkspaceManager (ToastManager *toast_manager) | |
| void | set_card_registry (EditorCardRegistry *registry) |
| 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 | |
| ToastManager * | toast_manager_ |
| EditorCardRegistry * | card_registry_ = nullptr |
| std::deque< SessionInfo > * | sessions_ = nullptr |
| std::string | last_workspace_preset_ |
| std::vector< std::string > | workspace_presets_ |
| bool | workspace_presets_loaded_ = false |
Manages workspace layouts, sessions, and presets.
Definition at line 20 of file workspace_manager.h.
|
inlineexplicit |
Definition at line 29 of file workspace_manager.h.
|
inline |
Definition at line 33 of file workspace_manager.h.
References card_registry_.
Referenced by yaze::editor::EditorManager::Initialize().
| absl::Status yaze::editor::WorkspaceManager::SaveWorkspaceLayout | ( | const std::string & | name = "" | ) |
Definition at line 16 of file workspace_manager.cc.
References yaze::editor::kSuccess, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| absl::Status yaze::editor::WorkspaceManager::LoadWorkspaceLayout | ( | const std::string & | name = "" | ) |
Definition at line 24 of file workspace_manager.cc.
References yaze::editor::kSuccess, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| absl::Status yaze::editor::WorkspaceManager::ResetWorkspaceLayout | ( | ) |
Definition at line 32 of file workspace_manager.cc.
References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::SaveWorkspacePreset | ( | const std::string & | name | ) |
Definition at line 40 of file workspace_manager.cc.
References yaze::editor::kSuccess, last_workspace_preset_, yaze::util::SaveFile(), yaze::editor::ToastManager::Show(), toast_manager_, workspace_presets_, and workspace_presets_loaded_.
Referenced by yaze::editor::EditorManager::SaveWorkspacePreset().

| void yaze::editor::WorkspaceManager::LoadWorkspacePreset | ( | const std::string & | name | ) |
Definition at line 69 of file workspace_manager.cc.
References yaze::editor::kSuccess, last_workspace_preset_, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by yaze::editor::EditorManager::LoadWorkspacePreset().

| void yaze::editor::WorkspaceManager::RefreshPresets | ( | ) |
Definition at line 80 of file workspace_manager.cc.
References yaze::util::PlatformPaths::GetConfigDirectory(), yaze::util::LoadFile(), workspace_presets_, and workspace_presets_loaded_.
Referenced by yaze::editor::EditorManager::RefreshWorkspacePresets().

| void yaze::editor::WorkspaceManager::LoadDeveloperLayout | ( | ) |
Definition at line 108 of file workspace_manager.cc.
References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::LoadDesignerLayout | ( | ) |
Definition at line 115 of file workspace_manager.cc.
References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::LoadModderLayout | ( | ) |
Definition at line 122 of file workspace_manager.cc.
References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::ShowAllWindows | ( | ) |
Definition at line 129 of file workspace_manager.cc.
References card_registry_, yaze::editor::kInfo, yaze::editor::ToastManager::Show(), yaze::editor::EditorCardRegistry::ShowAll(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::HideAllWindows | ( | ) |
Definition at line 138 of file workspace_manager.cc.
References card_registry_, yaze::editor::EditorCardRegistry::HideAll(), yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::MaximizeCurrentWindow | ( | ) |
Definition at line 147 of file workspace_manager.cc.
References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::RestoreAllWindows | ( | ) |
Definition at line 160 of file workspace_manager.cc.
References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::CloseAllFloatingWindows | ( | ) |
Definition at line 175 of file workspace_manager.cc.
References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by ExecuteWorkspaceCommand().

| void yaze::editor::WorkspaceManager::FocusNextWindow | ( | ) |
Definition at line 214 of file workspace_manager.cc.
| void yaze::editor::WorkspaceManager::FocusPreviousWindow | ( | ) |
Definition at line 222 of file workspace_manager.cc.
| void yaze::editor::WorkspaceManager::SplitWindowHorizontal | ( | ) |
Definition at line 226 of file workspace_manager.cc.
Referenced by ExecuteWorkspaceCommand().
| void yaze::editor::WorkspaceManager::SplitWindowVertical | ( | ) |
Definition at line 237 of file workspace_manager.cc.
Referenced by ExecuteWorkspaceCommand().
| void yaze::editor::WorkspaceManager::CloseCurrentWindow | ( | ) |
Definition at line 248 of file workspace_manager.cc.
Referenced by ExecuteWorkspaceCommand().
| void yaze::editor::WorkspaceManager::ExecuteWorkspaceCommand | ( | const std::string & | command_id | ) |
Definition at line 256 of file workspace_manager.cc.
References CloseAllFloatingWindows(), CloseCurrentWindow(), HideAllWindows(), yaze::editor::kWarning, LoadDesignerLayout(), LoadDeveloperLayout(), LoadModderLayout(), LoadWorkspaceLayout(), MaximizeCurrentWindow(), ResetWorkspaceLayout(), RestoreAllWindows(), SaveWorkspaceLayout(), yaze::editor::ToastManager::Show(), ShowAllWindows(), SplitWindowHorizontal(), SplitWindowVertical(), and toast_manager_.
| size_t yaze::editor::WorkspaceManager::GetActiveSessionCount | ( | ) | const |
Definition at line 190 of file workspace_manager.cc.
References sessions_.
| bool yaze::editor::WorkspaceManager::HasDuplicateSession | ( | const std::string & | filepath | ) | const |
Definition at line 202 of file workspace_manager.cc.
References sessions_.
|
inline |
Definition at line 69 of file workspace_manager.h.
References sessions_.
|
inline |
Definition at line 71 of file workspace_manager.h.
References workspace_presets_.
|
inline |
Definition at line 72 of file workspace_manager.h.
References workspace_presets_loaded_.
|
private |
Definition at line 75 of file workspace_manager.h.
Referenced by CloseAllFloatingWindows(), ExecuteWorkspaceCommand(), HideAllWindows(), LoadDesignerLayout(), LoadDeveloperLayout(), LoadModderLayout(), LoadWorkspaceLayout(), LoadWorkspacePreset(), MaximizeCurrentWindow(), ResetWorkspaceLayout(), RestoreAllWindows(), SaveWorkspaceLayout(), SaveWorkspacePreset(), and ShowAllWindows().
|
private |
Definition at line 76 of file workspace_manager.h.
Referenced by HideAllWindows(), set_card_registry(), and ShowAllWindows().
|
private |
Definition at line 77 of file workspace_manager.h.
Referenced by GetActiveSessionCount(), HasDuplicateSession(), and set_sessions().
|
private |
Definition at line 78 of file workspace_manager.h.
Referenced by LoadWorkspacePreset(), and SaveWorkspacePreset().
|
private |
Definition at line 79 of file workspace_manager.h.
Referenced by RefreshPresets(), SaveWorkspacePreset(), and workspace_presets().
|
private |
Definition at line 80 of file workspace_manager.h.
Referenced by RefreshPresets(), SaveWorkspacePreset(), and workspace_presets_loaded().