TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::UndoHistory Class Reference

The app's undo history: steps that each undo and redo one change. More...

#include <gui_core/input/gui_undo_history.h>

Classes

struct  Step

Public Member Functions

void Push (Step step)
 Adds a step after the current one, dropping any undone steps (or merges it into the last step, see Step::mergeKey).
void EndMerge ()
 The next push starts a step of its own (e.g. when a field loses the focus).
bool CanUndo () const
bool CanRedo () const
void Undo ()
void Redo ()
size_t UndoCount () const
size_t RedoCount () const
std::string_view UndoDescription () const
std::string_view RedoDescription () const
void Clear ()

Detailed Description

The app's undo history: steps that each undo and redo one change.

Text fields push their committed edits here, and so can the app's own editors; Undo / Redo walk it.

Member Function Documentation

◆ Push()

void tachyon::UndoHistory::Push ( Step step)
inline

Adds a step after the current one, dropping any undone steps (or merges it into the last step, see Step::mergeKey).

Does not run it.

◆ EndMerge()

void tachyon::UndoHistory::EndMerge ( )
inline

The next push starts a step of its own (e.g. when a field loses the focus).

◆ CanUndo()

bool tachyon::UndoHistory::CanUndo ( ) const
inline

◆ CanRedo()

bool tachyon::UndoHistory::CanRedo ( ) const
inline

◆ Undo()

void tachyon::UndoHistory::Undo ( )
inline

◆ Redo()

void tachyon::UndoHistory::Redo ( )
inline

◆ UndoCount()

size_t tachyon::UndoHistory::UndoCount ( ) const
inline

◆ RedoCount()

size_t tachyon::UndoHistory::RedoCount ( ) const
inline

◆ UndoDescription()

std::string_view tachyon::UndoHistory::UndoDescription ( ) const
inline

◆ RedoDescription()

std::string_view tachyon::UndoHistory::RedoDescription ( ) const
inline

◆ Clear()

void tachyon::UndoHistory::Clear ( )
inline

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