Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::undo_redo_stack Struct Reference

#include <undo_redo_stack.h>

Public Member Functions

void push_if_undoable (std::shared_ptr< editing_action_t > action)
 
auto can_undo () const -> bool
 
auto can_redo () const -> bool
 
void undo ()
 
void redo ()
 
void clear ()
 

Public Attributes

std::vector< std::shared_ptr< editing_action_t > > actions
 
size_t current_index {0}
 

Detailed Description

Definition at line 10 of file undo_redo_stack.h.

Member Function Documentation

◆ can_redo()

auto unravel::undo_redo_stack::can_redo ( ) const -> bool

Definition at line 53 of file undo_redo_stack.cpp.

◆ can_undo()

auto unravel::undo_redo_stack::can_undo ( ) const -> bool

Definition at line 48 of file undo_redo_stack.cpp.

◆ clear()

void unravel::undo_redo_stack::clear ( )

Definition at line 102 of file undo_redo_stack.cpp.

◆ push_if_undoable()

void unravel::undo_redo_stack::push_if_undoable ( std::shared_ptr< editing_action_t > action)

Definition at line 7 of file undo_redo_stack.cpp.

◆ redo()

void unravel::undo_redo_stack::redo ( )

Definition at line 81 of file undo_redo_stack.cpp.

◆ undo()

void unravel::undo_redo_stack::undo ( )

Definition at line 58 of file undo_redo_stack.cpp.

Member Data Documentation

◆ actions

std::vector<std::shared_ptr<editing_action_t> > unravel::undo_redo_stack::actions

Definition at line 12 of file undo_redo_stack.h.

◆ current_index

size_t unravel::undo_redo_stack::current_index {0}

Definition at line 13 of file undo_redo_stack.h.


The documentation for this struct was generated from the following files: