yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
assembly_editor_panels.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// EditorPanel 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
134 explicit AssemblyToolbarPanel(DrawCallback draw_callback)
135 : draw_callback_(std::move(draw_callback)) {}
136
137 std::string GetId() const override { return "assembly.toolbar"; }
138 std::string GetDisplayName() const override { return "Toolbar"; }
139 std::string GetIcon() const override { return ICON_MD_CONSTRUCTION; }
140 std::string GetEditorCategory() const override { return "Assembly"; }
141 int GetPriority() const override { return 5; }
142 bool IsVisibleByDefault() const override { return true; }
143
144 void Draw(bool* p_open) override {
145 if (draw_callback_) {
147 }
148 }
149
150 private:
152};
153
154} // namespace editor
155} // namespace yaze
156
157#endif // YAZE_APP_EDITOR_CODE_PANELS_ASSEMBLY_EDITOR_PANELS_H_
158
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)
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 panel components.
#define ICON_MD_FOLDER_OPEN
Definition icons.h:813
#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