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"; }
34 int GetPriority() const override { return 10; }
35 bool IsVisibleByDefault() const override { return true; }
36 float GetPreferredWidth() const override { return 600.0f; }
37
38 void Draw(bool* p_open) override {
39 if (draw_callback_) {
41 }
42 }
43
44 private:
46};
47
52 public:
53 using DrawCallback = std::function<void()>;
54
55 explicit AssemblyFileBrowserPanel(DrawCallback draw_callback)
56 : draw_callback_(std::move(draw_callback)) {}
57
58 std::string GetId() const override { return "assembly.file_browser"; }
59 std::string GetDisplayName() const override { return "File Browser"; }
60 std::string GetIcon() const override { return ICON_MD_FOLDER_OPEN; }
61 std::string GetEditorCategory() const override { return "Assembly"; }
65 int GetPriority() const override { return 20; }
66 bool IsVisibleByDefault() const override { return true; }
67 float GetPreferredWidth() const override { return 280.0f; }
68
69 void Draw(bool* p_open) override {
70 if (draw_callback_) {
72 }
73 }
74
75 private:
77};
78
83 public:
84 using DrawCallback = std::function<void()>;
85
86 explicit AssemblySymbolsPanel(DrawCallback draw_callback)
87 : draw_callback_(std::move(draw_callback)) {}
88
89 std::string GetId() const override { return "assembly.symbols"; }
90 std::string GetDisplayName() const override { return "Symbols"; }
91 std::string GetIcon() const override { return ICON_MD_LIST_ALT; }
92 std::string GetEditorCategory() const override { return "Assembly"; }
96 int GetPriority() const override { return 30; }
97 float GetPreferredWidth() const override { return 320.0f; }
98
99 void Draw(bool* p_open) override {
100 if (draw_callback_) {
102 }
103 }
104
105 private:
107};
108
113 public:
114 using DrawCallback = std::function<void()>;
115
117 : draw_callback_(std::move(draw_callback)) {}
118
119 std::string GetId() const override { return "assembly.build_output"; }
120 std::string GetDisplayName() const override { return "Build Output"; }
121 std::string GetIcon() const override { return ICON_MD_TERMINAL; }
122 std::string GetEditorCategory() const override { return "Assembly"; }
126 int GetPriority() const override { return 40; }
127 float GetPreferredWidth() const override { return 400.0f; }
128
129 void Draw(bool* p_open) override {
130 if (draw_callback_) {
132 }
133 }
134
135 private:
137};
138
143 public:
144 using DrawCallback = std::function<void()>;
145
147 : draw_callback_(std::move(draw_callback)) {}
148
149 std::string GetId() const override { return "assembly.disassembly"; }
150 std::string GetDisplayName() const override { return "Disassembly"; }
151 std::string GetIcon() const override { return ICON_MD_MEMORY; }
152 std::string GetEditorCategory() const override { return "Assembly"; }
156 int GetPriority() const override { return 35; }
157 float GetPreferredWidth() const override { return 420.0f; }
158
159 void Draw(bool* p_open) override {
160 if (draw_callback_) {
162 }
163 }
164
165 private:
167};
168
173 public:
174 using DrawCallback = std::function<void()>;
175
176 explicit AssemblyToolbarPanel(DrawCallback draw_callback)
177 : draw_callback_(std::move(draw_callback)) {}
178
179 std::string GetId() const override { return "assembly.toolbar"; }
180 std::string GetDisplayName() const override { return "Toolbar"; }
181 std::string GetIcon() const override { return ICON_MD_CONSTRUCTION; }
182 std::string GetEditorCategory() const override { return "Assembly"; }
186 int GetPriority() const override { return 5; }
187 bool IsVisibleByDefault() const override { return true; }
188
189 void Draw(bool* p_open) override {
190 if (draw_callback_) {
192 }
193 }
194
195 private:
197};
198
199} // namespace editor
200} // namespace yaze
201
202#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.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
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)
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
Read-only disassembly browser panel.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
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.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
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)
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
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.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
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
static WindowPresentationPolicy CoreWorkspace()
static WindowPresentationPolicy OptionalPopOut()