yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
editor.h
Go to the documentation of this file.
1#ifndef YAZE_APP_CORE_EDITOR_H
2#define YAZE_APP_CORE_EDITOR_H
3
4#include <array>
5
6#include "absl/status/status.h"
12
13namespace yaze {
14namespace app {
15
20namespace editor {
21
29
30enum class EditorType {
34 kMusic,
37 kScreen,
38 kSprite,
41};
42
43constexpr std::array<const char *, 10> kEditorNames = {
44 "Assembly", "Dungeon", "Graphics", "Music", "Overworld",
45 "Palette", "Screen", "Sprite", "Message", "Settings",
46};
47
54class Editor {
55public:
56 Editor() = default;
57 virtual ~Editor() = default;
58
59 virtual absl::Status Cut() = 0;
60 virtual absl::Status Copy() = 0;
61 virtual absl::Status Paste() = 0;
62
63 virtual absl::Status Undo() = 0;
64 virtual absl::Status Redo() = 0;
65
66 virtual absl::Status Update() = 0;
67
68 virtual absl::Status Find() = 0;
69
70 EditorType type() const { return type_; }
71
72protected:
75};
76
98
99absl::Status DrawEditor(EditorLayoutParams *params);
100
101} // namespace editor
102} // namespace app
103} // namespace yaze
104
105#endif // YAZE_APP_CORE_EDITOR_H
Interface for editor classes.
Definition editor.h:54
virtual absl::Status Cut()=0
virtual absl::Status Undo()=0
virtual absl::Status Update()=0
virtual absl::Status Find()=0
virtual absl::Status Redo()=0
virtual absl::Status Copy()=0
virtual absl::Status Paste()=0
virtual ~Editor()=default
EditorType type() const
Definition editor.h:70
EditorContext context_
Definition editor.h:74
absl::Status DrawEditor(EditorLayoutParams *params)
Definition editor.cc:10
struct yaze::app::editor::EditorLayoutParams EditorLayoutParams
Dynamic Editor Layout Parameters.
constexpr std::array< const char *, 10 > kEditorNames
Definition editor.h:43
Definition common.cc:22
static ExtensionManager extension_manager
Definition editor.h:25
static ResourceManager resource_manager
Definition editor.h:27
static HistoryManager history_manager
Definition editor.h:26
static CommandManager command_manager
Definition editor.h:24
static ConstantManager constant_manager
Definition editor.h:23
Dynamic Editor Layout Parameters.
Definition editor.h:80
EditorLayoutParams * right
Definition editor.h:87
EditorLayoutParams * left
Definition editor.h:86
EditorLayoutParams * bottom
Definition editor.h:89