 |
Cadabra
Computer algebra system for field theory problems
|
Go to the documentation of this file.
16 class ActionPositionCursor;
17 class ActionRemoveCell;
18 class ActionSetRunStatus;
19 class ActionSplitCell;
20 class ActionInsertText;
21 class ActionEraseText;
96 using ColorMap = std::map<std::string, std::string>;
97 Prefs(
bool use_defaults =
false);
114 void set_user_details(
const std::string& name,
const std::string&
email,
const std::string& affiliation);
150 help_t& help_type, std::string& help_topic)
const;
friend ActionSplitCell
Definition: DocumentThread.hh:89
std::string config_path
Definition: DocumentThread.hh:107
friend ActionBase
Definition: DocumentThread.hh:85
void undo()
One undo step.
Definition: DocumentThread.cc:81
std::stack< std::shared_ptr< ActionBase > > ActionStack
Definition: DocumentThread.hh:135
Base class which talks to the server and sends Action objects back to the DocumentThread.
Definition: ComputeThread.hh:35
friend ActionSetRunStatus
Definition: DocumentThread.hh:90
void load_from_string(const std::string &)
Load a new notebook from a JSON string.
Definition: DocumentThread.cc:71
std::string git_path
Definition: DocumentThread.hh:104
Abstract base class with methods that need to be implemented by any GUI.
Definition: GUIBase.hh:16
friend ActionInsertText
Definition: DocumentThread.hh:91
ActionStack redo_stack
Definition: DocumentThread.hh:136
bool disable_stacks
Definition: DocumentThread.hh:138
int font_step
Definition: DocumentThread.hh:99
void set_user_details(const std::string &name, const std::string &email, const std::string &affiliation)
Set user details which will be sent to the Cadabra log server.
Definition: DocumentThread.cc:229
ActionStack undo_stack
Definition: DocumentThread.hh:136
virtual void set_compute_thread(ComputeThread *)
Let the notebook know about the ComputeThread so that it can send cells for evaluation.
Definition: DocumentThread.cc:43
GUIBase * gui
Definition: DocumentThread.hh:117
DTree doc
The actual document tree.
Definition: DocumentThread.hh:126
help_t
Help system.
Definition: DocumentThread.hh:148
std::map< std::string, ColorMap > colours
Definition: DocumentThread.hh:103
Prefs prefs
Definition: DocumentThread.hh:109
std::map< std::string, std::string > ColorMap
Definition: DocumentThread.hh:96
friend ActionPositionCursor
Definition: DocumentThread.hh:87
void queue_action(std::shared_ptr< ActionBase >)
All changes to the document should be made by submitting ActionBase derived objects to the 'queue_act...
Definition: DocumentThread.cc:120
const char email[]
Definition: Snoop.hh:163
void build_visual_representation()
Ensure that the gui has an up-to-date representation of the dtree.
Definition: DocumentThread.cc:102
bool highlight
Definition: DocumentThread.hh:100
friend ActionRemoveCell
Definition: DocumentThread.hh:88
bool help_type_and_topic(const std::string &before, const std::string &after, help_t &help_type, std::string &help_topic) const
Definition: DocumentThread.cc:238
Definition: DocumentThread.hh:94
bool is_registered
Definition: DocumentThread.hh:101
friend ActionAddCell
Definition: DocumentThread.hh:86
DocumentThread(GUIBase *)
Definition: DocumentThread.cc:25
friend ActionEraseText
Definition: DocumentThread.hh:92
tree< DataCell > DTree
Definition: DataCell.hh:108
A base class with all the logic to manipulate a Cadabra notebook document.
Definition: DocumentThread.hh:39
virtual void on_interactive_output(const Json::Value &msg)
Definition: DocumentThread.cc:38
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:80
std::mutex stack_mutex
The action undo/redo/todo stacks and logic to execute them.
Definition: DocumentThread.hh:134
Json::Value data
Definition: DocumentThread.hh:106
void save()
Definition: DocumentThread.cc:210
void new_document()
Setup an empty new document with a single Python input cell.
Definition: DocumentThread.cc:48
std::queue< std::shared_ptr< ActionBase > > pending_actions
Definition: DocumentThread.hh:137
DocumentThread(const DocumentThread &)=delete
It is not possible to copy-construct a DocumentThread as it holds on to resources which are not easil...
bool is_anonymous
Definition: DocumentThread.hh:102
void process_action_queue()
Process the action queue.
Definition: DocumentThread.cc:127
ComputeThread * compute
Definition: DocumentThread.hh:118
Prefs(bool use_defaults=false)
Definition: DocumentThread.cc:157