yaze
0.2.2
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"
7
#include "
app/editor/system/command_manager.h
"
8
#include "
app/editor/system/extension_manager.h
"
9
#include "
app/editor/system/history_manager.h
"
10
11
namespace
yaze
{
12
17
namespace
editor
{
18
19
struct
EditorContext
{
20
CommandManager
command_manager
;
21
ExtensionManager
extension_manager
;
22
HistoryManager
history_manager
;
23
};
24
25
enum class
EditorType
{
26
kAssembly
,
27
kDungeon
,
28
kGraphics
,
29
kMusic
,
30
kOverworld
,
31
kPalette
,
32
kScreen
,
33
kSprite
,
34
kMessage
,
35
kSettings
,
36
};
37
38
constexpr
std::array<const char *, 10>
kEditorNames
= {
39
"Assembly"
,
"Dungeon"
,
"Graphics"
,
"Music"
,
"Overworld"
,
40
"Palette"
,
"Screen"
,
"Sprite"
,
"Message"
,
"Settings"
,
41
};
42
49
class
Editor
{
50
public
:
51
Editor
() =
default
;
52
virtual
~Editor
() =
default
;
53
54
virtual
absl::Status
Cut
() = 0;
55
virtual
absl::Status
Copy
() = 0;
56
virtual
absl::Status
Paste
() = 0;
57
58
virtual
absl::Status
Undo
() = 0;
59
virtual
absl::Status
Redo
() = 0;
60
61
virtual
absl::Status
Update
() = 0;
62
63
virtual
absl::Status
Find
() = 0;
64
65
EditorType
type
()
const
{
return
type_
; }
66
67
protected
:
68
EditorType
type_
;
69
EditorContext
context_
;
70
};
71
72
}
// namespace editor
73
}
// namespace yaze
74
75
#endif
// YAZE_APP_CORE_EDITOR_H
yaze::editor::CommandManager
Definition
command_manager.h:15
yaze::editor::Editor::Cut
virtual absl::Status Cut()=0
yaze::editor::Editor::Copy
virtual absl::Status Copy()=0
yaze::editor::Editor::Redo
virtual absl::Status Redo()=0
yaze::editor::Editor::Editor
Editor()=default
yaze::editor::Editor::type
EditorType type() const
Definition
editor.h:65
yaze::editor::Editor::context_
EditorContext context_
Definition
editor.h:69
yaze::editor::Editor::~Editor
virtual ~Editor()=default
yaze::editor::Editor::type_
EditorType type_
Definition
editor.h:68
yaze::editor::Editor::Find
virtual absl::Status Find()=0
yaze::editor::Editor::Paste
virtual absl::Status Paste()=0
yaze::editor::Editor::Update
virtual absl::Status Update()=0
yaze::editor::Editor::Undo
virtual absl::Status Undo()=0
yaze::editor::ExtensionManager
Definition
extension_manager.h:12
yaze::editor::HistoryManager
Definition
history_manager.h:12
command_manager.h
extension_manager.h
history_manager.h
yaze::editor
Editors are the view controllers for the application.
Definition
assembly_editor.cc:13
yaze::editor::EditorType
EditorType
Definition
editor.h:25
yaze::editor::EditorType::kOverworld
@ kOverworld
Definition
editor.h:30
yaze::editor::EditorType::kGraphics
@ kGraphics
Definition
editor.h:28
yaze::editor::EditorType::kDungeon
@ kDungeon
Definition
editor.h:27
yaze::editor::EditorType::kSprite
@ kSprite
Definition
editor.h:33
yaze::editor::EditorType::kMusic
@ kMusic
Definition
editor.h:29
yaze::editor::EditorType::kScreen
@ kScreen
Definition
editor.h:32
yaze::editor::EditorType::kMessage
@ kMessage
Definition
editor.h:34
yaze::editor::EditorType::kAssembly
@ kAssembly
Definition
editor.h:26
yaze::editor::EditorType::kPalette
@ kPalette
Definition
editor.h:31
yaze::editor::EditorType::kSettings
@ kSettings
Definition
editor.h:35
yaze::editor::kEditorNames
constexpr std::array< const char *, 10 > kEditorNames
Definition
editor.h:38
yaze
Main namespace for the application.
Definition
controller.cc:18
yaze::editor::EditorContext
Definition
editor.h:19
yaze::editor::EditorContext::command_manager
CommandManager command_manager
Definition
editor.h:20
yaze::editor::EditorContext::extension_manager
ExtensionManager extension_manager
Definition
editor.h:21
yaze::editor::EditorContext::history_manager
HistoryManager history_manager
Definition
editor.h:22
src
app
editor
editor.h
Generated by
1.13.2