104 virtual bool undoable()
const override;
~ActionRemoveCell()
Definition: Actions.cc:138
virtual bool undoable() const override
Can this action be undone?
Definition: Actions.cc:214
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:227
std::string text
Definition: Actions.hh:170
bool was_running_
Definition: Actions.hh:107
bool new_running_
Definition: Actions.hh:107
Update the running status of the indicated cell.
Definition: Actions.hh:97
ActionPositionCursor(DTree::iterator ref_, Position pos_)
Definition: Actions.cc:56
Position pos
Definition: Actions.hh:90
DataCells are the basic building blocks for a document.
Definition: DataCell.hh:27
virtual void execute(DocumentThread &, GUIBase &)=0
Perform the action.
A base class with all the logic to manipulate a Cadabra notebook document.
Definition: DocumentThread.hh:38
Position
Definition: Actions.hh:55
ActionSetRunStatus(DTree::iterator ref_, bool running)
Definition: Actions.cc:209
ActionAddCell(DataCell, DTree::iterator ref_, Position pos_)
Definition: Actions.cc:17
All actions derive from the ActionBase object, which defines the interface they need to implement...
Definition: Actions.hh:32
Position pos
Definition: Actions.hh:68
Split a cell into two separate cells, at the point of the cursor.
Definition: Actions.hh:138
virtual bool undoable() const
Can this action be undone?
Definition: Actions.cc:12
bool needed_new_cell
Definition: Actions.hh:88
DTree removed_tree
Definition: Actions.hh:129
int from_pos
Definition: Actions.hh:191
DTree::iterator newref
Definition: Actions.hh:89
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:22
DTree::iterator this_cell
Definition: Actions.hh:190
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:152
Remove a cell and all its child cells from the document.
Definition: Actions.hh:115
DTree::iterator ref
Definition: Actions.hh:67
std::string removed_text
Definition: Actions.hh:192
DTree::iterator this_cell
Definition: Actions.hh:106
Add a text string (can be just a single character) at the point of the cursor.
Definition: Actions.hh:160
virtual void revert(DocumentThread &, GUIBase &)=0
Revert the change to the DTree document and the GUI.
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:242
DTree::iterator newref
Definition: Actions.hh:67
Abstract base class with methods that need to be implemented by any GUI.
Definition: GUIBase.hh:16
int child_num
Definition: Actions.hh:69
ActionInsertText(DTree::iterator, int pos, const std::string &)
Definition: Actions.cc:232
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:61
~ActionSplitCell()
Definition: Actions.cc:175
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:219
ActionSplitCell(DTree::iterator ref_)
Definition: Actions.cc:170
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:202
size_t reference_child_index
Definition: Actions.hh:131
DTree::iterator this_cell
Definition: Actions.hh:147
DTree::iterator this_cell
Definition: Actions.hh:130
DTree::iterator ref
Definition: Actions.hh:89
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:261
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:237
Position the cursor relative to the indicated cell.
Definition: Actions.hh:78
ActionRemoveCell(DTree::iterator ref_)
Definition: Actions.cc:133
DataCell newcell
Definition: Actions.hh:66
Add a cell to the notebook.
Definition: Actions.hh:53
int to_pos
Definition: Actions.hh:191
DTree::iterator this_cell
Definition: Actions.hh:168
DTree::iterator newref
Definition: Actions.hh:147
int insert_pos
Definition: Actions.hh:169
tree< DataCell > DTree
Definition: DataCell.hh:105
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:142
DTree::iterator reference_parent_cell
Definition: Actions.hh:130
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:44
Position
Definition: Actions.hh:80
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:179
Remove a text string starting at the indicated position, and with the indicated length, from the indicated cell.
Definition: Actions.hh:182
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:254
ActionEraseText(DTree::iterator, int, int)
Definition: Actions.cc:249
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:123