31#ifndef TREEUNDOACTION_H
32#define TREEUNDOACTION_H
48 long long oldSelStart = -1,
long long oldSelEnd = -1) :
52 wxASSERT_MSG(start, _(
"Bug: Trying to record a cell contents change for undo without a cell."));
57 wxASSERT_MSG(start, _(
"Bug: Trying to record a cell contents change for undo without a cell."));
73 wxASSERT_MSG(start, _(
"Bug: Trying to record a fold/unfold for undo without a cell."));
109 const long long m_oldSelEnd = -1;
137 const std::optional<FoldDirection>
m_fold;
Implementation of an observing weak Cell pointer.
This file defines the class GroupCell that bundles input and output in the worksheet.
std::list< TreeUndoAction > UndoActions
The type of the list of tree actions that can be undone.
Definition: TreeUndoAction.h:141
A weak non-owning pointer that becomes null whenever the observed object is destroyed.
Definition: CellPtr.h:539
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:88
The description of one action for the undo (or redo) command.
Definition: TreeUndoAction.h:45
const wxString m_oldText
The old contents of the cell start.
Definition: TreeUndoAction.h:100
const std::optional< FoldDirection > m_fold
Set only for fold/unfold actions (see FoldDirection): whether this action folded or unfolded the subt...
Definition: TreeUndoAction.h:137
FoldDirection
Which way a fold/unfold undo action (see m_fold) goes.
Definition: TreeUndoAction.h:65
@ Unfolded
This action unfolded start's subtree; undoing it folds it.
@ Folded
This action folded start's subtree; undoing it unfolds it.
const long long m_oldSelStart
The old cursor/selection range in the EditorCell pointed to by m_start.
Definition: TreeUndoAction.h:108
CellPtr< GroupCell > m_start
The position this action started at.
Definition: TreeUndoAction.h:93
std::unique_ptr< GroupCell > m_oldCells
Cells that were deleted in this action.
Definition: TreeUndoAction.h:129
CellPtr< GroupCell > m_newCellsEnd
This action inserted all cells from start to newCellsEnd.
Definition: TreeUndoAction.h:120
bool m_partOfAtomicAction
True = This undo action is only part of an atomic undo action.
Definition: TreeUndoAction.h:81