![]() |
Cadabra
Computer algebra system for field theory problems
|
Split a cell into two separate cells, at the point of the cursor.
#include <Actions.hh>
Public Member Functions | |
ActionSplitCell (DataCell::id_t ref_id) | |
virtual | ~ActionSplitCell () |
virtual void | execute (DocumentThread &, GUIBase &) override |
Perform the action. | |
virtual void | revert (DocumentThread &, GUIBase &) override |
Revert the change to the DTree document and the GUI. | |
![]() | |
ActionBase (DataCell::id_t ref_id) | |
virtual bool | undoable () const |
Can this action be undone? | |
Private Attributes | |
DTree::iterator | newref |
Additional Inherited Members | |
![]() | |
DataCell::id_t | ref_id |
std::function< void()> | callback |
If you want a callback once this action has finished, set it here before queuing. | |
![]() | |
DTree::iterator | ref |
ActionSplitCell::ActionSplitCell | ( | DataCell::id_t | ref_id | ) |
|
virtual |
|
overridevirtual |
Perform the action.
This should update both the document tree data structure and the GUI. The latter is updated by calling relevant methods on the GUIBase object passed in.
The base class just looks up the cell given its id_t
. If your action does not refer to a cell at all, you do not need to call the base class execute
.
Reimplemented from cadabra::ActionBase.
|
overridevirtual |
Revert the change to the DTree document and the GUI.
Implements cadabra::ActionBase.
|
private |