Cadabra
Computer algebra system for field theory problems
GUIBase.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <deque>
5 
6 #include "DataCell.hh"
7 
8 namespace 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 
62 
64 
65  virtual void on_connect()=0;
66  virtual void on_disconnect(const std::string& reason)=0;
67  virtual void on_network_error()=0;
68  virtual void on_kernel_runstatus(bool)=0;
69 
71 
78 
79  virtual void process_data()=0;
80 
81  };
82 
83  };
cadabra::GUIBase::on_disconnect
virtual void on_disconnect(const std::string &reason)=0
cadabra::GUIBase::update_cell
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...
cadabra::GUIBase
Definition: GUIBase.hh:16
cadabra::GUIBase::process_data
virtual void process_data()=0
When the ComputeThread needs to modify the document, it stores an ActionBase object on the stack (see...
cadabra::GUIBase::remove_all_cells
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...
cadabra::GUIBase::remove_cell
virtual void remove_cell(const DTree &, DTree::iterator)=0
Remove a single cell together with all its child cells.
cadabra::GUIBase::get_cursor_position
virtual size_t get_cursor_position(const DTree &, DTree::iterator)=0
Retrieve the position of the cursor in the current cell.
cadabra::GUIBase::on_connect
virtual void on_connect()=0
Network status is propagated from the ComputeThread to the GUI using the following methods.
DataCell.hh
cadabra::DTree
tree< DataCell > DTree
Definition: DataCell.hh:108
cadabra::GUIBase::on_kernel_runstatus
virtual void on_kernel_runstatus(bool)=0
cadabra::GUIBase::position_cursor
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.
cadabra::GUIBase::add_cell
virtual void add_cell(const DTree &, DTree::iterator, bool visible)=0
Add a GUI cell corresponding to the document cell at the iterator.
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:82
cadabra::GUIBase::on_network_error
virtual void on_network_error()=0