Cadabra
Computer algebra system for field theory problems
NotebookWindow.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <gtkmm/window.h>
5 #include <gtkmm/box.h>
6 #include <gtkmm/progressbar.h>
7 #include <gtkmm/spinner.h>
8 #include <gtkmm/label.h>
9 #include <gtkmm/stock.h>
10 #include <gtkmm/button.h>
11 #include <gtkmm/uimanager.h>
12 #include <gtkmm/cssprovider.h>
13 #include <glibmm/dispatcher.h>
14 #include <giomm/settings.h>
15 #include <gtkmm/action.h>
16 
17 #include <thread>
18 #include <mutex>
19 
20 #include "nlohmann/json.hpp"
21 
22 #include "DocumentThread.hh"
23 #include "ComputeThread.hh"
24 #include "Console.hh"
25 #include "GUIBase.hh"
26 #include "NotebookCanvas.hh"
27 #include "../common/TeXEngine.hh"
28 #include "DiffViewer.hh"
29 
30 class Cadabra;
31 
32 namespace cadabra {
33 
38 
39  class NotebookWindow : public Gtk::Window, public DocumentThread, public GUIBase {
40  public:
41  NotebookWindow(Cadabra *, bool read_only=false);
43 
44  // Virtual functions from GUIBase.
45 
46  virtual void add_cell(const DTree&, DTree::iterator, bool) override;
47  virtual void remove_cell(const DTree&, DTree::iterator) override;
48  virtual void remove_all_cells() override;
49  virtual void update_cell(const DTree&, DTree::iterator) override;
50  virtual void position_cursor(const DTree&, DTree::iterator, int pos) override;
51  virtual size_t get_cursor_position(const DTree&, DTree::iterator) override;
52 
53  void select_range(const DTree&, DTree::iterator, int start, int len);
54 
55  virtual void on_connect() override;
56  virtual void on_disconnect(const std::string&) override;
57  virtual void on_network_error() override;
58  virtual void on_kernel_runstatus(bool) override;
59 
60  virtual void process_data() override;
61 
62  // TeX stuff
64  double scale; // total scale factor (hdpi and textscale)
65  double display_scale; // hdpi scale only
66 
67  // Handler for vertical scrollbar changes.
68  bool on_vscroll_changed(Gtk::ScrollType, double);
69 
70  // Handler for mouse wheel events.
71  // bool on_mouse_wheel(GdkEventButton*);
72 
73  // Handler for scroll events.
74  bool on_scroll(GdkEventScroll*);
75 
76  // When something inside the large notebook canvas changes, we need
77  // to make sure that the current cell stays into view (if we are
78  // editing that cell). We can only do that once all size info is
79  // known, which is when the scrolledwindow gets its size_allocate
80  // signal. Here's the handler for it.
81  void on_scroll_size_allocate(Gtk::Allocation&);
82 
83  // Ensure that the current cell is visible. This will assume
84  // that all size allocations of widgets inside the scrolled window
85  // have been made; it only does scrolling, based on the current
86  // allocations. Calls `scroll_cell_into_view`.
88 
89  // Ensure that the indicated cell is visible.
90  void scroll_cell_into_view(DTree::iterator cell);
91 
92  void set_name(const std::string&);
93  void set_title_prefix(const std::string&);
94 
95  void load_file(const std::string& notebook_contents);
96  void refresh_highlighting();
97  void on_help_register();
98 
100  void select_git_path();
101  void compare_to_file();
102  void compare_git_latest();
103  void compare_git_choose();
104  void compare_git_specific();
105  void compare_git(const std::string& commit_hash);
106  std::string run_git_command(const std::string& args);
107 
108  virtual void set_compute_thread(ComputeThread* compute) override;
109 
110  virtual void on_interactive_output(const nlohmann::json& msg) override;
111 
112  protected:
113  virtual bool on_key_press_event(GdkEventKey*) override;
114  virtual bool on_delete_event(GdkEventAny*) override;
115  virtual bool on_configure_event(GdkEventConfigure *cfg) override;
116 
117  DTree::iterator current_cell;
118 
119  bool handle_outbox_select(GdkEventButton *, DTree::iterator it);
120  DTree::iterator selected_cell;
121  void unselect_output_cell();
122  void on_outbox_copy(Glib::RefPtr<Gtk::Clipboard> refClipboard, DTree::iterator it);
123 
124  private:
126 
127  std::vector<Glib::RefPtr<Gtk::Action>> default_actions;
128 
129  // Main handler which fires whenever the Client object signals
130  // that the document is changing or the network status is modified.
131  // Runs on the GUI thread.
132 
133  Glib::Dispatcher dispatcher;
134 
135  // GUI elements.
136 
137  Glib::RefPtr<Gtk::ActionGroup> actiongroup;
138  Glib::RefPtr<Gtk::UIManager> uimanager;
139 
140  Gtk::VBox topbox;
141  Gtk::HBox supermainbox;
142  Gtk::VBox mainbox;
143  // Gtk::HBox buttonbox;
144  Gtk::SearchBar searchbar;
145  Gtk::HBox search_hbox;
146  Gtk::SearchEntry searchentry;
147  Gtk::CheckButton search_case_insensitive;
148  Gtk::Label search_result;
149  Gtk::HBox statusbarbox;
150 
152  Gtk::Dialog console_win;
153 
154  std::unique_ptr<DiffViewer> diffviewer;
155 
156  // All canvasses which are stored in the ...
157  // These pointers are managed by gtkmm.
158  std::vector<NotebookCanvas *> canvasses;
160 
161  // Buttons
162  // Gtk::Button b_kill, b_run, b_run_to, b_run_from, b_help, b_stop, b_undo, b_redo;
163 
164  // Status bar
165  Gtk::ProgressBar progressbar;
166  Gtk::Spinner kernel_spinner;
169 
170  // GUI data which is the autoritative source for things displayed in
171  // the status bars declared above. These strings are filled on the
172  // compute thread and then updated into the gui on the gui thread.
173 
174  std::mutex status_mutex;
176 
177  // Name and modification data.
178  void update_title();
179  void set_stop_sensitive(bool);
180  std::string name, title_prefix;
182 
183  // Menu and button callbacks.
184  void on_file_new();
185  void on_file_open();
186  void on_file_close();
187  void on_file_save();
188  void on_file_save_as();
189  void on_file_save_as_jupyter();
190  void on_file_export_html();
192  void on_file_export_latex();
193  void on_file_export_python();
194  void on_file_quit();
195  bool quit_safeguard(bool quit);
196 
197  void on_edit_undo();
198  void on_edit_copy();
199  Glib::RefPtr<Gtk::Action> action_copy, action_paste;
200  void on_edit_paste();
201  void on_edit_insert_above();
202  void on_edit_insert_below();
203  void on_edit_delete();
204  void on_edit_split();
205  void on_edit_cell_is_latex();
206  void on_edit_cell_is_python();
208  void on_edit_find();
209 
210  void on_view_split();
211  void on_view_close();
212 
213  void on_run_cell();
214  void on_run_runall();
215  void on_run_runtocursor();
216  void on_run_stop();
217 
218  void on_prefs_set_cv(int vis);
219  void on_prefs_font_size(int num);
220  void on_prefs_highlight_syntax(bool on);
222  void on_prefs_use_defaults();
223 
224  void on_tools_options();
225  void on_tools_clear_cache();
226 
227  void on_help_about();
228  void on_help() const;
229 
230  void on_kernel_restart();
231 
233  void on_search_text_changed();
234 
236  void on_clipboard_get(Gtk::SelectionData&, guint info);
237  void on_clipboard_clear();
239 
240  // FIXME: move to DocumentThread
241  std::string save(const std::string& fn) const;
242 
246  void process_todo_queue();
247 
248  void on_crash_window_closed(int);
250 
251  // The following are handlers that get called when the cell
252  // gets focus, the content of a cell is changed, the user
253  // requests to run it (shift-enter). The last two parameters are
254  // always the cell in the DTree and the canvas number.
255 
256  bool cell_got_focus(DTree::iterator, int);
257  bool cell_toggle_visibility(DTree::iterator it, int);
258  bool cell_content_insert(const std::string&, int, DTree::iterator, int);
259  bool cell_content_erase(int, int, DTree::iterator, int);
260  bool cell_content_execute(DTree::iterator, int, bool shift_enter_pressed);
261  bool cell_content_changed(DTree::iterator it, int i);
262  bool cell_complete_request(DTree::iterator it, int pos, int i);
263 
264  void interactive_execute();
265 
266  void dim_output_cells(DTree::iterator it);
267 
268  // Handler for callbacks from TeXView cells.
269 
270  bool on_tex_error(const std::string&, DTree::iterator);
271 
272  // Styling through CSS
273  void load_css();
274  Glib::RefPtr<Gtk::CssProvider> css_provider;
275  Glib::RefPtr<Gio::Settings> settings;
276  void on_text_scaling_factor_changed(const std::string& key);
277 
279  DTree::iterator follow_cell;
280 
281  std::pair<DTree::iterator, size_t> last_find_location;
282  std::string last_find_string;
283 
285 
286  Glib::RefPtr<Gtk::Action> menu_help_register;
287 
288  // Transition animations.
289 #if GTKMM_MINOR_VERSION>=10
290  std::vector<Gtk::Revealer *> to_reveal;
291 #endif
292  bool idle_handler();
293  };
294 
295  };
cadabra::NotebookWindow::process_data
virtual void process_data() override
When the ComputeThread needs to modify the document, it stores an ActionBase object on the stack (see...
Definition: NotebookWindow.cc:617
cadabra::NotebookWindow::last_find_string
std::string last_find_string
Definition: NotebookWindow.hh:282
cadabra::NotebookWindow::compare_to_file
void compare_to_file()
Definition: NotebookWindow.cc:2097
DocumentThread.hh
cadabra::NotebookWindow::interactive_execute
void interactive_execute()
Definition: NotebookWindow.cc:1295
cadabra::NotebookWindow::on_clipboard_clear
void on_clipboard_clear()
Definition: NotebookWindow.cc:2593
cadabra::NotebookWindow::compare_git_latest
void compare_git_latest()
Definition: NotebookWindow.cc:2169
cadabra::NotebookWindow::statusbarbox
Gtk::HBox statusbarbox
Definition: NotebookWindow.hh:149
cadabra::NotebookWindow::on_prefs_font_size
void on_prefs_font_size(int num)
Definition: NotebookWindow.cc:2290
cadabra::NotebookWindow::on_help_about
void on_help_about()
Definition: NotebookWindow.cc:1967
cadabra::NotebookWindow::on_file_export_latex
void on_file_export_latex()
Definition: NotebookWindow.cc:1569
ComputeThread.hh
NotebookCanvas.hh
cadabra::NotebookWindow::search_result
Gtk::Label search_result
Definition: NotebookWindow.hh:148
cadabra::NotebookWindow::on_edit_insert_above
void on_edit_insert_above()
Definition: NotebookWindow.cc:1726
cadabra::NotebookWindow::on_connect
virtual void on_connect() override
Network status is propagated from the ComputeThread to the GUI using the following methods.
Definition: NotebookWindow.cc:623
cadabra::NotebookWindow::on_file_save_as
void on_file_save_as()
Definition: NotebookWindow.cc:1482
cadabra::NotebookWindow::cell_got_focus
bool cell_got_focus(DTree::iterator, int)
Definition: NotebookWindow.cc:1285
cadabra::NotebookWindow::on_file_new
void on_file_new()
Definition: NotebookWindow.cc:1387
cadabra::ComputeThread
Definition: ComputeThread.hh:35
cadabra::NotebookWindow::on_kernel_runstatus
virtual void on_kernel_runstatus(bool) override
Definition: NotebookWindow.cc:651
cadabra::NotebookWindow::console
Console console
Definition: NotebookWindow.hh:151
cadabra::NotebookWindow::menu_help_register
Glib::RefPtr< Gtk::Action > menu_help_register
Definition: NotebookWindow.hh:286
cadabra::NotebookWindow::idle_handler
bool idle_handler()
Definition: NotebookWindow.cc:2506
cadabra::NotebookWindow::default_actions
std::vector< Glib::RefPtr< Gtk::Action > > default_actions
Definition: NotebookWindow.hh:127
cadabra::NotebookWindow::canvasses
std::vector< NotebookCanvas * > canvasses
Definition: NotebookWindow.hh:158
cadabra::NotebookWindow::actiongroup
Glib::RefPtr< Gtk::ActionGroup > actiongroup
Definition: NotebookWindow.hh:137
cadabra::NotebookWindow::on_file_export_python
void on_file_export_python()
Definition: NotebookWindow.cc:1592
cadabra::NotebookWindow::diffviewer
std::unique_ptr< DiffViewer > diffviewer
Definition: NotebookWindow.hh:154
cadabra::NotebookWindow::dispatcher
Glib::Dispatcher dispatcher
Definition: NotebookWindow.hh:133
cadabra::NotebookWindow::cell_content_erase
bool cell_content_erase(int, int, DTree::iterator, int)
Definition: NotebookWindow.cc:1255
cadabra::NotebookWindow::set_stop_sensitive
void set_stop_sensitive(bool)
Definition: NotebookWindow.cc:609
cadabra::NotebookWindow::set_compute_thread
virtual void set_compute_thread(ComputeThread *compute) override
Let the notebook know about the ComputeThread so that it can send cells for evaluation.
Definition: NotebookWindow.cc:1961
cadabra::NotebookWindow::on_tex_error
bool on_tex_error(const std::string &, DTree::iterator)
Definition: NotebookWindow.cc:1359
cadabra::TeXEngine
Definition: TeXEngine.hh:23
cadabra::NotebookWindow::status_mutex
std::mutex status_mutex
Definition: NotebookWindow.hh:174
cadabra::GUIBase
Definition: GUIBase.hh:16
cadabra::NotebookWindow::on_file_export_html
void on_file_export_html()
Definition: NotebookWindow.cc:1549
cadabra::NotebookWindow::display_scale
double display_scale
Definition: NotebookWindow.hh:65
cadabra::NotebookWindow::on_disconnect
virtual void on_disconnect(const std::string &) override
Definition: NotebookWindow.cc:637
cadabra::NotebookWindow::on_crash_window_closed
void on_crash_window_closed(int)
Definition: NotebookWindow.cc:706
cadabra::NotebookWindow::compare_git_specific
void compare_git_specific()
Definition: NotebookWindow.cc:2263
cadabra::NotebookWindow::run_git_command
std::string run_git_command(const std::string &args)
Definition: NotebookWindow.cc:2124
cadabra::NotebookWindow::on_ignore_cell_on_import
void on_ignore_cell_on_import()
Definition: NotebookWindow.cc:1839
quit
int quit(void *)
Definition: Server.cc:241
Console.hh
cadabra::NotebookWindow::title_prefix
std::string title_prefix
Definition: NotebookWindow.hh:180
cadabra::NotebookWindow::scale
double scale
Definition: NotebookWindow.hh:64
cadabra::NotebookWindow::quit_safeguard
bool quit_safeguard(bool quit)
Definition: NotebookWindow.cc:1660
cadabra::NotebookWindow::on_search_text_changed
void on_search_text_changed()
Search handling.
Definition: NotebookWindow.cc:1784
cadabra::NotebookWindow::load_css
void load_css()
Definition: NotebookWindow.cc:454
cadabra::NotebookWindow::on_edit_cell_is_python
void on_edit_cell_is_python()
Definition: NotebookWindow.cc:1828
cadabra::NotebookWindow::name
std::string name
Definition: NotebookWindow.hh:180
cadabra::NotebookWindow::update_title
void update_title()
Definition: NotebookWindow.cc:593
cadabra::NotebookWindow::kernel_string
std::string kernel_string
Definition: NotebookWindow.hh:175
cadabra::NotebookWindow::on_view_close
void on_view_close()
Definition: NotebookWindow.cc:1869
cadabra::NotebookWindow::action_copy
Glib::RefPtr< Gtk::Action > action_copy
Definition: NotebookWindow.hh:199
cadabra::NotebookWindow::position_cursor
virtual void position_cursor(const DTree &, DTree::iterator, int pos) override
Position the cursor in the current canvas in the widget corresponding to the indicated cell.
Definition: NotebookWindow.cc:1047
cadabra::NotebookWindow::clipboard_txt
std::string clipboard_txt
Definition: NotebookWindow.hh:238
cadabra::NotebookWindow::kernel_spinner
Gtk::Spinner kernel_spinner
Definition: NotebookWindow.hh:166
cadabra::NotebookWindow::read_only
bool read_only
Definition: NotebookWindow.hh:181
cadabra::NotebookWindow::refresh_highlighting
void refresh_highlighting()
Definition: NotebookWindow.cc:2498
cadabra::NotebookWindow::remove_cell
virtual void remove_cell(const DTree &, DTree::iterator) override
Remove a single cell together with all its child cells.
Definition: NotebookWindow.cc:942
Cadabra
The Cadabra notebook application.
Definition: Cadabra.hh:11
cadabra::NotebookWindow::~NotebookWindow
~NotebookWindow()
Definition: NotebookWindow.cc:450
cadabra::NotebookWindow::on_interactive_output
virtual void on_interactive_output(const nlohmann::json &msg) override
Definition: NotebookWindow.cc:937
cadabra::NotebookWindow::searchbar
Gtk::SearchBar searchbar
Definition: NotebookWindow.hh:144
cadabra::NotebookWindow::on_run_stop
void on_run_stop()
Definition: NotebookWindow.cc:1917
cadabra::NotebookWindow::scroll_cell_into_view
void scroll_cell_into_view(DTree::iterator cell)
Definition: NotebookWindow.cc:1113
cadabra::NotebookWindow::on_edit_paste
void on_edit_paste()
Definition: NotebookWindow.cc:1722
cadabra::NotebookWindow::modified
bool modified
Definition: NotebookWindow.hh:181
cadabra::NotebookWindow::on_file_close
void on_file_close()
Definition: NotebookWindow.cc:1400
cadabra::NotebookWindow::on_vscroll_changed
bool on_vscroll_changed(Gtk::ScrollType, double)
Definition: NotebookWindow.cc:1162
cadabra::NotebookWindow::on_file_save_as_jupyter
void on_file_save_as_jupyter()
Definition: NotebookWindow.cc:1516
cadabra::NotebookWindow::compare_git
void compare_git(const std::string &commit_hash)
Definition: NotebookWindow.cc:2151
cadabra::NotebookWindow::unselect_output_cell
void unselect_output_cell()
Definition: NotebookWindow.cc:2517
cadabra::NotebookWindow::status_label
Gtk::Label status_label
Definition: NotebookWindow.hh:168
cadabra::NotebookWindow::on_tools_clear_cache
void on_tools_clear_cache()
Definition: NotebookWindow.cc:2480
cadabra::NotebookWindow::on_prefs_choose_colours
void on_prefs_choose_colours()
Definition: NotebookWindow.cc:2369
cadabra::NotebookWindow::on_edit_copy
void on_edit_copy()
Definition: NotebookWindow.cc:1711
cadabra::NotebookWindow::action_paste
Glib::RefPtr< Gtk::Action > action_paste
Definition: NotebookWindow.hh:199
cadabra::NotebookWindow::load_file
void load_file(const std::string &notebook_contents)
Definition: NotebookWindow.cc:1453
cadabra::NotebookWindow::progressbar
Gtk::ProgressBar progressbar
Definition: NotebookWindow.hh:165
cadabra::NotebookWindow::on_configure_event
virtual bool on_configure_event(GdkEventConfigure *cfg) override
Definition: NotebookWindow.cc:563
cadabra::NotebookWindow::kernel_label
Gtk::Label kernel_label
Definition: NotebookWindow.hh:168
cadabra::NotebookWindow::update_cell
virtual void update_cell(const DTree &, DTree::iterator) override
The basic manipulations that a GUI needs to implement are adding, removing and updating (refreshing t...
Definition: NotebookWindow.cc:1031
cadabra::NotebookWindow::is_configured
bool is_configured
Definition: NotebookWindow.hh:284
cadabra::NotebookWindow::on_scroll_size_allocate
void on_scroll_size_allocate(Gtk::Allocation &)
Definition: NotebookWindow.cc:1186
cadabra::NotebookWindow::process_todo_queue
void process_todo_queue()
Todo deque processing logic.
Definition: NotebookWindow.cc:658
cadabra::NotebookWindow::on_help_register
void on_help_register()
Definition: NotebookWindow.cc:1997
cadabra::NotebookWindow::on_edit_find
void on_edit_find()
Definition: NotebookWindow.cc:1776
cadabra::NotebookWindow::remove_all_cells
virtual void remove_all_cells() override
Remove all GUI cells from the display (used as a quick way to clear all before loading a new document...
Definition: NotebookWindow.cc:1021
cadabra::NotebookWindow::cell_content_execute
bool cell_content_execute(DTree::iterator, int, bool shift_enter_pressed)
Definition: NotebookWindow.cc:1319
cadabra::NotebookWindow::searchentry
Gtk::SearchEntry searchentry
Definition: NotebookWindow.hh:146
cadabra::NotebookWindow::set_name
void set_name(const std::string &)
Definition: NotebookWindow.cc:1447
cadabra::NotebookWindow::on_key_press_event
virtual bool on_key_press_event(GdkEventKey *) override
Definition: NotebookWindow.cc:711
cadabra::NotebookWindow::kernel_spinner_status
bool kernel_spinner_status
Definition: NotebookWindow.hh:167
cadabra::NotebookWindow::add_cell
virtual void add_cell(const DTree &, DTree::iterator, bool) override
Add a GUI cell corresponding to the document cell at the iterator.
Definition: NotebookWindow.cc:767
cadabra::NotebookWindow::css_provider
Glib::RefPtr< Gtk::CssProvider > css_provider
Definition: NotebookWindow.hh:274
cadabra::NotebookWindow::on_prefs_use_defaults
void on_prefs_use_defaults()
Definition: NotebookWindow.cc:2376
cadabra::NotebookWindow::follow_cell
DTree::iterator follow_cell
Definition: NotebookWindow.hh:279
DiffViewer.hh
snoop::info
const char info[]
Definition: Snoop.hh:336
cadabra::NotebookWindow::compare_git_choose
void compare_git_choose()
Definition: NotebookWindow.cc:2201
cadabra::NotebookWindow::on_delete_event
virtual bool on_delete_event(GdkEventAny *) override
Definition: NotebookWindow.cc:517
cadabra::NotebookWindow::search_hbox
Gtk::HBox search_hbox
Definition: NotebookWindow.hh:145
cadabra::NotebookWindow::on_kernel_restart
void on_kernel_restart()
Definition: NotebookWindow.cc:1922
cadabra::DTree
tree< DataCell > DTree
Definition: DataCell.hh:108
cadabra::DocumentThread
Definition: DocumentThread.hh:40
cadabra::NotebookWindow::search_case_insensitive
Gtk::CheckButton search_case_insensitive
Definition: NotebookWindow.hh:147
cadabra::NotebookWindow::cell_content_insert
bool cell_content_insert(const std::string &, int, DTree::iterator, int)
Definition: NotebookWindow.cc:1242
cadabra::NotebookWindow::mainbox
Gtk::VBox mainbox
Definition: NotebookWindow.hh:142
cadabra::NotebookWindow::uimanager
Glib::RefPtr< Gtk::UIManager > uimanager
Definition: NotebookWindow.hh:138
cadabra::NotebookWindow::selected_cell
DTree::iterator selected_cell
Definition: NotebookWindow.hh:120
cadabra::NotebookWindow::on_file_save
void on_file_save()
Definition: NotebookWindow.cc:1462
GUIBase.hh
cadabra::NotebookWindow::on_scroll
bool on_scroll(GdkEventScroll *)
Definition: NotebookWindow.cc:1177
cadabra::NotebookWindow::supermainbox
Gtk::HBox supermainbox
Definition: NotebookWindow.hh:141
cadabra::Console
Definition: Console.hh:27
cadabra::NotebookWindow::cell_toggle_visibility
bool cell_toggle_visibility(DTree::iterator it, int)
Definition: NotebookWindow.cc:1203
cadabra::NotebookWindow::cell_content_changed
bool cell_content_changed(DTree::iterator it, int i)
Definition: NotebookWindow.cc:1231
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:82
cadabra::NotebookWindow::on_edit_undo
void on_edit_undo()
Definition: NotebookWindow.cc:1706
cadabra::NotebookWindow::on_run_cell
void on_run_cell()
Definition: NotebookWindow.cc:1880
cadabra::NotebookWindow::on_file_export_html_segment
void on_file_export_html_segment()
Definition: NotebookWindow.cc:1612
cadabra::NotebookWindow::get_cursor_position
virtual size_t get_cursor_position(const DTree &, DTree::iterator) override
Retrieve the position of the cursor in the current cell.
Definition: NotebookWindow.cc:1094
cadabra::NotebookWindow::on_network_error
virtual void on_network_error() override
Definition: NotebookWindow.cc:644
cadabra::NotebookWindow::on_outbox_copy
void on_outbox_copy(Glib::RefPtr< Gtk::Clipboard > refClipboard, DTree::iterator it)
Definition: NotebookWindow.cc:2555
cadabra::NotebookWindow::clipboard_cdb
std::string clipboard_cdb
Definition: NotebookWindow.hh:238
cadabra::NotebookWindow::on_clipboard_get
void on_clipboard_get(Gtk::SelectionData &, guint info)
Clipboard handling.
Definition: NotebookWindow.cc:2582
cadabra::NotebookWindow::on_edit_cell_is_latex
void on_edit_cell_is_latex()
Definition: NotebookWindow.cc:1848
cadabra::NotebookWindow::on_run_runall
void on_run_runall()
Definition: NotebookWindow.cc:1893
cadabra::NotebookWindow::console_win
Gtk::Dialog console_win
Definition: NotebookWindow.hh:152
cadabra::NotebookWindow::on_file_quit
void on_file_quit()
Definition: NotebookWindow.cc:1698
cadabra::NotebookWindow::on_edit_split
void on_edit_split()
Definition: NotebookWindow.cc:1821
cadabra::NotebookWindow::status_string
std::string status_string
Definition: NotebookWindow.hh:175
cadabra::NotebookWindow::settings
Glib::RefPtr< Gio::Settings > settings
Definition: NotebookWindow.hh:275
cadabra::NotebookWindow::last_configure_width
int last_configure_width
Definition: NotebookWindow.hh:278
cadabra::NotebookWindow::handle_outbox_select
bool handle_outbox_select(GdkEventButton *, DTree::iterator it)
Definition: NotebookWindow.cc:2531
cadabra::NotebookWindow::on_help
void on_help() const
Definition: NotebookWindow.cc:1929
cadabra::NotebookWindow::current_cell
DTree::iterator current_cell
Definition: NotebookWindow.hh:117
cadabra::NotebookWindow::dim_output_cells
void dim_output_cells(DTree::iterator it)
Definition: NotebookWindow.cc:1268
cadabra::NotebookWindow::on_text_scaling_factor_changed
void on_text_scaling_factor_changed(const std::string &key)
Definition: NotebookWindow.cc:2065
cadabra::NotebookWindow::engine
TeXEngine engine
Definition: NotebookWindow.hh:63
cadabra::NotebookWindow::current_canvas
int current_canvas
Definition: NotebookWindow.hh:159
cadabra::NotebookWindow::crash_window_hidden
bool crash_window_hidden
Definition: NotebookWindow.hh:249
cadabra::NotebookWindow::save
std::string save(const std::string &fn) const
Definition: NotebookWindow.cc:1635
cadabra::NotebookWindow::on_tools_options
void on_tools_options()
Definition: NotebookWindow.cc:2392
cadabra::NotebookWindow::last_find_location
std::pair< DTree::iterator, size_t > last_find_location
Definition: NotebookWindow.hh:281
cadabra::NotebookWindow::on_file_open
void on_file_open()
Definition: NotebookWindow.cc:1414
cadabra::NotebookWindow::on_prefs_highlight_syntax
void on_prefs_highlight_syntax(bool on)
Definition: NotebookWindow.cc:2338
cadabra::NotebookWindow::cdbapp
Cadabra * cdbapp
Definition: NotebookWindow.hh:125
cadabra::DocumentThread::compute
ComputeThread * compute
Definition: DocumentThread.hh:126
cadabra::NotebookWindow::cell_complete_request
bool cell_complete_request(DTree::iterator it, int pos, int i)
Definition: NotebookWindow.cc:1300
cadabra::NotebookWindow
Definition: NotebookWindow.hh:39
cadabra::NotebookWindow::topbox
Gtk::VBox topbox
Definition: NotebookWindow.hh:140
cadabra::NotebookWindow::on_edit_insert_below
void on_edit_insert_below()
Definition: NotebookWindow.cc:1742
cadabra::NotebookWindow::scroll_current_cell_into_view
void scroll_current_cell_into_view()
Definition: NotebookWindow.cc:1107
cadabra::NotebookWindow::on_edit_delete
void on_edit_delete()
Definition: NotebookWindow.cc:1758
cadabra::NotebookWindow::select_range
void select_range(const DTree &, DTree::iterator, int start, int len)
Definition: NotebookWindow.cc:1072
cadabra::NotebookWindow::set_title_prefix
void set_title_prefix(const std::string &)
Definition: NotebookWindow.cc:588
cadabra::NotebookWindow::NotebookWindow
NotebookWindow(Cadabra *, bool read_only=false)
Definition: NotebookWindow.cc:34
cadabra::NotebookWindow::select_git_path
void select_git_path()
Functionality for the diff viewer.
Definition: NotebookWindow.cc:2087
cadabra::NotebookWindow::on_view_split
void on_view_split()
Definition: NotebookWindow.cc:1859
cadabra::NotebookWindow::on_run_runtocursor
void on_run_runtocursor()
Definition: NotebookWindow.cc:1905
cadabra::NotebookWindow::on_prefs_set_cv
void on_prefs_set_cv(int vis)
Definition: NotebookWindow.cc:527