wxMaxima
Loading...
Searching...
No Matches
Functions
Undo methods for cell additions/deletions:

Each EditorCell has its own private undo buffer Additionally wxMaxima maintains an undo buffer for worksheet changes. More...

Functions

void Worksheet::TreeUndo_ClearRedoActionList ()
 Clear the list of actions for which an undo can be undone.
 
void Worksheet::TreeUndo_ClearUndoActionList ()
 Clear the list of actions for which undo can undo.
 
void Worksheet::TreeUndo_AppendAction ()
 Add another action to this undo action.
 
void Worksheet::TreeUndo_LimitUndoBuffer ()
 Drop actions from the back of the undo list until it is within the undo limit.
 
bool Worksheet::TreeUndo (UndoActions *sourcelist, UndoActions *undoForThisOperation)
 Undo an item from a list of undo actions.
 
bool Worksheet::TreeUndoTextChange (UndoActions *sourcelist, UndoActions *undoForThisOperation)
 Undo a text change.
 
bool Worksheet::TreeUndoCellDeletion (UndoActions *sourcelist, UndoActions *undoForThisOperation)
 Undo a call deletion.
 
bool Worksheet::TreeUndoCellAddition (UndoActions *sourcelist, UndoActions *undoForThisOperation)
 Undo adding cells.
 
bool Worksheet::TreeUndo ()
 Undo a tree operation.
 
bool Worksheet::TreeRedo ()
 Redo an undone tree operation.
 
bool Worksheet::CanTreeUndo () const
 Can we undo a tree operation?
 
bool Worksheet::CanTreeRedo () const
 Can we redo a tree operation?
 
void Worksheet::TreeUndo_CellEntered ()
 The cursor has entered one cell => save the value to see if it has changed.
 
void Worksheet::TreeUndo_CellLeft ()
 The cursor is about to leave the current cell => Store the change if the value has changed.
 
void Worksheet::TreeUndo_MarkCellsAsAdded (GroupCell *start, GroupCell *end, UndoActions *undoBuffer)
 Remember that these cells were just added so this addition can be undone.
 
void Worksheet::TreeUndo_MarkCellsAsAdded (GroupCell *parentOfStart, GroupCell *end)
 Remember that these cells were just added so this addition can be undone.
 

Detailed Description

Each EditorCell has its own private undo buffer Additionally wxMaxima maintains an undo buffer for worksheet changes.

Delete the currently selected cells.

Move a range of cells from the document to the undo buffer.

Delete a range of cells.

Clear the undo and the redo buffer.

It works the following way:

The add and delete actions offer to choose which undo buffer to use since there are two of them:

Parameters
startThe first cell to delete
endThe last cell to delete
undoBufferThe buffer the undo information has to be kept in. Might be
  • m_treeUndo.UndoStack() for normal deletes,
  • m_treeUndo.RedoStack() for deletions while executing an undo or
  • NULL for: Don't keep any copy of the cells.
Parameters
startThe first cell to delete
endThe last cell to delete

Actually moves them to the undo buffer so this action can be undone.

Function Documentation

◆ TreeUndo()

bool Worksheet::TreeUndo ( UndoActions sourcelist,
UndoActions undoForThisOperation 
)

Undo an item from a list of undo actions.

Parameters
sourcelistThe list to take the undo information from
undoForThisOperationThe list to write the information to how on to undo this undo op

◆ TreeUndo_MarkCellsAsAdded() [1/2]

void Worksheet::TreeUndo_MarkCellsAsAdded ( GroupCell parentOfStart,
GroupCell end 
)

Remember that these cells were just added so this addition can be undone.

Parameters
parentOfStartThe cell after the first cell that has been added
endThe last cell that has been added

◆ TreeUndo_MarkCellsAsAdded() [2/2]

void Worksheet::TreeUndo_MarkCellsAsAdded ( GroupCell start,
GroupCell end,
UndoActions undoBuffer 
)

Remember that these cells were just added so this addition can be undone.

Parameters
startThe first cell that has been added
endThe last cell that has been added
undoBufferWhere to store the undo information. This normally is
  • m_treeUndo.UndoStack() for the normal undo buffer or
  • m_treeUndo.RedoStack() for the buffer that allows reverting undos

◆ TreeUndoCellAddition()

bool Worksheet::TreeUndoCellAddition ( UndoActions sourcelist,
UndoActions undoForThisOperation 
)

Undo adding cells.

Called from TreeUndo().

◆ TreeUndoCellDeletion()

bool Worksheet::TreeUndoCellDeletion ( UndoActions sourcelist,
UndoActions undoForThisOperation 
)

Undo a call deletion.

Called from TreeUndo().

◆ TreeUndoTextChange()

bool Worksheet::TreeUndoTextChange ( UndoActions sourcelist,
UndoActions undoForThisOperation 
)

Undo a text change.

Called from TreeUndo().