Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
GUIBase.hh
Go to the documentation of this file.
1
2#pragma once
3
4#include <deque>
5
6#include "DataCell.hh"
7
8namespace cadabra {
9
15
16 class GUIBase {
17 public:
22
23 virtual void update_cell(const DTree&, DTree::iterator)=0;
24
30
31 virtual void remove_cell(const DTree&, DTree::iterator)=0;
32
35
36 virtual void remove_all_cells()=0;
37
46
47 virtual void add_cell(const DTree&, DTree::iterator, bool visible)=0;
48
51
52 virtual void position_cursor(const DTree&, DTree::iterator, int)=0;
53
55
56 virtual size_t get_cursor_position(const DTree&, DTree::iterator)=0;
57
60
61 virtual void hide_visual_cells(DTree::iterator)=0;
62
65
66 virtual void dim_output_cells(DTree::iterator)=0;
67
72
74
75 virtual void on_connect()=0;
76 virtual void on_disconnect(const std::string& reason)=0;
77 virtual void on_network_error()=0;
78 virtual void on_kernel_runstatus(bool)=0;
79
81
88
89 virtual void process_data()=0;
90
91 };
92
93 };
Definition DataCell.hh:116
Abstract base class with methods that need to be implemented by any GUI.
Definition GUIBase.hh:16
virtual void process_data()=0
When the ComputeThread needs to modify the document, it stores an ActionBase object on the stack (see...
virtual size_t get_cursor_position(const DTree &, DTree::iterator)=0
Retrieve the position of the cursor in the current cell.
virtual void on_network_error()=0
virtual void dim_output_cells(DTree::iterator)=0
Dim all output cells of the visual cells corresponding to the given document cell.
virtual void on_kernel_runstatus(bool)=0
virtual void on_disconnect(const std::string &reason)=0
virtual void update_cell(const DTree &, DTree::iterator)=0
The basic manipulations that a GUI needs to implement are adding, removing and updating (refreshing t...
virtual void remove_all_cells()=0
Remove all GUI cells from the display (used as a quick way to clear all before loading a new document...
virtual void remove_cell(const DTree &, DTree::iterator)=0
Remove a single cell together with all its child cells.
virtual void hide_visual_cells(DTree::iterator)=0
Hide all visual cells (on all canvasses) corresponding to a given document cell.
virtual void position_cursor(const DTree &, DTree::iterator, int)=0
Position the cursor in the current canvas in the widget corresponding to the indicated cell.
virtual void add_cell(const DTree &, DTree::iterator, bool visible)=0
Add a GUI cell corresponding to the document cell at the iterator.
virtual void on_connect()=0
Network status is propagated from the ComputeThread to the GUI using the following methods.
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:1140