yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::GraphicsScratchView::LibraryEdit Class Reference
Inheritance diagram for yaze::editor::GraphicsScratchView::LibraryEdit:
Collaboration diagram for yaze::editor::GraphicsScratchView::LibraryEdit:

Public Member Functions

 LibraryEdit (GraphicsScratchView *owner, GraphicsScratchLibrary before, GraphicsScratchLibrary after)
 
absl::Status Undo () override
 
absl::Status Redo () override
 
std::string Description () const override
 Human-readable description (e.g., "Paint 12 tiles on map 5")
 
size_t MemoryUsage () const override
 Approximate memory footprint for budget enforcement.
 
- Public Member Functions inherited from yaze::editor::UndoAction
virtual ~UndoAction ()=default
 
virtual bool CanMergeWith (const UndoAction &) const
 
virtual void MergeWith (UndoAction &)
 

Private Member Functions

absl::Status Restore (const GraphicsScratchLibrary &library)
 

Private Attributes

GraphicsScratchView * owner_
 
GraphicsScratchLibrary before_
 
GraphicsScratchLibrary after_
 

Detailed Description

Definition at line 30 of file graphics_scratch_view.cc.

Constructor & Destructor Documentation

◆ LibraryEdit()

yaze::editor::GraphicsScratchView::LibraryEdit::LibraryEdit ( GraphicsScratchView * owner,
GraphicsScratchLibrary before,
GraphicsScratchLibrary after )
inline

Definition at line 32 of file graphics_scratch_view.cc.

Member Function Documentation

◆ Undo()

absl::Status yaze::editor::GraphicsScratchView::LibraryEdit::Undo ( )
inlineoverridevirtual

Implements yaze::editor::UndoAction.

Definition at line 35 of file graphics_scratch_view.cc.

References before_, and Restore().

Here is the call graph for this function:

◆ Redo()

absl::Status yaze::editor::GraphicsScratchView::LibraryEdit::Redo ( )
inlineoverridevirtual

Implements yaze::editor::UndoAction.

Definition at line 36 of file graphics_scratch_view.cc.

References after_, and Restore().

Here is the call graph for this function:

◆ Description()

std::string yaze::editor::GraphicsScratchView::LibraryEdit::Description ( ) const
inlineoverridevirtual

Human-readable description (e.g., "Paint 12 tiles on map 5")

Implements yaze::editor::UndoAction.

Definition at line 37 of file graphics_scratch_view.cc.

◆ MemoryUsage()

size_t yaze::editor::GraphicsScratchView::LibraryEdit::MemoryUsage ( ) const
inlineoverridevirtual

Approximate memory footprint for budget enforcement.

Reimplemented from yaze::editor::UndoAction.

Definition at line 40 of file graphics_scratch_view.cc.

References after_, yaze::editor::GraphicsScratchLibrary::assets, and before_.

◆ Restore()

absl::Status yaze::editor::GraphicsScratchView::LibraryEdit::Restore ( const GraphicsScratchLibrary & library)
inlineprivate

Member Data Documentation

◆ owner_

GraphicsScratchView* yaze::editor::GraphicsScratchView::LibraryEdit::owner_
private

Definition at line 54 of file graphics_scratch_view.cc.

Referenced by Restore().

◆ before_

GraphicsScratchLibrary yaze::editor::GraphicsScratchView::LibraryEdit::before_
private

Definition at line 55 of file graphics_scratch_view.cc.

Referenced by MemoryUsage(), and Undo().

◆ after_

GraphicsScratchLibrary yaze::editor::GraphicsScratchView::LibraryEdit::after_
private

Definition at line 56 of file graphics_scratch_view.cc.

Referenced by MemoryUsage(), and Redo().


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