yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
project_management_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SHELL_WINDOWS_PROJECT_MANAGEMENT_PANEL_H_
2#define YAZE_APP_EDITOR_SHELL_WINDOWS_PROJECT_MANAGEMENT_PANEL_H_
3
4#include <array>
5#include <functional>
6#include <string>
7#include <vector>
8
9#include "absl/status/status.h"
11#include "core/project.h"
13
14namespace yaze {
15
16class Rom;
17
18namespace editor {
19
20class ToastManager;
21
33 friend class ProjectUiTestPeer;
34
35 public:
37
38 // Dependencies
39 void SetProject(project::YazeProject* project, bool dirty = false);
41 version_manager_ = manager;
42 }
43 void SetRom(Rom* rom) { rom_ = rom; }
44 void SetToastManager(ToastManager* manager) { toast_manager_ = manager; }
45
46 // Callbacks for actions that need EditorManager
47 using SwapRomCallback = std::function<void()>;
48 using ReloadRomCallback = std::function<void()>;
49 using SaveProjectCallback = std::function<absl::Status()>;
50 using BuildProjectCallback = std::function<void()>;
51 using CancelBuildCallback = std::function<void()>;
52 using RunProjectCallback = std::function<void()>;
53 using BrowseFolderCallback = std::function<void(const std::string& type)>;
54
73 build_status_ = status;
74 }
75 void SetRunStatus(const ProjectWorkflowStatus& status) {
76 run_status_ = status;
77 }
78 void SetBuildLogOutput(const std::string& output) {
79 build_log_output_ = output;
80 }
81
82 bool IsProjectDirty() const { return project_dirty_; }
83 void SetProjectDirty(bool dirty) { project_dirty_ = dirty; }
84 absl::Status SaveProjectEdits();
85
86 // Main draw entry point
87 void Draw();
88
89 private:
92 void DrawRomManagement();
93 void DrawVersionControl();
95 void DrawQuickActions();
97
100 Rom* rom_ = nullptr;
102
103 // Callbacks
111
112 // Snapshot creation UI state
113 char snapshot_message_[256] = {};
115
116 // History cache
117 std::vector<std::string> history_cache_;
118 bool history_dirty_ = true;
119
120 // Project edit state
121 bool project_dirty_ = false;
122 std::array<char, 256> name_buffer_{};
123 std::array<char, 256> author_buffer_{};
124 std::array<char, 1024> description_buffer_{};
125 std::array<char, 512> code_buffer_{};
126 std::array<char, 512> assets_buffer_{};
127 std::array<char, 256> build_buffer_{};
128 std::array<char, 512> script_buffer_{};
129
132 std::string build_log_output_;
133};
134
135} // namespace editor
136} // namespace yaze
137
138#endif // YAZE_APP_EDITOR_SHELL_WINDOWS_PROJECT_MANAGEMENT_PANEL_H_
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:49
Manages project versioning (Git) and ROM artifact snapshots.
Panel for managing project settings, ROM versions, and snapshots.
std::function< absl::Status()> SaveProjectCallback
void SetVersionManager(core::VersionManager *manager)
void SetRunProjectCallback(RunProjectCallback cb)
void SetBuildStatus(const ProjectWorkflowStatus &status)
void SetProject(project::YazeProject *project, bool dirty=false)
void SetBrowseFolderCallback(BrowseFolderCallback cb)
void SetSaveProjectCallback(SaveProjectCallback cb)
void SetBuildProjectCallback(BuildProjectCallback cb)
std::function< void(const std::string &type)> BrowseFolderCallback
void SetBuildLogOutput(const std::string &output)
void SetRunStatus(const ProjectWorkflowStatus &status)
void SetCancelBuildCallback(CancelBuildCallback cb)
void SetReloadRomCallback(ReloadRomCallback cb)
Modern project structure with comprehensive settings consolidation.
Definition project.h:287