1#ifndef YAZE_APP_EDITOR_GRAPHICS_UNDO_ACTIONS_H_
2#define YAZE_APP_EDITOR_GRAPHICS_UNDO_ACTIONS_H_
8#include "absl/status/status.h"
15class GraphicsEditorState;
28 std::string description)
33 absl::Status
Undo()
override {
36 absl::Status
Redo()
override {
Shared state between GraphicsEditor panel components.
Undoable pixel edit on one graphics sheet.
absl::Status Undo() override
bool CanMergeWith(const UndoAction &) const override
size_t MemoryUsage() const override
Approximate memory footprint for budget enforcement.
std::string Description() const override
Human-readable description (e.g., "Paint 12 tiles on map 5")
GraphicsPixelEditAction(GraphicsEditorState *state, SheetPixelDiff diff, std::string description)
const SheetPixelDiff & diff() const
GraphicsEditorState * state_
absl::Status Redo() override
Abstract base for all undoable actions (Command pattern)
The Graphics editor's path for sheet pixel writes.
absl::Status ApplySheetPixelDiff(GraphicsEditorState &state, const SheetPixelDiff &diff, bool redo)
The pixels one undo step changes in one sheet.
size_t MemoryUsage() const