yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
settings_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SHELL_WINDOWS_SETTINGS_PANEL_H_
2#define YAZE_APP_EDITOR_SHELL_WINDOWS_SETTINGS_PANEL_H_
3
4#include <string>
5
6#include "app/editor/editor.h"
10#include "core/project.h"
11
12namespace yaze {
13
14class Rom;
15
16namespace editor {
17
18class WorkspaceWindowManager;
19class ShortcutManager;
20
34class SettingsPanel : public Editor {
35 public:
37
38 void SetDependencies(const EditorDependencies& deps) override;
39
40 void Initialize() override {}
41 absl::Status Load() override { return absl::OkStatus(); }
42 absl::Status Save() override { return absl::OkStatus(); }
43 absl::Status Update() override {
44 Draw();
45 return absl::OkStatus();
46 }
47
48 absl::Status Undo() override { return absl::OkStatus(); }
49 absl::Status Redo() override { return absl::OkStatus(); }
50 absl::Status Cut() override { return absl::OkStatus(); }
51 absl::Status Copy() override { return absl::OkStatus(); }
52 absl::Status Paste() override { return absl::OkStatus(); }
53 absl::Status Find() override { return absl::OkStatus(); }
54
55 void SetUserSettings(UserSettings* settings) { user_settings_ = settings; }
57 window_manager_ = registry;
58 }
60 shortcut_manager_ = manager;
61 }
62 void SetStatusBar(StatusBar* bar) { status_bar_ = bar; }
63 void SetRom(Rom* rom) { rom_ = rom; }
65
66 // Main draw entry point
67 void Draw();
68
69 private:
73 // Loads `name` from UserSettings::named_layouts, validates the
74 // serialized DockTree, and applies it to the live main dockspace via
75 // LayoutManager. Surface for the Workspace section's combo + Re-apply
76 // button. On success, persists `last_applied_layout_name = name` so a
77 // subsequent startup reapplies the same layout (mirrors the
78 // theme-persistence pattern shipped in Phase 5.1). Status is reported
79 // via workspace_status_message_.
80 void ApplyNamedLayoutToDockspace(const std::string& name);
81 void DrawEditorBehavior();
88 void DrawPanelShortcuts();
89 bool MatchesShortcutFilter(const std::string& text) const;
90 void DrawPatchSettings();
91 void DrawProjectSettings(); // New method
92 void DrawPatchList(const std::string& folder);
93 void DrawPatchDetails();
95
100 Rom* rom_ = nullptr;
101 project::YazeProject* project_ = nullptr; // Project reference
102
103 // Shortcut editing state
105 std::string editing_card_id_;
107 std::string shortcut_filter_;
108
109 // Patch system state
111 std::string selected_folder_;
113 bool patches_loaded_ = false;
114
115 // Workspace layout picker transient status — last apply attempt's
116 // outcome, drawn beneath the section. Persists across frames within a
117 // session; cleared on the next apply attempt.
120};
121
122} // namespace editor
123} // namespace yaze
124
125#endif // YAZE_APP_EDITOR_SHELL_WINDOWS_SETTINGS_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:28
Represents a ZScream-compatible ASM patch file.
Definition asm_patch.h:74
Manages a collection of ZScream-compatible ASM patches.
Interface for editor classes.
Definition editor.h:245
project::YazeProject * project() const
Definition editor.h:321
Rom * rom() const
Definition editor.h:319
EditorType type_
Definition editor.h:332
Manages the settings UI displayed in the right sidebar.
void SetStatusBar(StatusBar *bar)
void DrawPatchList(const std::string &folder)
void SetWindowManager(WorkspaceWindowManager *registry)
absl::Status Paste() override
ShortcutManager * shortcut_manager_
void SetDependencies(const EditorDependencies &deps) override
absl::Status Copy() override
void ApplyNamedLayoutToDockspace(const std::string &name)
bool MatchesShortcutFilter(const std::string &text) const
void DrawParameterWidget(core::PatchParameter *param)
absl::Status Redo() override
absl::Status Undo() override
core::AsmPatch * selected_patch_
core::PatchManager patch_manager_
project::YazeProject * project_
void SetShortcutManager(ShortcutManager *manager)
void SetUserSettings(UserSettings *settings)
absl::Status Find() override
void SetProject(project::YazeProject *project)
absl::Status Save() override
absl::Status Update() override
absl::Status Load() override
WorkspaceWindowManager * window_manager_
absl::Status Cut() override
A session-aware status bar displayed at the bottom of the application.
Definition status_bar.h:54
Manages user preferences and settings persistence.
Central registry for all editor cards with session awareness and dependency injection.
Represents a configurable parameter within an ASM patch.
Definition asm_patch.h:33
Unified dependency container for all editor types.
Definition editor.h:169
Modern project structure with comprehensive settings consolidation.
Definition project.h:172