70 virtual bool undoable()
const override;
123 virtual bool undoable()
const override;
165 virtual bool undoable()
const override;
Add a cell to the notebook.
Definition: Actions.hh:59
Position pos
Definition: Actions.hh:77
virtual ~ActionAddCell()
Definition: Actions.hh:64
int child_num
Definition: Actions.hh:78
bool is_input_form
Definition: Actions.hh:86
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:46
DTree::iterator newref
Definition: Actions.hh:76
bool is_replacement
Definition: Actions.hh:82
Position
Definition: Actions.hh:61
DataCell newcell
Definition: Actions.hh:75
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:93
ActionAddCell(DataCell, DataCell::id_t ref_, Position pos_)
Definition: Actions.cc:41
virtual bool undoable() const override
Can this action be undone?
Definition: Actions.cc:121
All actions derive from the ActionBase object, which defines the interface they need to implement.
Definition: Actions.hh:32
DTree::iterator ref
Definition: Actions.hh:52
virtual void execute(DocumentThread &, GUIBase &)
Perform the action.
Definition: Actions.cc:27
ActionBase(DataCell::id_t ref_id)
Definition: Actions.cc:17
virtual bool undoable() const
Can this action be undone?
Definition: Actions.cc:22
DataCell::id_t ref_id
Definition: Actions.hh:50
virtual void revert(DocumentThread &, GUIBase &)=0
Revert the change to the DTree document and the GUI.
Complete text at a point in a GUI cell with one or more alternative.
Definition: Actions.hh:217
int alternative() const
Definition: Actions.cc:387
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:365
std::string text
Definition: Actions.hh:231
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:375
virtual ~ActionCompleteText()
Definition: Actions.hh:220
int alternative_
Definition: Actions.hh:232
ActionCompleteText(DataCell::id_t ref_id, int pos, const std::string &, int alternative)
Definition: Actions.cc:360
int length() const
Definition: Actions.cc:382
DTree::iterator this_cell
Definition: Actions.hh:229
int insert_pos
Definition: Actions.hh:230
Remove a text string starting at the indicated position, and with the indicated length,...
Definition: Actions.hh:244
int to_pos
Definition: Actions.hh:254
std::string removed_text
Definition: Actions.hh:255
virtual ~ActionEraseText()
Definition: Actions.hh:247
int from_pos
Definition: Actions.hh:254
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:397
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:406
DTree::iterator this_cell
Definition: Actions.hh:253
ActionEraseText(DataCell::id_t ref_id, int, int)
Definition: Actions.cc:392
Add a text string (can be just a single character) at the point of the cursor.
Definition: Actions.hh:195
virtual ~ActionInsertText()
Definition: Actions.hh:198
std::string text
Definition: Actions.hh:206
ActionInsertText(DataCell::id_t ref_id, int pos, const std::string &)
Definition: Actions.cc:338
int insert_pos
Definition: Actions.hh:205
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:352
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:343
DTree::iterator this_cell
Definition: Actions.hh:204
Position the cursor relative to the indicated cell.
Definition: Actions.hh:95
virtual ~ActionPositionCursor()
Definition: Actions.hh:100
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:202
ActionPositionCursor(DataCell::id_t ref_id_, Position pos_)
Definition: Actions.cc:126
DTree::iterator newref
Definition: Actions.hh:107
Position pos
Definition: Actions.hh:108
Position
Definition: Actions.hh:97
uint64_t needed_new_cell_with_id
Definition: Actions.hh:106
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:131
Remove a cell and all its child cells from the document.
Definition: Actions.hh:134
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:234
DTree::iterator reference_parent_cell
Definition: Actions.hh:149
size_t reference_child_index
Definition: Actions.hh:150
ActionRemoveCell(DataCell::id_t ref_id_)
Definition: Actions.cc:212
DTree removed_tree
Definition: Actions.hh:148
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:221
virtual ~ActionRemoveCell()
Definition: Actions.cc:217
Replace the contents of a cell.
Definition: Actions.hh:157
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:265
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:261
ActionReplaceCell(DataCell::id_t ref_id_)
Definition: Actions.cc:252
virtual bool undoable() const override
Can this action be undone?
Definition: Actions.cc:269
virtual ~ActionReplaceCell()
Definition: Actions.cc:257
Update the running status of the indicated cell.
Definition: Actions.hh:115
DTree::iterator this_cell
Definition: Actions.hh:125
bool was_running_
Definition: Actions.hh:126
virtual ~ActionSetRunStatus()
Definition: Actions.hh:118
virtual bool undoable() const override
Can this action be undone?
Definition: Actions.cc:318
bool new_running_
Definition: Actions.hh:126
ActionSetRunStatus(DataCell::id_t ref_id_, bool running)
Definition: Actions.cc:313
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:323
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:333
Split a cell into two separate cells, at the point of the cursor.
Definition: Actions.hh:173
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition: Actions.cc:306
ActionSplitCell(DataCell::id_t ref_id)
Definition: Actions.cc:274
virtual ~ActionSplitCell()
Definition: Actions.cc:279
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition: Actions.cc:283
DTree::iterator newref
Definition: Actions.hh:182
Each cell is identified by a serial number 'id' which is used to keep track of it across network call...
Definition: DataCell.hh:52
DataCells are the basic building blocks for a document.
Definition: DataCell.hh:27
A base class with all the logic to manipulate a Cadabra notebook document.
Definition: DocumentThread.hh:41
Abstract base class with methods that need to be implemented by any GUI.
Definition: GUIBase.hh:16
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83
tree< DataCell > DTree
Definition: DataCell.hh:109