yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
workspace_manager.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_UI_WORKSPACE_MANAGER_H_
2#define YAZE_APP_EDITOR_UI_WORKSPACE_MANAGER_H_
3
4#include <deque>
5#include <string>
6#include "absl/status/status.h"
7
8namespace yaze {
9class Rom;
10
11namespace editor {
12
13class EditorSet;
14class ToastManager;
15
20 public:
21 struct SessionInfo {
24 std::string custom_name;
25 std::string filepath;
26 };
27
28 explicit WorkspaceManager(ToastManager* toast_manager)
29 : toast_manager_(toast_manager) {}
30
31 // Layout management
32 absl::Status SaveWorkspaceLayout(const std::string& name = "");
33 absl::Status LoadWorkspaceLayout(const std::string& name = "");
34 absl::Status ResetWorkspaceLayout();
35
36 // Preset management
37 void SaveWorkspacePreset(const std::string& name);
38 void LoadWorkspacePreset(const std::string& name);
39 void RefreshPresets();
41 void LoadDesignerLayout();
42 void LoadModderLayout();
43
44 // Window management
45 void ShowAllWindows();
46 void HideAllWindows();
48 void RestoreAllWindows();
50
51 // Session queries
52 size_t GetActiveSessionCount() const;
53 bool HasDuplicateSession(const std::string& filepath) const;
54
55 void set_sessions(std::deque<SessionInfo>* sessions) { sessions_ = sessions; }
56
57 const std::vector<std::string>& workspace_presets() const { return workspace_presets_; }
59
60 private:
62 std::deque<SessionInfo>* sessions_ = nullptr;
64 std::vector<std::string> workspace_presets_;
66};
67
68} // namespace editor
69} // namespace yaze
70
71#endif // YAZE_APP_EDITOR_UI_WORKSPACE_MANAGER_H_
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:71
Contains a complete set of editors for a single ROM instance.
Manages workspace layouts, sessions, and presets.
void SaveWorkspacePreset(const std::string &name)
bool HasDuplicateSession(const std::string &filepath) const
WorkspaceManager(ToastManager *toast_manager)
std::vector< std::string > workspace_presets_
const std::vector< std::string > & workspace_presets() const
void set_sessions(std::deque< SessionInfo > *sessions)
std::deque< SessionInfo > * sessions_
void LoadWorkspacePreset(const std::string &name)
absl::Status SaveWorkspaceLayout(const std::string &name="")
absl::Status LoadWorkspaceLayout(const std::string &name="")
Main namespace for the application.