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
 
bool CanUndo () const override
 
bool CanRedo () const override
 
bool CanCut () const override
 
bool CanCopy () const override
 
bool CanPaste () const override
 
void SetRom (Rom *rom)
 
Rom * rom () const
 
- Public Member Functions inherited from yaze::editor::Editor
 Editor ()=default
 
virtual ~Editor ()=default
 
virtual void SetGameData (zelda3::GameData *game_data)
 
virtual absl::Status BeginSaveTransaction ()
 
virtual void RollbackSaveTransaction ()
 
virtual void CommitSaveTransaction ()
 
virtual void PrepareForSessionTeardown ()
 
virtual std::string GetUndoDescription () const
 
virtual std::string GetRedoDescription () const
 
const UndoManager & undo_manager () const
 
virtual absl::Status Clear ()
 
virtual bool CanFind () const
 
virtual void ContributeStatus (StatusBar *)
 
virtual EditorContextSnapshot BuildContextSnapshot () const
 
EditorType type () const
 
bool * active ()
 
void set_active (bool active)
 
void toggle_active ()
 
virtual bool IsRomLoaded () const
 
virtual std::string GetRomStatus () const
 
Rom * rom () const
 
zelda3::GameData * game_data () const
 
project::YazeProject * project () const
 
core::VersionManager * version_manager () const
 
EditorContext context () const
 
bool HasContext () const
 

Private Member Functions

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

Private Attributes

Rom * rom_
 
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< Bookmark > bookmarks_
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::Editor
std::string MakePanelTitle (const std::string &base_title) const
 
std::string MakeWindowId (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.

◆ CanUndo()

bool yaze::editor::MemoryEditor::CanUndo ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 43 of file memory_editor.h.

◆ CanRedo()

bool yaze::editor::MemoryEditor::CanRedo ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 44 of file memory_editor.h.

◆ CanCut()

bool yaze::editor::MemoryEditor::CanCut ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 45 of file memory_editor.h.

◆ CanCopy()

bool yaze::editor::MemoryEditor::CanCopy ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 46 of file memory_editor.h.

◆ CanPaste()

bool yaze::editor::MemoryEditor::CanPaste ( ) const
inlineoverridevirtual

Reimplemented from yaze::editor::Editor.

Definition at line 47 of file memory_editor.h.

◆ SetRom()

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

Definition at line 50 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 53 of file memory_editor.h.

References rom_.

Referenced by SetRom(), and Update().

◆ DrawToolbar()

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

◆ DrawJumpToAddressPopup()

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

◆ DrawSearchPopup()

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

Definition at line 157 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 61 of file memory_editor.h.

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

◆ memory_widget_

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

Definition at line 62 of file memory_editor.h.

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

◆ comparison_widget_

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

Definition at line 63 of file memory_editor.h.

Referenced by Update().

◆ show_compare_rom_

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

Definition at line 64 of file memory_editor.h.

Referenced by Update().

◆ comparison_rom_

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

Definition at line 65 of file memory_editor.h.

Referenced by Update().

◆ jump_address_

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

Definition at line 68 of file memory_editor.h.

Referenced by DrawJumpToAddressPopup().

◆ search_pattern_

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

Definition at line 69 of file memory_editor.h.

Referenced by DrawSearchPopup().

◆ current_address_

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

Definition at line 70 of file memory_editor.h.

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

◆ bookmarks_

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

Definition at line 77 of file memory_editor.h.

Referenced by DrawBookmarksPopup().


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