yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
assembly_editor_views.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_CODE_PANELS_ASSEMBLY_EDITOR_PANELS_H_
2#define YAZE_APP_EDITOR_CODE_PANELS_ASSEMBLY_EDITOR_PANELS_H_
3
4#include <functional>
5#include <string>
6
9
10namespace yaze {
11namespace editor {
12
13// =============================================================================
14// WindowContent wrappers for AssemblyEditor panels
15// =============================================================================
16
21 public:
22 using DrawCallback = std::function<void()>;
23
24 explicit AssemblyCodeEditorPanel(DrawCallback draw_callback)
25 : draw_callback_(std::move(draw_callback)) {}
26
27 std::string GetId() const override { return "assembly.code_editor"; }
28 std::string GetDisplayName() const override { return "Code Editor"; }
29 std::string GetIcon() const override { return ICON_MD_CODE; }
30 std::string GetEditorCategory() const override { return "Assembly"; }
31 int GetPriority() const override { return 10; }
32 bool IsVisibleByDefault() const override { return true; }
33 float GetPreferredWidth() const override { return 600.0f; }
34
35 void Draw(bool* p_open) override {
36 if (draw_callback_) {
38 }
39 }
40
41 private:
43};
44
49 public:
50 using DrawCallback = std::function<void()>;
51
52 explicit AssemblyFileBrowserPanel(DrawCallback draw_callback)
53 : draw_callback_(std::move(draw_callback)) {}
54
55 std::string GetId() const override { return "assembly.file_browser"; }
56 std::string GetDisplayName() const override { return "File Browser"; }
57 std::string GetIcon() const override { return ICON_MD_FOLDER_OPEN; }
58 std::string GetEditorCategory() const override { return "Assembly"; }
59 int GetPriority() const override { return 20; }
60 bool IsVisibleByDefault() const override { return true; }
61 float GetPreferredWidth() const override { return 280.0f; }
62
63 void Draw(bool* p_open) override {
64 if (draw_callback_) {
66 }
67 }
68
69 private:
71};
72
77 public:
78 using DrawCallback = std::function<void()>;
79
80 explicit AssemblySymbolsPanel(DrawCallback draw_callback)
81 : draw_callback_(std::move(draw_callback)) {}
82
83 std::string GetId() const override { return "assembly.symbols"; }
84 std::string GetDisplayName() const override { return "Symbols"; }
85 std::string GetIcon() const override { return ICON_MD_LIST_ALT; }
86 std::string GetEditorCategory() const override { return "Assembly"; }
87 int GetPriority() const override { return 30; }
88 float GetPreferredWidth() const override { return 320.0f; }
89
90 void Draw(bool* p_open) override {
91 if (draw_callback_) {
93 }
94 }
95
96 private:
98};
99
104 public:
105 using DrawCallback = std::function<void()>;
106
108 : draw_callback_(std::move(draw_callback)) {}
109
110 std::string GetId() const override { return "assembly.build_output"; }
111 std::string GetDisplayName() const override { return "Build Output"; }
112 std::string GetIcon() const override { return ICON_MD_TERMINAL; }
113 std::string GetEditorCategory() const override { return "Assembly"; }
114 int GetPriority() const override { return 40; }
115 float GetPreferredWidth() const override { return 400.0f; }
116
117 void Draw(bool* p_open) override {
118 if (draw_callback_) {
120 }
121 }
122
123 private:
125};
126
131 public:
132 using DrawCallback = std::function<void()>;
133
135 : draw_callback_(std::move(draw_callback)) {}
136
137 std::string GetId() const override { return "assembly.disassembly"; }
138 std::string GetDisplayName() const override { return "Disassembly"; }
139 std::string GetIcon() const override { return ICON_MD_MEMORY; }
140 std::string GetEditorCategory() const override { return "Assembly"; }
141 int GetPriority() const override { return 35; }
142 float GetPreferredWidth() const override { return 420.0f; }
143
144 void Draw(bool* p_open) override {
145 if (draw_callback_) {
147 }
148 }
149
150 private:
152};
153
158 public:
159 using DrawCallback = std::function<void()>;
160
161 explicit AssemblyToolbarPanel(DrawCallback draw_callback)
162 : draw_callback_(std::move(draw_callback)) {}
163
164 std::string GetId() const override { return "assembly.toolbar"; }
165 std::string GetDisplayName() const override { return "Toolbar"; }
166 std::string GetIcon() const override { return ICON_MD_CONSTRUCTION; }
167 std::string GetEditorCategory() const override { return "Assembly"; }
168 int GetPriority() const override { return 5; }
169 bool IsVisibleByDefault() const override { return true; }
170
171 void Draw(bool* p_open) override {
172 if (draw_callback_) {
174 }
175 }
176
177 private:
179};
180
181} // namespace editor
182} // namespace yaze
183
184#endif // YAZE_APP_EDITOR_CODE_PANELS_ASSEMBLY_EDITOR_PANELS_H_
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
void Draw(bool *p_open) override
Draw the panel content.
int GetPriority() const override
Get display priority for menu ordering.
std::string GetId() const override
Unique identifier for this panel.
std::string GetIcon() const override
Material Design icon for this panel.
AssemblyBuildOutputPanel(DrawCallback draw_callback)
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
Main code editor panel with text editing.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetIcon() const override
Material Design icon for this panel.
std::string GetId() const override
Unique identifier for this panel.
bool IsVisibleByDefault() const override
Whether this panel should be visible by default.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
int GetPriority() const override
Get display priority for menu ordering.
AssemblyCodeEditorPanel(DrawCallback draw_callback)
Read-only disassembly browser panel.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
AssemblyDisassemblyPanel(DrawCallback draw_callback)
std::string GetId() const override
Unique identifier for this panel.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetIcon() const override
Material Design icon for this panel.
File browser panel for navigating project files.
AssemblyFileBrowserPanel(DrawCallback draw_callback)
bool IsVisibleByDefault() const override
Whether this panel should be visible by default.
int GetPriority() const override
Get display priority for menu ordering.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetId() const override
Unique identifier for this panel.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
std::string GetIcon() const override
Material Design icon for this panel.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
void Draw(bool *p_open) override
Draw the panel content.
int GetPriority() const override
Get display priority for menu ordering.
std::string GetId() const override
Unique identifier for this panel.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetIcon() const override
Material Design icon for this panel.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
AssemblySymbolsPanel(DrawCallback draw_callback)
void Draw(bool *p_open) override
Draw the panel content.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
Toolbar panel with quick actions.
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the panel content.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
bool IsVisibleByDefault() const override
Whether this panel should be visible by default.
std::string GetId() const override
Unique identifier for this panel.
std::string GetIcon() const override
Material Design icon for this panel.
AssemblyToolbarPanel(DrawCallback draw_callback)
Base interface for all logical window content components.
#define ICON_MD_FOLDER_OPEN
Definition icons.h:813
#define ICON_MD_MEMORY
Definition icons.h:1195
#define ICON_MD_CONSTRUCTION
Definition icons.h:458
#define ICON_MD_CODE
Definition icons.h:434
#define ICON_MD_LIST_ALT
Definition icons.h:1095
#define ICON_MD_TERMINAL
Definition icons.h:1951