79 virtual bool undoable()
const override;
133 virtual bool undoable()
const override;
151 virtual bool undoable()
const override;
193 virtual bool undoable()
const override;
230 virtual bool undoable()
const override;
247 virtual bool undoable()
const override;
Add a cell to the notebook.
Definition Actions.hh:68
Position pos
Definition Actions.hh:86
virtual ~ActionAddCell()
Definition Actions.hh:73
int child_num
Definition Actions.hh:87
bool activate
Definition Actions.hh:88
bool is_input_form
Definition Actions.hh:96
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:62
DTree::iterator newref
Definition Actions.hh:85
bool is_replacement
Definition Actions.hh:92
Position
Definition Actions.hh:70
DataCell newcell
Definition Actions.hh:84
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:111
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:139
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:61
virtual void execute(DocumentThread &, GUIBase &)
Perform the action.
Definition Actions.cc:28
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:58
DataCell::id_t ref_id
Definition Actions.hh:54
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:284
int alternative() const
Definition Actions.cc:492
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:470
std::string text
Definition Actions.hh:298
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:480
virtual ~ActionCompleteText()
Definition Actions.hh:287
int alternative_
Definition Actions.hh:299
int length() const
Definition Actions.cc:487
DTree::iterator this_cell
Definition Actions.hh:296
int insert_pos
Definition Actions.hh:297
Remove a text string starting at the indicated position, and with the indicated length,...
Definition Actions.hh:311
int to_pos
Definition Actions.hh:321
std::string removed_text
Definition Actions.hh:322
virtual ~ActionEraseText()
Definition Actions.hh:314
int from_pos
Definition Actions.hh:321
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:502
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:511
DTree::iterator this_cell
Definition Actions.hh:320
Add a text string (can be just a single character) at the point of the cursor.
Definition Actions.hh:262
virtual ~ActionInsertText()
Definition Actions.hh:265
std::string text
Definition Actions.hh:273
int insert_pos
Definition Actions.hh:272
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:457
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:448
DTree::iterator this_cell
Definition Actions.hh:271
Open a notebook from a file, in the current window.
Definition Actions.hh:239
virtual ~ActionOpen()
Definition Actions.cc:396
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:416
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:400
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:405
std::string notebook_name
Definition Actions.hh:249
Position the cursor relative to the indicated cell.
Definition Actions.hh:105
virtual ~ActionPositionCursor()
Definition Actions.hh:110
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:220
DTree::iterator newref
Definition Actions.hh:117
Position pos
Definition Actions.hh:118
Position
Definition Actions.hh:107
uint64_t needed_new_cell_with_id
Definition Actions.hh:116
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:149
Remove a cell and all its child cells from the document.
Definition Actions.hh:162
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:252
DTree::iterator reference_parent_cell
Definition Actions.hh:177
size_t reference_child_index
Definition Actions.hh:178
DTree removed_tree
Definition Actions.hh:176
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:239
virtual ~ActionRemoveCell()
Definition Actions.cc:235
Replace the contents of a cell.
Definition Actions.hh:185
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:279
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:287
virtual ~ActionReplaceCell()
Definition Actions.cc:275
Run a cell or run all cells.
Definition Actions.hh:218
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:375
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:386
ActionRunCell()
Definition Actions.cc:361
bool run_all_cells
Definition Actions.hh:232
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:370
virtual ~ActionRunCell()
Definition Actions.cc:366
Update the running status of the indicated cell.
Definition Actions.hh:125
DTree::iterator this_cell
Definition Actions.hh:135
bool was_running_
Definition Actions.hh:136
virtual ~ActionSetRunStatus()
Definition Actions.hh:128
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:336
bool new_running_
Definition Actions.hh:136
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:341
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:351
Update the list of referenced variables in this cell.
Definition Actions.hh:143
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:438
virtual ~ActionSetVariableList()
Definition Actions.hh:146
virtual bool undoable() const override
Can this action be undone?
Definition Actions.cc:426
std::set< std::string > new_variables_
Definition Actions.hh:154
DTree::iterator this_cell
Definition Actions.hh:153
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:431
Split a cell into two separate cells, at the point of the cursor.
Definition Actions.hh:201
virtual void revert(DocumentThread &, GUIBase &) override
Revert the change to the DTree document and the GUI.
Definition Actions.cc:324
virtual ~ActionSplitCell()
Definition Actions.cc:297
virtual void execute(DocumentThread &, GUIBase &) override
Perform the action.
Definition Actions.cc:301
DTree::iterator newref
Definition Actions.hh:210
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:1179