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

#include <memory_editor.h>

Inheritance diagram for yaze::editor::MemoryEditor:
Collaboration diagram for yaze::editor::MemoryEditor:

Classes

struct  Bookmark
 

Public Member Functions

 MemoryEditor (Rom *rom=nullptr)
 
void SetDependencies (const EditorDependencies &deps) override
 
void Initialize () override
 
absl::Status Load () override
 
absl::Status Save () override
 
absl::Status Update () override
 
absl::Status Undo () override
 
absl::Status Redo () override
 
absl::Status Cut () override
 
absl::Status Copy () override
 
absl::Status Paste () override
 
absl::Status Find () override
 
void SetRom (Rom *rom)
 
Romrom () const
 
- Public Member Functions inherited from yaze::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
virtual void SetGameData (zelda3::GameData *game_data)
 
virtual std::string GetUndoDescription () const
 
virtual std::string GetRedoDescription () const
 
const UndoManagerundo_manager () const
 
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
 

Private Member Functions

void DrawToolbar ()
 
void DrawJumpToAddressPopup ()
 
void DrawSearchPopup ()
 
void DrawBookmarksPopup ()
 

Private Attributes

Romrom_
 
gui::MemoryEditorWidget memory_widget_
 
gui::MemoryEditorWidget comparison_widget_
 
bool show_compare_rom_ = false
 
Rom comparison_rom_
 
char jump_address_ [16] = "0x000000"
 
char search_pattern_ [256] = ""
 
uint32_t current_address_ = 0
 
std::vector< Bookmarkbookmarks_
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::Editor
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 inherited from yaze::editor::Editor
bool active_ = false
 
EditorType type_
 
EditorDependencies dependencies_
 
UndoManager undo_manager_
 

Detailed Description

Definition at line 20 of file memory_editor.h.

Constructor & Destructor Documentation

◆ MemoryEditor()

yaze::editor::MemoryEditor::MemoryEditor ( Rom * rom = nullptr)
inlineexplicit

Definition at line 22 of file memory_editor.h.

References yaze::editor::kHex, and yaze::editor::Editor::type_.

Member Function Documentation

◆ SetDependencies()

void yaze::editor::MemoryEditor::SetDependencies ( const EditorDependencies & deps)
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 26 of file memory_editor.h.

References yaze::editor::EditorDependencies::rom, rom_, and yaze::editor::Editor::SetDependencies().

Here is the call graph for this function:

◆ Initialize()

void yaze::editor::MemoryEditor::Initialize ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 31 of file memory_editor.h.

◆ Load()

absl::Status yaze::editor::MemoryEditor::Load ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 32 of file memory_editor.h.

◆ Save()

absl::Status yaze::editor::MemoryEditor::Save ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 33 of file memory_editor.h.

◆ Update()

◆ Undo()

absl::Status yaze::editor::MemoryEditor::Undo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 36 of file memory_editor.h.

◆ Redo()

absl::Status yaze::editor::MemoryEditor::Redo ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 37 of file memory_editor.h.

◆ Cut()

absl::Status yaze::editor::MemoryEditor::Cut ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 38 of file memory_editor.h.

◆ Copy()

absl::Status yaze::editor::MemoryEditor::Copy ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 39 of file memory_editor.h.

◆ Paste()

absl::Status yaze::editor::MemoryEditor::Paste ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 40 of file memory_editor.h.

◆ Find()

absl::Status yaze::editor::MemoryEditor::Find ( )
inlineoverridevirtual

Implements yaze::editor::Editor.

Definition at line 41 of file memory_editor.h.

◆ SetRom()

void yaze::editor::MemoryEditor::SetRom ( Rom * rom)
inline

Definition at line 44 of file memory_editor.h.

References rom(), and rom_.

Here is the call graph for this function:

◆ rom()

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

Definition at line 47 of file memory_editor.h.

References rom_.

Referenced by SetRom(), and Update().

◆ DrawToolbar()

◆ DrawJumpToAddressPopup()

void yaze::editor::MemoryEditor::DrawJumpToAddressPopup ( )
private

◆ DrawSearchPopup()

void yaze::editor::MemoryEditor::DrawSearchPopup ( )
private
Todo
Implement search
Todo
Implement search using hex-search handler

Definition at line 152 of file memory_editor.cc.

References yaze::gui::GetSuccessColor(), ICON_MD_CANCEL, ICON_MD_LIST, ICON_MD_SEARCH, and search_pattern_.

Referenced by DrawToolbar().

Here is the call graph for this function:

◆ DrawBookmarksPopup()

Member Data Documentation

◆ rom_

Rom* yaze::editor::MemoryEditor::rom_
private

Definition at line 55 of file memory_editor.h.

Referenced by rom(), SetDependencies(), and SetRom().

◆ memory_widget_

gui::MemoryEditorWidget yaze::editor::MemoryEditor::memory_widget_
private

Definition at line 56 of file memory_editor.h.

Referenced by DrawBookmarksPopup(), DrawJumpToAddressPopup(), and Update().

◆ comparison_widget_

gui::MemoryEditorWidget yaze::editor::MemoryEditor::comparison_widget_
private

Definition at line 57 of file memory_editor.h.

Referenced by Update().

◆ show_compare_rom_

bool yaze::editor::MemoryEditor::show_compare_rom_ = false
private

Definition at line 58 of file memory_editor.h.

Referenced by Update().

◆ comparison_rom_

Rom yaze::editor::MemoryEditor::comparison_rom_
private

Definition at line 59 of file memory_editor.h.

Referenced by Update().

◆ jump_address_

char yaze::editor::MemoryEditor::jump_address_[16] = "0x000000"
private

Definition at line 62 of file memory_editor.h.

Referenced by DrawJumpToAddressPopup().

◆ search_pattern_

char yaze::editor::MemoryEditor::search_pattern_[256] = ""
private

Definition at line 63 of file memory_editor.h.

Referenced by DrawSearchPopup().

◆ current_address_

uint32_t yaze::editor::MemoryEditor::current_address_ = 0
private

Definition at line 64 of file memory_editor.h.

Referenced by DrawBookmarksPopup(), DrawJumpToAddressPopup(), and DrawToolbar().

◆ bookmarks_

std::vector<Bookmark> yaze::editor::MemoryEditor::bookmarks_
private

Definition at line 71 of file memory_editor.h.

Referenced by DrawBookmarksPopup().


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