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, and yaze::editor::SpriteEditor.

Collaboration diagram for yaze::editor::Editor:

Public Member Functions

 Editor ()=default
 
virtual ~Editor ()=default
 
void SetDependencies (const EditorDependencies &deps)
 
virtual void SetGameData (zelda3::GameData *game_data)
 
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
 
bool * active ()
 
void set_active (bool active)
 
void toggle_active ()
 
virtual bool IsRomLoaded () const
 
virtual std::string GetRomStatus () const
 
Romrom () const
 
zelda3::GameDatagame_data () const
 
EditorContext context () const
 
bool HasContext () const
 

Protected Member Functions

std::string MakePanelTitle (const std::string &base_title) const
 
std::string MakePanelId (const std::string &base_id) const
 
template<typename T >
absl::StatusOr< T > SafeRomAccess (std::function< T()> accessor, const std::string &operation="") const
 

Protected Attributes

bool active_ = false
 
EditorType type_
 
EditorDependencies dependencies_
 

Detailed Description

Interface for editor classes.

Provides basic editing operations that each editor should implement.

Definition at line 179 of file editor.h.

Constructor & Destructor Documentation

◆ Editor()

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

◆ ~Editor()

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

Member Function Documentation

◆ SetDependencies()

void yaze::editor::Editor::SetDependencies ( const EditorDependencies & deps)
inline

Definition at line 184 of file editor.h.

References dependencies_.

◆ SetGameData()

virtual void yaze::editor::Editor::SetGameData ( zelda3::GameData * game_data)
inlinevirtual

◆ 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 212 of file editor.h.

◆ type()

◆ active()

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

Definition at line 216 of file editor.h.

References active_.

Referenced by set_active(), and yaze::editor::AgentEditor::SetChatActive().

◆ set_active()

void yaze::editor::Editor::set_active ( bool active)
inline

Definition at line 217 of file editor.h.

References active(), and active_.

Here is the call graph for this function:

◆ toggle_active()

void yaze::editor::Editor::toggle_active ( )
inline

Definition at line 218 of file editor.h.

References active_.

◆ IsRomLoaded()

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

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

Definition at line 221 of file editor.h.

Referenced by SafeRomAccess().

◆ GetRomStatus()

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

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

Definition at line 222 of file editor.h.

◆ rom()

Rom * yaze::editor::Editor::rom ( ) const
inline

◆ game_data()

◆ context()

EditorContext yaze::editor::Editor::context ( ) const
inline

Definition at line 231 of file editor.h.

References yaze::editor::EditorDependencies::context(), and dependencies_.

Here is the call graph for this function:

◆ HasContext()

bool yaze::editor::Editor::HasContext ( ) const
inline

Definition at line 232 of file editor.h.

References dependencies_, and yaze::editor::EditorDependencies::HasContext().

Here is the call graph for this function:

◆ MakePanelTitle()

std::string yaze::editor::Editor::MakePanelTitle ( const std::string & base_title) const
inlineprotected

◆ MakePanelId()

std::string yaze::editor::Editor::MakePanelId ( const std::string & base_id) const
inlineprotected

Definition at line 248 of file editor.h.

References dependencies_, and yaze::editor::EditorDependencies::session_id.

◆ SafeRomAccess()

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

Definition at line 257 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_

◆ dependencies_

EditorDependencies yaze::editor::Editor::dependencies_
protected

Definition at line 237 of file editor.h.

Referenced by context(), yaze::editor::OverworldEditor::Copy(), yaze::editor::AssemblyEditor::DrawAssembleMenu(), yaze::editor::AssemblyEditor::DrawBuildOutput(), yaze::editor::PaletteEditor::DrawControlPanel(), yaze::editor::AssemblyEditor::DrawCurrentFolder(), yaze::editor::MessageEditor::DrawExpandedMessageSettings(), yaze::editor::AssemblyEditor::DrawFileBrowser(), yaze::editor::OverworldEditor::DrawOverworldCanvas(), yaze::editor::DungeonEditorV2::DrawRoomPanels(), yaze::editor::OverworldEditor::DrawScratchSpacePattern(), yaze::editor::OverworldEditor::DrawTile16Selector(), game_data(), yaze::editor::OverworldEditor::HandleKeyboardShortcuts(), yaze::editor::OverworldEditor::HandleTile16Edit(), HasContext(), yaze::editor::AgentEditor::Initialize(), yaze::editor::AssemblyEditor::Initialize(), yaze::editor::GraphicsEditor::Initialize(), yaze::editor::ScreenEditor::Initialize(), yaze::editor::MessageEditor::Initialize(), yaze::editor::MusicEditor::Initialize(), yaze::editor::OverworldEditor::Initialize(), yaze::editor::PaletteEditor::Initialize(), yaze::editor::SpriteEditor::Initialize(), yaze::editor::DungeonEditorV2::Initialize(), yaze::editor::PaletteEditor::JumpToPalette(), yaze::editor::DungeonEditorV2::Load(), yaze::editor::PaletteEditor::Load(), MakePanelId(), MakePanelTitle(), yaze::editor::MessageEditor::MessageEditor(), yaze::editor::DungeonEditorV2::OnRoomSelected(), yaze::editor::MusicEditor::OpenSong(), yaze::editor::MusicEditor::OpenSongPianoRoll(), yaze::editor::OverworldEditor::OverworldEditor(), yaze::editor::OverworldEditor::Paste(), yaze::editor::DungeonEditorV2::ProcessPendingSwap(), rom(), yaze::editor::DungeonEditorV2::SetAgentMode(), SetDependencies(), SetGameData(), yaze::editor::DungeonEditorV2::SetGameData(), yaze::editor::DungeonEditorV2::ShowPanel(), yaze::editor::OverworldEditor::Update(), and yaze::editor::MusicEditor::Update().


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