yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::layout_designer::TreeUndoStack Class Reference

#include <tree_undo_stack.h>

Public Member Functions

 TreeUndoStack (std::size_t max_steps=kDefaultMaxSteps)
 
void Push (const DockTree &current)
 
bool CanUndo () const
 
bool CanRedo () const
 
bool Undo (DockTree *current)
 
bool Redo (DockTree *current)
 
void PopLastPush ()
 
void Clear ()
 
std::size_t UndoDepth () const
 
std::size_t RedoDepth () const
 

Static Public Attributes

static constexpr std::size_t kDefaultMaxSteps = 64
 

Private Attributes

std::size_t max_steps_
 
std::vector< DockTreeundo_
 
std::vector< DockTreeredo_
 

Detailed Description

Definition at line 18 of file tree_undo_stack.h.

Constructor & Destructor Documentation

◆ TreeUndoStack()

yaze::editor::layout_designer::TreeUndoStack::TreeUndoStack ( std::size_t max_steps = kDefaultMaxSteps)
explicit

Definition at line 9 of file tree_undo_stack.cc.

Member Function Documentation

◆ Push()

void yaze::editor::layout_designer::TreeUndoStack::Push ( const DockTree & current)

Definition at line 11 of file tree_undo_stack.cc.

References yaze::editor::layout_designer::DockTree::Clone(), max_steps_, redo_, and undo_.

Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::PushUndoSnapshot().

Here is the call graph for this function:

◆ CanUndo()

bool yaze::editor::layout_designer::TreeUndoStack::CanUndo ( ) const
inline

Definition at line 29 of file tree_undo_stack.h.

References undo_.

Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::DrawFileRow().

◆ CanRedo()

bool yaze::editor::layout_designer::TreeUndoStack::CanRedo ( ) const
inline

Definition at line 30 of file tree_undo_stack.h.

References redo_.

Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::DrawFileRow().

◆ Undo()

bool yaze::editor::layout_designer::TreeUndoStack::Undo ( DockTree * current)

◆ Redo()

bool yaze::editor::layout_designer::TreeUndoStack::Redo ( DockTree * current)

◆ PopLastPush()

void yaze::editor::layout_designer::TreeUndoStack::PopLastPush ( )

Definition at line 38 of file tree_undo_stack.cc.

References undo_.

Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().

◆ Clear()

void yaze::editor::layout_designer::TreeUndoStack::Clear ( )

Definition at line 44 of file tree_undo_stack.cc.

References redo_, and undo_.

Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::ReplaceTree().

◆ UndoDepth()

std::size_t yaze::editor::layout_designer::TreeUndoStack::UndoDepth ( ) const
inline

Definition at line 46 of file tree_undo_stack.h.

References undo_.

Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().

◆ RedoDepth()

std::size_t yaze::editor::layout_designer::TreeUndoStack::RedoDepth ( ) const
inline

Definition at line 47 of file tree_undo_stack.h.

References redo_.

Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().

Member Data Documentation

◆ kDefaultMaxSteps

constexpr std::size_t yaze::editor::layout_designer::TreeUndoStack::kDefaultMaxSteps = 64
staticconstexpr

Definition at line 20 of file tree_undo_stack.h.

◆ max_steps_

std::size_t yaze::editor::layout_designer::TreeUndoStack::max_steps_
private

Definition at line 50 of file tree_undo_stack.h.

Referenced by Push().

◆ undo_

std::vector<DockTree> yaze::editor::layout_designer::TreeUndoStack::undo_
private

Definition at line 51 of file tree_undo_stack.h.

Referenced by CanUndo(), Clear(), PopLastPush(), Push(), Redo(), Undo(), and UndoDepth().

◆ redo_

std::vector<DockTree> yaze::editor::layout_designer::TreeUndoStack::redo_
private

Definition at line 52 of file tree_undo_stack.h.

Referenced by CanRedo(), Clear(), Push(), Redo(), RedoDepth(), and Undo().


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