#include <tree_undo_stack.h>
Public Member Functions | |
| TreeUndoStack (std::size_t max_steps=kDefaultMaxSteps) | |
| void | Push (const DockTree ¤t) |
| 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< DockTree > | undo_ |
| std::vector< DockTree > | redo_ |
Definition at line 18 of file tree_undo_stack.h.
|
explicit |
Definition at line 9 of file tree_undo_stack.cc.
| 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().

|
inline |
Definition at line 29 of file tree_undo_stack.h.
References undo_.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::DrawFileRow().
|
inline |
Definition at line 30 of file tree_undo_stack.h.
References redo_.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::DrawFileRow().
| bool yaze::editor::layout_designer::TreeUndoStack::Undo | ( | DockTree * | current | ) |
Definition at line 20 of file tree_undo_stack.cc.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw(), and yaze::editor::layout_designer::LayoutDesignerPanel::DrawFileRow().
| bool yaze::editor::layout_designer::TreeUndoStack::Redo | ( | DockTree * | current | ) |
Definition at line 29 of file tree_undo_stack.cc.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw(), and yaze::editor::layout_designer::LayoutDesignerPanel::DrawFileRow().
| 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().
| void yaze::editor::layout_designer::TreeUndoStack::Clear | ( | ) |
Definition at line 44 of file tree_undo_stack.cc.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::ReplaceTree().
|
inline |
Definition at line 46 of file tree_undo_stack.h.
References undo_.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().
|
inline |
Definition at line 47 of file tree_undo_stack.h.
References redo_.
Referenced by yaze::editor::layout_designer::LayoutDesignerPanel::Draw().
|
staticconstexpr |
Definition at line 20 of file tree_undo_stack.h.
|
private |
Definition at line 50 of file tree_undo_stack.h.
Referenced by Push().
|
private |
Definition at line 51 of file tree_undo_stack.h.
Referenced by CanUndo(), Clear(), PopLastPush(), Push(), Redo(), Undo(), and UndoDepth().
|
private |
Definition at line 52 of file tree_undo_stack.h.
Referenced by CanRedo(), Clear(), Push(), Redo(), RedoDepth(), and Undo().