Cadabra
Computer algebra system for field theory problems
|
Complete text at a point in a GUI cell with one or more alternative.
In contrast to ActionInsertText, this one is triggered from the server-side, so will update the GUI both for execute and revert.
#include <Actions.hh>
Public Member Functions | |
ActionCompleteText (DataCell::id_t ref_id, int pos, const std::string &, int alternative) | |
virtual | ~ActionCompleteText () |
virtual void | execute (DocumentThread &, GUIBase &) override |
Perform the action. More... | |
virtual void | revert (DocumentThread &, GUIBase &) override |
Revert the change to the DTree document and the GUI. More... | |
int | length () const |
int | alternative () const |
Public Member Functions inherited from cadabra::ActionBase | |
ActionBase (DataCell::id_t ref_id) | |
virtual bool | undoable () const |
Can this action be undone? More... | |
Private Attributes | |
DTree::iterator | this_cell |
int | insert_pos |
std::string | text |
int | alternative_ |
Additional Inherited Members | |
Public Attributes inherited from cadabra::ActionBase | |
DataCell::id_t | ref_id |
Protected Attributes inherited from cadabra::ActionBase | |
DTree::iterator | ref |
ActionCompleteText::ActionCompleteText | ( | DataCell::id_t | ref_id, |
int | pos, | ||
const std::string & | content, | ||
int | alternative | ||
) |
|
inlinevirtual |
int ActionCompleteText::alternative | ( | ) | const |
|
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.
Reimplemented from cadabra::ActionBase.
int ActionCompleteText::length | ( | ) | const |
|
overridevirtual |
Revert the change to the DTree document and the GUI.
Implements cadabra::ActionBase.
|
private |
|
private |
|
private |
|
private |