yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
message_editor_views.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_MESSAGE_PANELS_MESSAGE_EDITOR_PANELS_H_
2#define YAZE_APP_EDITOR_MESSAGE_PANELS_MESSAGE_EDITOR_PANELS_H_
3
4#include <functional>
5#include <string>
6
9
10namespace yaze {
11namespace editor {
12
13// =============================================================================
14// WindowContent wrappers for MessageEditor panels
15// =============================================================================
16
21 public:
22 using DrawCallback = std::function<void()>;
23
24 explicit MessageListPanel(DrawCallback draw_callback)
25 : draw_callback_(std::move(draw_callback)) {}
26
27 std::string GetId() const override { return "message.message_list"; }
28 std::string GetDisplayName() const override { return "Message List"; }
29 std::string GetIcon() const override { return ICON_MD_LIST; }
30 std::string GetEditorCategory() const override { return "Message"; }
34 int GetPriority() const override { return 10; }
35
36 void Draw(bool* p_open) override {
37 if (draw_callback_) {
39 }
40 }
41
42 private:
44};
45
50 public:
51 using DrawCallback = std::function<void()>;
52
53 explicit MessageEditorPanel(DrawCallback draw_callback)
54 : draw_callback_(std::move(draw_callback)) {}
55
56 std::string GetId() const override { return "message.message_editor"; }
57 std::string GetDisplayName() const override { return "Message Editor"; }
58 std::string GetIcon() const override { return ICON_MD_EDIT; }
59 std::string GetEditorCategory() const override { return "Message"; }
63 int GetPriority() const override { return 20; }
64
65 void Draw(bool* p_open) override {
66 if (draw_callback_) {
68 }
69 }
70
71 private:
73};
74
79 public:
80 using DrawCallback = std::function<void()>;
81
82 explicit FontAtlasPanel(DrawCallback draw_callback)
83 : draw_callback_(std::move(draw_callback)) {}
84
85 std::string GetId() const override { return "message.font_atlas"; }
86 std::string GetDisplayName() const override { return "Font Atlas"; }
87 std::string GetIcon() const override { return ICON_MD_FONT_DOWNLOAD; }
88 std::string GetEditorCategory() const override { return "Message"; }
92 int GetPriority() const override { return 30; }
93
94 void Draw(bool* p_open) override {
95 if (draw_callback_) {
97 }
98 }
99
100 private:
102};
103
108 public:
109 using DrawCallback = std::function<void()>;
110
111 explicit DictionaryPanel(DrawCallback draw_callback)
112 : draw_callback_(std::move(draw_callback)) {}
113
114 std::string GetId() const override { return "message.dictionary"; }
115 std::string GetDisplayName() const override { return "Dictionary"; }
116 std::string GetIcon() const override { return ICON_MD_BOOK; }
117 std::string GetEditorCategory() const override { return "Message"; }
121 int GetPriority() const override { return 40; }
122
123 void Draw(bool* p_open) override {
124 if (draw_callback_) {
126 }
127 }
128
129 private:
131};
132
133} // namespace editor
134} // namespace yaze
135
136#endif // YAZE_APP_EDITOR_MESSAGE_PANELS_MESSAGE_EDITOR_PANELS_H_
WindowContent for Dictionary.
std::function< void()> DrawCallback
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 GetEditorCategory() const override
Editor category this panel belongs to.
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the panel content.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
std::string GetIcon() const override
Material Design icon for this panel.
DictionaryPanel(DrawCallback draw_callback)
WindowContent for Font Atlas.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetId() const override
Unique identifier for this panel.
void Draw(bool *p_open) override
Draw the panel content.
std::function< void()> DrawCallback
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetIcon() const override
Material Design icon for this panel.
int GetPriority() const override
Get display priority for menu ordering.
FontAtlasPanel(DrawCallback draw_callback)
WindowContent for Message Editor.
MessageEditorPanel(DrawCallback draw_callback)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetId() const override
Unique identifier for this panel.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
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.
int GetPriority() const override
Get display priority for menu ordering.
void Draw(bool *p_open) override
Draw the panel content.
WindowContent for Message List.
MessageListPanel(DrawCallback draw_callback)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetId() const override
Unique identifier for this panel.
std::string GetIcon() const override
Material Design icon for this panel.
std::function< void()> DrawCallback
void Draw(bool *p_open) override
Draw the panel content.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
WindowPresentationPolicy GetPresentationPolicy() const override
How this content is hosted and advertised by workspace chrome.
int GetPriority() const override
Get display priority for menu ordering.
Base interface for all logical window content components.
#define ICON_MD_FONT_DOWNLOAD
Definition icons.h:818
#define ICON_MD_EDIT
Definition icons.h:645
#define ICON_MD_LIST
Definition icons.h:1094
#define ICON_MD_BOOK
Definition icons.h:283
static WindowPresentationPolicy CoreWorkspace()
static WindowPresentationPolicy OptionalPopOut()