110 virtual bool undoable()
const override;
~ActionRemoveCell()
Definition: Actions.cc:152
virtual bool undoable() const override
Can this action be undone?
Definition: Actions.cc:230
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:245
std::string text
Definition: Actions.hh:176
bool was_running_
Definition: Actions.hh:113
bool new_running_
Definition: Actions.hh:113
Update the running status of the indicated cell.
Definition: Actions.hh:103
Position pos
Definition: Actions.hh:96
DataCells are the basic building blocks for a document.
Definition: DataCell.hh:27
ActionEraseText(DataCell::id_t ref_id, int, int)
Definition: Actions.cc:269
A base class with all the logic to manipulate a Cadabra notebook document.
Definition: DocumentThread.hh:38
Position
Definition: Actions.hh:61
ActionRemoveCell(DataCell::id_t ref_id_)
Definition: Actions.cc:147
All actions derive from the ActionBase object, which defines the interface they need to implement...
Definition: Actions.hh:32
Position pos
Definition: Actions.hh:74
Split a cell into two separate cells, at the point of the cursor.
Definition: Actions.hh:144
virtual bool undoable() const
Can this action be undone?
Definition: Actions.cc:17
bool needed_new_cell
Definition: Actions.hh:94
virtual void execute(DocumentThread &, GUIBase &)
Perform the action.
Definition: Actions.cc:22
DTree removed_tree
Definition: Actions.hh:135
int from_pos
Definition: Actions.hh:197
DTree::iterator ref
Definition: Actions.hh:52
DTree::iterator newref
Definition: Actions.hh:95
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:40
ActionBase(DataCell::id_t ref_id)
Definition: Actions.cc:12
DTree::iterator this_cell
Definition: Actions.hh:196
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:168
Remove a cell and all its child cells from the document.
Definition: Actions.hh:121
std::string removed_text
Definition: Actions.hh:198
Each cell is identified by a serial number 'id' which is used to keep track of it across network call...
Definition: DataCell.hh:51
DTree::iterator this_cell
Definition: Actions.hh:112
Add a text string (can be just a single character) at the point of the cursor.
Definition: Actions.hh:166
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:262
DTree::iterator newref
Definition: Actions.hh:73
Abstract base class with methods that need to be implemented by any GUI.
Definition: GUIBase.hh:16
int child_num
Definition: Actions.hh:75
ActionSplitCell(DataCell::id_t ref_id)
Definition: Actions.cc:186
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:77
~ActionSplitCell()
Definition: Actions.cc:191
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:235
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:218
size_t reference_child_index
Definition: Actions.hh:137
ActionPositionCursor(DataCell::id_t ref_id_, Position pos_)
Definition: Actions.cc:72
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:283
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:255
Position the cursor relative to the indicated cell.
Definition: Actions.hh:84
DataCell newcell
Definition: Actions.hh:72
Add a cell to the notebook.
Definition: Actions.hh:59
int to_pos
Definition: Actions.hh:197
DTree::iterator this_cell
Definition: Actions.hh:174
DTree::iterator newref
Definition: Actions.hh:153
int insert_pos
Definition: Actions.hh:175
DataCell::id_t ref_id
Definition: Actions.hh:51
tree< DataCell > DTree
Definition: DataCell.hh:106
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:156
ActionSetRunStatus(DataCell::id_t ref_id_, bool running)
Definition: Actions.cc:225
ActionInsertText(DataCell::id_t ref_id, int pos, const std::string &)
Definition: Actions.cc:250
ActionAddCell(DataCell, DataCell::id_t ref_, Position pos_)
Definition: Actions.cc:35
DTree::iterator reference_parent_cell
Definition: Actions.hh:136
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:60
Position
Definition: Actions.hh:86
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:195
Remove a text string starting at the indicated position, and with the indicated length, from the indicated cell.
Definition: Actions.hh:188
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:274
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:137