83 virtual bool undoable()
const override;
137 virtual bool undoable()
const override;
155 virtual bool undoable()
const override;
197 virtual bool undoable()
const override;
234 virtual bool undoable()
const override;
251 virtual bool undoable()
const override;
Add a cell to the notebook.
Definition Actions.hh:72
Position pos
Definition Actions.hh:90
virtual ~ActionAddCell()
Definition Actions.hh:77
int child_num
Definition Actions.hh:91
bool activate
Definition Actions.hh:92
bool is_input_form
Definition Actions.hh:100
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:72
DTree::iterator newref
Definition Actions.hh:89
bool is_replacement
Definition Actions.hh:96
Position
Definition Actions.hh:74
DataCell newcell
Definition Actions.hh:88
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:121
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:149
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:65
DataCell::id_t ref_cell_id() const
The id of the cell this action acted on.
Definition Actions.cc:28
virtual void execute(DocumentThread &, GUIBase &)
Perform the action.
Definition Actions.cc:38
virtual bool undoable() const
Can this action be undone?
Definition Actions.cc:23
std::function< void()> callback
If you want a callback once this action has finished, set it here before queuing.
Definition Actions.hh:62
DataCell::id_t ref_id
Definition Actions.hh:58
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:288
int alternative() const
Definition Actions.cc:502
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:480
std::string text
Definition Actions.hh:302
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:490
virtual ~ActionCompleteText()
Definition Actions.hh:291
int alternative_
Definition Actions.hh:303
int length() const
Definition Actions.cc:497
DTree::iterator this_cell
Definition Actions.hh:300
int insert_pos
Definition Actions.hh:301
Remove a text string starting at the indicated position, and with the indicated length,...
Definition Actions.hh:315
int to_pos
Definition Actions.hh:325
std::string removed_text
Definition Actions.hh:326
virtual ~ActionEraseText()
Definition Actions.hh:318
int from_pos
Definition Actions.hh:325
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:512
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:521
DTree::iterator this_cell
Definition Actions.hh:324
Add a text string (can be just a single character) at the point of the cursor.
Definition Actions.hh:266
virtual ~ActionInsertText()
Definition Actions.hh:269
std::string text
Definition Actions.hh:277
int insert_pos
Definition Actions.hh:276
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:467
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:458
DTree::iterator this_cell
Definition Actions.hh:275
Open a notebook from a file, in the current window.
Definition Actions.hh:243
virtual ~ActionOpen()
Definition Actions.cc:406
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:426
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:410
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:415
std::string notebook_name
Definition Actions.hh:253
Position the cursor relative to the indicated cell.
Definition Actions.hh:109
virtual ~ActionPositionCursor()
Definition Actions.hh:114
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:230
DTree::iterator newref
Definition Actions.hh:121
Position pos
Definition Actions.hh:122
Position
Definition Actions.hh:111
uint64_t needed_new_cell_with_id
Definition Actions.hh:120
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:159
Remove a cell and all its child cells from the document.
Definition Actions.hh:166
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:262
DTree::iterator reference_parent_cell
Definition Actions.hh:181
size_t reference_child_index
Definition Actions.hh:182
DTree removed_tree
Definition Actions.hh:180
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:249
virtual ~ActionRemoveCell()
Definition Actions.cc:245
Replace the contents of a cell.
Definition Actions.hh:189
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:293
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:289
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:297
virtual ~ActionReplaceCell()
Definition Actions.cc:285
Run a cell or run all cells.
Definition Actions.hh:222
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:385
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:396
ActionRunCell()
Definition Actions.cc:371
bool run_all_cells
Definition Actions.hh:236
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:380
virtual ~ActionRunCell()
Definition Actions.cc:376
Update the running status of the indicated cell.
Definition Actions.hh:129
DTree::iterator this_cell
Definition Actions.hh:139
bool was_running_
Definition Actions.hh:140
virtual ~ActionSetRunStatus()
Definition Actions.hh:132
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:346
bool new_running_
Definition Actions.hh:140
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:351
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:361
Update the list of referenced variables in this cell.
Definition Actions.hh:147
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:448
virtual ~ActionSetVariableList()
Definition Actions.hh:150
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:436
std::set< std::string > new_variables_
Definition Actions.hh:158
DTree::iterator this_cell
Definition Actions.hh:157
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:441
Split a cell into two separate cells, at the point of the cursor.
Definition Actions.hh:205
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:334
virtual ~ActionSplitCell()
Definition Actions.cc:307
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:311
DTree::iterator newref
Definition Actions.hh:214
Definition DataCell.hh:116
Each cell is identified by a serial number 'id' which is used to keep track of it across network call...
Definition DataCell.hh:53
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
void set(rset_t::iterator &num, multiplier_t fac)
Definition Storage.cc:1180