yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::Editor Class Referenceabstract

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.

Collaboration diagram for yaze::editor::Editor:

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_
 
EditorContextcontext_ = nullptr
 

Detailed Description

Interface for editor classes.

Provides basic editing operations that each editor should implement.

Definition at line 82 of file editor.h.

Constructor & Destructor Documentation

◆ Editor()

yaze::editor::Editor::Editor ( )
default

◆ ~Editor()

virtual yaze::editor::Editor::~Editor ( )
virtualdefault

Member Function Documentation

◆ Initialize()

◆ Load()

◆ Save()

◆ Update()

◆ Cut()

◆ Copy()

◆ Paste()

◆ Undo()

◆ Redo()

◆ Find()

◆ Clear()

virtual absl::Status yaze::editor::Editor::Clear ( )
inlinevirtual

Reimplemented in yaze::editor::OverworldEditor.

Definition at line 108 of file editor.h.

Referenced by yaze::test::EditorIntegrationTest::TestEditorClear().

◆ type()

EditorType yaze::editor::Editor::type ( ) const
inline

Definition at line 110 of file editor.h.

References type_.

Referenced by yaze::editor::EditorManager::DrawContextSensitiveCardControl().

◆ set_context()

void yaze::editor::Editor::set_context ( EditorContext context)
inline

Definition at line 112 of file editor.h.

References context_.

◆ active()

bool * yaze::editor::Editor::active ( )
inline

◆ set_active()

◆ IsRomLoaded()

virtual bool yaze::editor::Editor::IsRomLoaded ( ) const
inlinevirtual

◆ GetRomStatus()

virtual std::string yaze::editor::Editor::GetRomStatus ( ) const
inlinevirtual

Reimplemented in yaze::editor::DungeonEditorV2, and yaze::editor::OverworldEditor.

Definition at line 119 of file editor.h.

◆ MakeCardTitle()

◆ SafeRomAccess()

template<typename T >
absl::StatusOr< T > yaze::editor::Editor::SafeRomAccess ( std::function< T()>  accessor,
const std::string &  operation = "" 
) const
inlineprotected

Definition at line 136 of file editor.h.

References IsRomLoaded().

Here is the call graph for this function:

Member Data Documentation

◆ active_

bool yaze::editor::Editor::active_ = false
protected

◆ type_

◆ context_


The documentation for this class was generated from the following file: