1#ifndef YAZE_APP_EDITOR_CORE_UNDO_MANAGER_H_
2#define YAZE_APP_EDITOR_CORE_UNDO_MANAGER_H_
9#include "absl/status/status.h"
36 void Push(std::unique_ptr<UndoAction> action);
Manages undo/redo stacks for a single editor.
void Push(std::unique_ptr< UndoAction > action)
UndoManager(UndoManager &&)=default
absl::Status Redo()
Redo the top action. Returns error if stack is empty.
void SetMaxStackSize(size_t max)
std::string GetRedoDescription() const
Description of the action that would be redone (for UI)
std::deque< std::unique_ptr< UndoAction > > redo_stack_
size_t GetMaxStackSize() const
std::string GetUndoDescription() const
Description of the action that would be undone (for UI)
UndoManager & operator=(const UndoManager &)=delete
size_t RedoStackSize() const
absl::Status Undo()
Undo the top action. Returns error if stack is empty.
size_t UndoStackSize() const
std::deque< std::unique_ptr< UndoAction > > undo_stack_
UndoManager & operator=(UndoManager &&)=default
UndoManager(const UndoManager &)=delete