class
CMiriTextUndoStack
- Module
- Miri
- Header
#include "Miri/Widgets/CMiriTextUndoStack.h"- Namespace
Miri
Properties
| Type | Name | Description |
|---|---|---|
static constexpr size_t | kLimit | Default 64. |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Push | Records the state BEFORE an edit. |
bool | Undo | |
bool | Redo | |
void | Clear | |
bool | CanUndo | |
bool | CanRedo |
Function details
Push
C++
void Push(const std::string& text, int32_t cursor)Records the state BEFORE an edit. A snapshot equal to the last one is dropped, so a no-op keystroke does not cost an undo step.
Undo
C++
bool Undo(std::string& inOutText, int32_t& inOutCursor)Redo
C++
bool Redo(std::string& inOutText, int32_t& inOutCursor)Clear
C++
void Clear()CanUndo
C++
bool CanUndo() constCanRedo
C++
bool CanRedo() constGenerated from Miri/Widgets/CMiriTextUndoStack.h via miri.json · Dec 5, 2026Version 1.1.0