Interface for editor classes. More...
#include <editor.h>
Inherited by yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::SettingsEditor, yaze::editor::SpriteEditor, and yaze::test::TestEditor.
Public Member Functions | |
Editor ()=default | |
virtual | ~Editor ()=default |
virtual void | Initialize ()=0 |
virtual absl::Status | Load ()=0 |
virtual absl::Status | Save ()=0 |
virtual absl::Status | Update ()=0 |
virtual absl::Status | Cut ()=0 |
virtual absl::Status | Copy ()=0 |
virtual absl::Status | Paste ()=0 |
virtual absl::Status | Undo ()=0 |
virtual absl::Status | Redo ()=0 |
virtual absl::Status | Find ()=0 |
virtual absl::Status | Clear () |
EditorType | type () const |
void | set_context (EditorContext *context) |
bool * | active () |
void | set_active (bool active) |
virtual bool | IsRomLoaded () const |
virtual std::string | GetRomStatus () const |
Protected Member Functions | |
std::string | MakeCardTitle (const std::string &base_title) const |
template<typename T > | |
absl::StatusOr< T > | SafeRomAccess (std::function< T()> accessor, const std::string &operation="") const |
Protected Attributes | |
bool | active_ = false |
EditorType | type_ |
EditorContext * | context_ = nullptr |
Interface for editor classes.
Provides basic editing operations that each editor should implement.
|
default |
|
virtualdefault |
|
pure virtual |
Implemented in yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::test::EditorIntegrationTest::TestEditorInitialize().
|
pure virtual |
Implemented in yaze::editor::DungeonEditorV2, yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::test::EditorIntegrationTest::TestEditorLoad().
|
pure virtual |
Implemented in yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::test::EditorIntegrationTest::TestEditorSave().
|
pure virtual |
Implemented in yaze::editor::OverworldEditor, yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::test::EditorIntegrationTest::TestEditorUpdate().
|
pure virtual |
Implemented in yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::editor::EditorManager::BuildModernMenu(), yaze::editor::EditorManager::Initialize(), and yaze::test::EditorIntegrationTest::TestEditorCut().
|
pure virtual |
Implemented in yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::editor::EditorManager::BuildModernMenu(), yaze::editor::EditorManager::Initialize(), and yaze::test::EditorIntegrationTest::TestEditorCopy().
|
pure virtual |
Implemented in yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::editor::EditorManager::BuildModernMenu(), yaze::editor::EditorManager::Initialize(), and yaze::test::EditorIntegrationTest::TestEditorPaste().
|
pure virtual |
Implemented in yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::editor::EditorManager::BuildModernMenu(), yaze::editor::EditorManager::Initialize(), and yaze::test::EditorIntegrationTest::TestEditorUndo().
|
pure virtual |
Implemented in yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::editor::EditorManager::BuildModernMenu(), yaze::editor::EditorManager::Initialize(), and yaze::test::EditorIntegrationTest::TestEditorRedo().
|
pure virtual |
Implemented in yaze::editor::AgentEditor, yaze::editor::AssemblyEditor, yaze::editor::DungeonEditorV2, yaze::editor::GraphicsEditor, yaze::editor::PaletteEditor, yaze::editor::ScreenEditor, yaze::editor::MessageEditor, yaze::editor::MusicEditor, yaze::editor::OverworldEditor, yaze::editor::SpriteEditor, yaze::editor::SettingsEditor, and yaze::test::TestEditor.
Referenced by yaze::editor::EditorManager::BuildModernMenu(), yaze::editor::EditorManager::Initialize(), and yaze::test::EditorIntegrationTest::TestEditorFind().
|
inlinevirtual |
Reimplemented in yaze::editor::OverworldEditor.
Definition at line 108 of file editor.h.
Referenced by yaze::test::EditorIntegrationTest::TestEditorClear().
|
inline |
Definition at line 110 of file editor.h.
References type_.
Referenced by yaze::editor::EditorManager::DrawContextSensitiveCardControl().
|
inline |
|
inline |
Definition at line 114 of file editor.h.
References active_.
Referenced by set_active(), yaze::editor::AgentEditor::SetChatActive(), and yaze::editor::GraphicsEditor::UpdateGfxTabView().
|
inline |
Definition at line 115 of file editor.h.
References active(), and active_.
Referenced by yaze::editor::EditorManager::BuildModernMenu(), yaze::editor::EditorManager::Initialize(), yaze::editor::EditorManager::LoadDesignerLayout(), yaze::editor::EditorManager::LoadDeveloperLayout(), yaze::editor::EditorManager::LoadModderLayout(), and yaze::editor::EditorManager::Update().
|
inlinevirtual |
Reimplemented in yaze::editor::DungeonEditorV2, yaze::editor::OverworldEditor, and yaze::editor::SettingsEditor.
Definition at line 118 of file editor.h.
Referenced by SafeRomAccess().
|
inlinevirtual |
Reimplemented in yaze::editor::DungeonEditorV2, and yaze::editor::OverworldEditor.
|
inlineprotected |
Definition at line 127 of file editor.h.
References context_, and yaze::editor::EditorContext::session_id.
Referenced by yaze::editor::DungeonEditorV2::DrawDebugControlsCard(), yaze::editor::DungeonEditorV2::DrawEntrancesListCard(), yaze::editor::DungeonEditorV2::DrawLayout(), yaze::editor::DungeonEditorV2::DrawRoomGraphicsCard(), yaze::editor::DungeonEditorV2::DrawRoomMatrixCard(), yaze::editor::DungeonEditorV2::DrawRoomsListCard(), yaze::editor::OverworldEditor::Update(), yaze::editor::GraphicsEditor::Update(), yaze::editor::ScreenEditor::Update(), yaze::editor::SpriteEditor::Update(), and yaze::editor::AssemblyEditor::UpdateCodeView().
|
inlineprotected |
Definition at line 136 of file editor.h.
References IsRomLoaded().
|
protected |
Definition at line 122 of file editor.h.
Referenced by active(), yaze::editor::AgentEditor::DrawDashboard(), set_active(), and yaze::editor::AgentEditor::Update().
|
protected |
Definition at line 123 of file editor.h.
Referenced by yaze::editor::AgentEditor::AgentEditor(), yaze::editor::AssemblyEditor::AssemblyEditor(), yaze::editor::DungeonEditorV2::DungeonEditorV2(), yaze::editor::GraphicsEditor::GraphicsEditor(), yaze::editor::MessageEditor::MessageEditor(), yaze::editor::MusicEditor::MusicEditor(), yaze::editor::OverworldEditor::OverworldEditor(), yaze::editor::PaletteEditor::PaletteEditor(), yaze::editor::ScreenEditor::ScreenEditor(), yaze::editor::SettingsEditor::SettingsEditor(), yaze::editor::SpriteEditor::SpriteEditor(), and type().
|
protected |
Definition at line 124 of file editor.h.
Referenced by yaze::editor::OverworldEditor::Copy(), yaze::editor::MessageEditor::DrawExpandedMessageSettings(), yaze::editor::OverworldEditor::DrawScratchSpace(), yaze::editor::OverworldEditor::DrawScratchSpacePattern(), MakeCardTitle(), yaze::editor::OverworldEditor::Paste(), and set_context().