Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
NotebookWindow.hh
Go to the documentation of this file.
1
2#pragma once
3
4#include <gtkmm/window.h>
5#include <gtkmm/applicationwindow.h>
6#include <gtkmm/box.h>
7#include <gtkmm/progressbar.h>
8#include <gtkmm/spinner.h>
9#include <gtkmm/label.h>
10// #include <gtkmm/stock.h>
11#include <gtkmm/button.h>
12#include <gtkmm/builder.h>
13#include <gtkmm/cssprovider.h>
14#ifdef USE_GTK4
15#include <gtkmm/popovermenubar.h>
16#include <gtkmm/eventcontrollerkey.h>
17#else
18#include <gtkmm/menubar.h>
19#endif
20// #include <gtkmm/toolbar.h>
21#include <glibmm/dispatcher.h>
22#include <giomm/settings.h>
23#include <giomm/actiongroup.h>
24
25#include <thread>
26#include <mutex>
27
28#include "nlohmann/json.hpp"
29
30#include "DocumentThread.hh"
31#include "ComputeThread.hh"
32#include "Console.hh"
33#include "GUIBase.hh"
34#include "NotebookCanvas.hh"
35#include "../common/TeXEngine.hh"
36#include "DiffViewer.hh"
37
38class Cadabra;
39
40namespace cadabra {
41
46
47 class NotebookWindow : public Gtk::ApplicationWindow, public DocumentThread, public GUIBase {
48 public:
49 NotebookWindow(Cadabra *, bool read_only=false, std::string geometry="", std::string title="");
51
52 // Virtual functions from GUIBase.
53
54 virtual void add_cell(const DTree&, DTree::iterator, bool) override;
55 virtual void remove_cell(const DTree&, DTree::iterator) override;
56 virtual void remove_all_cells() override;
57 virtual void update_cell(const DTree&, DTree::iterator) override;
58 virtual void position_cursor(const DTree&, DTree::iterator, int pos) override;
59 virtual size_t get_cursor_position(const DTree&, DTree::iterator) override;
60 virtual void hide_visual_cells(DTree::iterator it) override;
61 virtual void dim_output_cells(DTree::iterator it) override;
62
63 void select_range(const DTree&, DTree::iterator, int start, int len);
64
65 // Implementations of the functions which the compute thread will
66 // call directly. If these need to modify the GUI, they need to do
67 // so by calling one of the dispatchers.
68 virtual void on_connect() override;
69 virtual void on_disconnect(const std::string&) override;
70 virtual void on_network_error() override;
71 virtual void on_kernel_runstatus(bool) override;
72 virtual void process_data() override;
73
74 // TeX stuff
76 double scale; // total scale factor (hdpi and textscale)
77 double display_scale; // hdpi scale only
78
79 // General setup.
80 void on_realize() override;
81
82 // Handler for vertical scrollbar changes. This gets connected to
83 // all the `NotebookCanvas::scroll_event` signals.
84 bool on_scroll_changed();
85
86 // Handler for SliderView change events.
87 void on_slider_changed(std::string variable, double value);
88
89 // When something inside the large notebook canvas changes, we need
90 // to make sure that the current cell stays into view (if we are
91 // editing that cell). We can only do that once all size info is
92 // known, which is when the scrolledwindow gets its size_allocate
93 // signal. Here's the handler for it.
95
96 // Ensure that the current cell is visible. This will assume
97 // that all size allocations of widgets inside the scrolled window
98 // have been made; it only does scrolling, based on the current
99 // allocations. Calls `scroll_cell_into_view`.
101
102 // Ensure that the indicated cell is visible.
103 void scroll_cell_into_view(DTree::iterator cell);
104
105 void set_name(const std::string&);
106 void set_title_prefix(const std::string&);
107
109 void on_help_register();
110
111 void set_statusbar_message(const std::string& message = "", int line = -1, int col = -1);
112
114 void select_git_path();
115 void compare_to_file();
116 void compare_git_latest();
117 void compare_git_choose();
119 void compare_git(const std::string& commit_hash);
120 std::string run_git_command(const std::string& args);
121
122 virtual void load_from_string(const std::string& notebook_contents) override;
123 virtual void set_compute_thread(ComputeThread* compute) override;
124
125 virtual void on_interactive_output(const nlohmann::json& msg) override;
126 virtual void set_progress(const std::string& msg, int cur_step, int total_steps) override;
127 protected:
131 bool handle_key_press(guint keyval, Gdk::ModifierType state);
133 void handle_width_change(int width);
134
135#ifdef USE_GTK4
136 void size_allocate_vfunc(int width, int height, int baseline) override;
137#else
138 virtual bool on_key_press_event(GdkEventKey*) override;
139 virtual bool on_delete_event(GdkEventAny*) override;
140 virtual bool on_configure_event(GdkEventConfigure *cfg) override;
141#endif
142 virtual bool on_unhandled_error(const std::exception& err) override;
143
144 void handle_outbox_select(DTree::iterator it);
145 DTree::iterator selected_cell;
147 void on_outbox_copy(DTree::iterator it);
148
149 private:
157
158 std::vector<Glib::RefPtr<Gio::SimpleAction>> default_actions;
159
160 // Main handler which fires whenever the Client object signals
161 // that the document is changing or the network status is modified.
162 // Runs on the GUI thread.
163
164 Glib::Dispatcher dispatcher;
165
166 // GUI elements.
167
168#ifdef USE_GTK4
169 Glib::RefPtr<Gtk::EventControllerKey> window_key_controller;
170#endif
171
172 Glib::RefPtr<Gio::SimpleActionGroup> actiongroup;
173 Glib::RefPtr<Gtk::Builder> uimanager;
174
175 Gtk::Box topbox;
176 Gtk::Box toolbar;
179 Gtk::Box supermainbox;
180 Gtk::Paned dragbox;
181 Gtk::Box mainbox;
182 Gtk::SearchBar searchbar;
183 Gtk::Box search_hbox;
184 Gtk::SearchEntry searchentry;
185 Gtk::CheckButton search_case_insensitive;
186 Gtk::Label search_result;
187 Gtk::Box statusbarbox;
188
190 Gtk::Dialog console_win;
191
192 std::unique_ptr<DiffViewer> diffviewer;
193
194 // All canvasses which are stored in the ...
195 // These pointers are managed by gtkmm.
196 std::vector<NotebookCanvas *> canvasses;
198
199 // Buttons
200 // Gtk::Button b_kill, b_run, b_run_to, b_run_from, b_help, b_stop, b_undo, b_redo;
201
202 // Status bar
203 Gtk::ProgressBar progressbar;
204 Gtk::Spinner kernel_spinner;
207
208 // GUI data which is the autoritative source for things displayed in
209 // the status bars declared above. These strings are filled on the
210 // compute thread and then updated into the gui on the gui thread.
211
212 std::mutex status_mutex;
216
217 // Functions which get called on the compute thread can signal to
218 // the GUI thread that elements need to be updated, by sending
219 // signals using the following dispatchers.
221
222 // Update the status line and progress bar. This should only
223 // be called on the GUI thread, so typically gets called
224 // indirectly by calling `dispatch_update_status.emmit()`
225 // from the compute thread, which calls this function.
226 void update_status();
227
228 // Run the TeX engine on a separate thread, then call
229 // `dispatch_refresh` to update the display.
230
231 // Name and modification data.
232 void update_title();
233 void set_stop_sensitive(bool);
236
237 // Menu and button callbacks.
238 void on_file_new();
239 void on_file_open();
240 void on_file_close();
241 void on_file_save();
242 void on_file_save_as();
244 void on_file_export_html();
248 void on_file_quit();
249 bool quit_safeguard(bool quit);
250 bool on_first_redraw();
251
252 void on_edit_undo(const Glib::VariantBase&);
253 void on_edit_redo(const Glib::VariantBase&);
254 void on_edit_copy(const Glib::VariantBase&);
255 void on_edit_paste();
258 void on_edit_delete();
259 void on_edit_split();
263 void on_edit_find();
264
265 void on_view_split();
266 void on_view_close(const Glib::VariantBase&);
267
268 void on_run_cell();
269 void on_run_runtocursor();
270 void on_run_stop();
271
272 void on_prefs_set_cv(int vis);
273 void on_prefs_auto_close_latex(const Glib::VariantBase& vb);
274 void on_prefs_hide_input_cells(const Glib::VariantBase& vb);
275 void on_prefs_font_size(int num);
276 void on_prefs_highlight_syntax(bool on);
279
280 void on_tools_options();
282
283 void on_help_about();
284 void on_help() const;
285
286 void on_kernel_restart();
288
291
294
295 // FIXME: move to DocumentThread
296 std::string save(const std::string& fn) const;
297
303 void process_todo_queue();
304
310
311 void on_crash_window_closed(int);
313
314 // The following are handlers that get called when the cell
315 // gets focus, the content of a cell is changed, the user
316 // requests to run it (shift-enter). The last two parameters are
317 // always the cell in the DTree and the canvas number.
318
319 bool cell_got_focus(DTree::iterator, int);
320 bool cell_toggle_visibility(DTree::iterator it, int);
321 bool cell_content_insert(const std::string&, int, DTree::iterator, int);
322 bool cell_content_erase(int, int, DTree::iterator, int);
323 bool cell_content_execute(DTree::iterator, bool shift_enter_pressed);
324 bool cell_content_changed(DTree::iterator it, int i);
325 bool cell_complete_request(DTree::iterator it, int pos, int i);
326
327 void interactive_execute();
328
329 void resize_codeinput_texview_all(int width);
330 void resize_codeinput_texview(DTree::iterator, int width);
331
332 // Handler for callbacks from TeXView cells.
333
334 bool on_tex_error(const std::string&, DTree::iterator);
335 bool on_copy_as_latex(const DTree::iterator it);
336
338
339 // Styling through CSS
340 void load_css();
341 Glib::RefPtr<Gtk::CssProvider> css_provider;
342 Glib::RefPtr<Gio::Settings> settings;
343 void on_text_scaling_factor_changed(const std::string& key);
344
346
347 // Mutex to protect the variables below.
348
349 std::pair<DTree::iterator, size_t> last_find_location;
350 std::string last_find_string;
351
352 bool is_configured; // have received and handled a configure event
353 bool run_all_after_restart; // queue notebook running when kernel comes back
354
355 // We keep references to a few menu actions so we can
356 // enable/disable them at runtime.
357 Glib::RefPtr<Gio::SimpleAction> action_copy, action_undo, action_redo,
361
362 // Transition animations.
363#if GTKMM_MAJOR_VERSION>3 || (GTKMM_MAJOR_VERSION==3 && GTKMM_MINOR_VERSION>=10)
364 std::vector<Gtk::Revealer *> to_reveal;
365#endif
366 bool idle_handler();
367 };
368
369 };
int quit(void *)
Definition Server.cc:328
The Cadabra notebook application.
Definition Cadabra.hh:12
Base class which talks to the server and sends Action objects back to the DocumentThread.
Definition ComputeThread.hh:42
Definition Console.hh:18
Definition DataCell.hh:116
A base class with all the logic to manipulate a Cadabra notebook document.
Definition DocumentThread.hh:41
ComputeThread * compute
Definition DocumentThread.hh:159
Abstract base class with methods that need to be implemented by any GUI.
Definition GUIBase.hh:16
Each notebook has one main window which controls it.
Definition NotebookWindow.hh:47
void on_file_quit()
Definition NotebookWindow.cc:2605
virtual void load_from_string(const std::string &notebook_contents) override
Load a new notebook from a JSON string.
Definition NotebookWindow.cc:2317
void on_view_split()
Definition NotebookWindow.cc:2787
bool kernel_spinner_status
Definition NotebookWindow.hh:205
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:1199
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:2902
bool cell_content_erase(int, int, DTree::iterator, int)
Definition NotebookWindow.cc:2115
Gtk::Box mainbox
Definition NotebookWindow.hh:181
std::unique_ptr< DiffViewer > diffviewer
Definition NotebookWindow.hh:192
bool on_copy_as_latex(const DTree::iterator it)
Definition NotebookWindow.cc:2222
Gtk::Label kernel_label
Definition NotebookWindow.hh:206
Glib::RefPtr< Gio::SimpleAction > action_fontsize
Definition NotebookWindow.hh:358
virtual void set_progress(const std::string &msg, int cur_step, int total_steps) override
Definition NotebookWindow.cc:1646
std::string progress_string
Definition NotebookWindow.hh:213
void on_tools_options()
Definition NotebookWindow.cc:3381
void on_file_export_html()
Definition NotebookWindow.cc:2442
virtual void on_connect() override
Network status is propagated from the ComputeThread to the GUI using the following methods.
Definition NotebookWindow.cc:1206
bool on_scroll_changed()
Definition NotebookWindow.cc:2005
void propagate_global_hide_flag()
Definition NotebookWindow.cc:3265
double display_scale
Definition NotebookWindow.hh:77
Glib::RefPtr< Gtk::CssProvider > css_provider
Definition NotebookWindow.hh:341
bool handle_key_press(guint keyval, Gdk::ModifierType state)
Window-level handlers shared between the toolkits.
Definition NotebookWindow.cc:1323
void on_edit_copy(const Glib::VariantBase &)
Definition NotebookWindow.cc:2623
void compare_to_file()
Definition NotebookWindow.cc:3050
Glib::Dispatcher dispatch_update_status
Definition NotebookWindow.hh:220
virtual bool on_configure_event(GdkEventConfigure *cfg) override
Definition NotebookWindow.cc:1127
void on_crash_window_closed(int)
Definition NotebookWindow.cc:1314
void on_prefs_choose_colours()
Definition NotebookWindow.cc:3358
int status_col
Definition NotebookWindow.hh:215
void on_run_cell()
Definition NotebookWindow.cc:2808
void on_search_text_changed()
Search handling.
Definition NotebookWindow.cc:2712
int last_configure_width
Definition NotebookWindow.hh:345
void select_range(const DTree &, DTree::iterator, int start, int len)
Definition NotebookWindow.cc:1875
void process_todo_queue()
Todo deque processing logic.
Definition NotebookWindow.cc:1262
void on_edit_undo(const Glib::VariantBase &)
Definition NotebookWindow.cc:2613
void on_prefs_hide_input_cells(const Glib::VariantBase &vb)
Definition NotebookWindow.cc:3248
virtual void remove_cell(const DTree &, DTree::iterator) override
Remove a single cell together with all its child cells.
Definition NotebookWindow.cc:1680
double progress_frac
Definition NotebookWindow.hh:214
virtual size_t get_cursor_position(const DTree &, DTree::iterator) override
Retrieve the position of the cursor in the current cell.
Definition NotebookWindow.cc:1897
Gtk::Button tool_restart
Definition NotebookWindow.hh:178
Glib::RefPtr< Gio::SimpleActionGroup > actiongroup
Definition NotebookWindow.hh:172
void compare_git_latest()
Definition NotebookWindow.cc:3122
Glib::Dispatcher dispatcher
Definition NotebookWindow.hh:164
virtual bool on_unhandled_error(const std::exception &err) override
Definition NotebookWindow.cc:1143
void interactive_execute()
Definition NotebookWindow.cc:2156
void on_edit_find()
Definition NotebookWindow.cc:2704
void handle_width_change(int width)
Re-layout the cells when the window width changes.
Definition NotebookWindow.cc:1107
Gtk::Box toolbar
Definition NotebookWindow.hh:176
std::string kernel_string
Definition NotebookWindow.hh:213
Glib::RefPtr< Gio::SimpleAction > action_undo
Definition NotebookWindow.hh:357
bool read_only
Definition NotebookWindow.hh:235
DTree::iterator selected_cell
Definition NotebookWindow.hh:145
Gtk::Button tool_run
Definition NotebookWindow.hh:178
Glib::RefPtr< Gio::SimpleAction > action_paste
Definition NotebookWindow.hh:358
Gtk::Label status_label
Definition NotebookWindow.hh:206
Glib::RefPtr< Gio::SimpleAction > action_hide_input_cells
Definition NotebookWindow.hh:359
void on_edit_paste()
Definition NotebookWindow.cc:2634
void on_realize() override
Definition NotebookWindow.cc:80
void on_file_export_python()
Definition NotebookWindow.cc:2491
std::mutex status_mutex
Definition NotebookWindow.hh:212
Gtk::Label top_label
Definition NotebookWindow.hh:206
Gtk::SearchBar searchbar
Definition NotebookWindow.hh:182
void refresh_highlighting()
Definition NotebookWindow.cc:3487
std::string last_find_string
Definition NotebookWindow.hh:350
Gtk::ProgressBar progressbar
Definition NotebookWindow.hh:203
Gtk::CheckButton search_case_insensitive
Definition NotebookWindow.hh:185
void on_help_about()
Definition NotebookWindow.cc:2907
virtual void dim_output_cells(DTree::iterator it) override
Dim all output cells of the visual cells corresponding to the given document cell.
Definition NotebookWindow.cc:2128
Cadabra * cdbapp
The application object, owned by main() for the lifetime of the process; this is a borrowed pointer,...
Definition NotebookWindow.hh:156
void resize_codeinput_texview_all(int width)
Definition NotebookWindow.cc:1039
Gtk::Label search_result
Definition NotebookWindow.hh:186
void on_edit_insert_below()
Definition NotebookWindow.cc:2666
void on_edit_insert_above()
Definition NotebookWindow.cc:2650
void on_prefs_use_defaults()
Definition NotebookWindow.cc:3365
std::string run_git_command(const std::string &args)
Definition NotebookWindow.cc:3077
void on_help() const
Definition NotebookWindow.cc:2869
void on_edit_split()
Definition NotebookWindow.cc:2749
virtual bool on_key_press_event(GdkEventKey *) override
Definition NotebookWindow.cc:1388
std::string clipboard_cdb
Definition NotebookWindow.hh:293
void on_help_register()
Definition NotebookWindow.cc:2938
Gtk::Button tool_restart_and_run_all
Definition NotebookWindow.hh:178
void update_title()
Definition NotebookWindow.cc:1155
Gtk::Button tool_stop
Definition NotebookWindow.hh:178
void on_scroll_size_allocated()
Definition NotebookWindow.cc:2018
std::vector< Glib::RefPtr< Gio::SimpleAction > > default_actions
Definition NotebookWindow.hh:158
void on_edit_delete()
Definition NotebookWindow.cc:2684
void on_outbox_copy(DTree::iterator it)
Definition NotebookWindow.cc:3545
bool is_configured
Definition NotebookWindow.hh:352
void on_edit_redo(const Glib::VariantBase &)
Definition NotebookWindow.cc:2618
Gtk::Paned dragbox
Definition NotebookWindow.hh:180
std::string clipboard_txt
Clipboard handling.
Definition NotebookWindow.hh:293
void on_prefs_highlight_syntax(bool on)
Definition NotebookWindow.cc:3326
Gtk::Box supermainbox
Definition NotebookWindow.hh:179
void on_file_save_as_jupyter()
Definition NotebookWindow.cc:2409
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:1830
Glib::RefPtr< Gio::SimpleAction > action_copy
Definition NotebookWindow.hh:357
bool on_first_redraw()
Definition NotebookWindow.cc:2338
void set_stop_sensitive(bool)
Definition NotebookWindow.cc:1191
void unselect_output_cell()
Definition NotebookWindow.cc:3506
void scroll_cell_into_view(DTree::iterator cell)
Definition NotebookWindow.cc:1918
void on_file_export_latex()
Definition NotebookWindow.cc:2463
void on_run_stop()
Definition NotebookWindow.cc:2838
double scale
Definition NotebookWindow.hh:76
void on_prefs_font_size(int num)
Definition NotebookWindow.cc:3290
std::pair< DTree::iterator, size_t > last_find_location
Definition NotebookWindow.hh:349
void select_git_path()
Functionality for the diff viewer.
Definition NotebookWindow.cc:3040
void on_text_scaling_factor_changed(const std::string &key)
Definition NotebookWindow.cc:3019
bool crash_window_hidden
Definition NotebookWindow.hh:312
std::vector< NotebookCanvas * > canvasses
Definition NotebookWindow.hh:196
virtual void on_disconnect(const std::string &) override
Definition NotebookWindow.cc:1231
bool cell_complete_request(DTree::iterator it, int pos, int i)
Definition NotebookWindow.cc:2163
void on_ignore_cell_on_import()
Definition NotebookWindow.cc:2767
void on_prefs_auto_close_latex(const Glib::VariantBase &vb)
Definition NotebookWindow.cc:3236
virtual void on_interactive_output(const nlohmann::json &msg) override
Definition NotebookWindow.cc:1641
void on_file_new()
Definition NotebookWindow.cc:2251
void refresh_after_tex_engine_run()
Refresh the display after a TeX engine run has completed.
Definition NotebookWindow.cc:1137
Glib::RefPtr< Gio::SimpleAction > action_redo
Definition NotebookWindow.hh:357
bool quit_safeguard(bool quit)
Definition NotebookWindow.cc:2567
virtual void on_network_error() override
Definition NotebookWindow.cc:1239
virtual bool on_delete_event(GdkEventAny *) override
Definition NotebookWindow.cc:988
TeXEngine engine
Definition NotebookWindow.hh:75
void on_edit_cell_is_python()
Definition NotebookWindow.cc:2756
Glib::RefPtr< Gio::SimpleAction > action_console
Definition NotebookWindow.hh:360
std::string save(const std::string &fn) const
Definition NotebookWindow.cc:2542
void on_kernel_restart()
Definition NotebookWindow.cc:2844
bool handle_close_request()
Returns true to block the close, matching GTK4's ::close-request.
Definition NotebookWindow.cc:978
bool run_all_after_restart
Definition NotebookWindow.hh:353
void on_prefs_set_cv(int vis)
Definition NotebookWindow.cc:996
Glib::RefPtr< Gtk::Builder > uimanager
Definition NotebookWindow.hh:173
void on_file_save()
Definition NotebookWindow.cc:2349
void scroll_current_cell_into_view()
Definition NotebookWindow.cc:1910
Gtk::Button tool_save_as
Definition NotebookWindow.hh:177
void on_run_runtocursor()
Definition NotebookWindow.cc:2821
Gtk::Button tool_run_to
Definition NotebookWindow.hh:178
void on_file_save_as()
Definition NotebookWindow.cc:2372
void on_kernel_restart_and_run_all()
Definition NotebookWindow.cc:2862
bool idle_handler()
Definition NotebookWindow.cc:3495
Gtk::Button tool_save
Definition NotebookWindow.hh:177
void compare_git_choose()
Definition NotebookWindow.cc:3154
void set_title_prefix(const std::string &)
Definition NotebookWindow.cc:1150
bool cell_got_focus(DTree::iterator, int)
Definition NotebookWindow.cc:2145
bool on_tex_error(const std::string &, DTree::iterator)
Definition NotebookWindow.cc:2228
Gtk::SearchEntry searchentry
Definition NotebookWindow.hh:184
bool modified
Definition NotebookWindow.hh:235
void update_status()
Definition NotebookWindow.cc:1662
Gtk::Dialog console_win
Definition NotebookWindow.hh:190
void on_edit_cell_is_latex()
Definition NotebookWindow.cc:2776
bool cell_toggle_visibility(DTree::iterator it, int)
Definition NotebookWindow.cc:2035
Glib::RefPtr< Gio::SimpleAction > action_highlight
Definition NotebookWindow.hh:358
void on_view_close(const Glib::VariantBase &)
Definition NotebookWindow.cc:2797
Console console
Definition NotebookWindow.hh:189
int status_line
Definition NotebookWindow.hh:215
Glib::RefPtr< Gio::SimpleAction > action_stop
Definition NotebookWindow.hh:360
void on_tools_clear_cache()
Definition NotebookWindow.cc:3469
Gtk::Box search_hbox
Definition NotebookWindow.hh:183
void compare_git_specific()
Definition NotebookWindow.cc:3209
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:1789
std::string name
Definition NotebookWindow.hh:234
void on_slider_changed(std::string variable, double value)
Definition NotebookWindow.cc:2012
void set_statusbar_message(const std::string &message="", int line=-1, int col=-1)
Definition NotebookWindow.cc:1180
bool cell_content_execute(DTree::iterator, bool shift_enter_pressed)
Definition NotebookWindow.cc:2182
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:1396
bool cell_content_changed(DTree::iterator it, int i)
Definition NotebookWindow.cc:2092
~NotebookWindow()
Definition NotebookWindow.cc:878
Gtk::Button tool_open
Definition NotebookWindow.hh:177
void handle_outbox_select(DTree::iterator it)
Definition NotebookWindow.cc:3521
std::string geometry_string
Definition NotebookWindow.hh:234
void compare_git(const std::string &commit_hash)
Definition NotebookWindow.cc:3104
void on_file_open()
Definition NotebookWindow.cc:2278
std::string status_string
Definition NotebookWindow.hh:213
virtual void on_kernel_runstatus(bool) override
Definition NotebookWindow.cc:1246
void on_file_export_html_segment()
Definition NotebookWindow.cc:2515
Glib::Dispatcher dispatch_refresh
Definition NotebookWindow.hh:220
Gtk::Spinner kernel_spinner
Definition NotebookWindow.hh:204
Glib::RefPtr< Gio::Settings > settings
Definition NotebookWindow.hh:342
virtual void hide_visual_cells(DTree::iterator it) override
Hide all visual cells (on all canvasses) corresponding to a given document cell.
Definition NotebookWindow.cc:2208
Gtk::Box statusbarbox
Definition NotebookWindow.hh:187
void on_file_close()
Definition NotebookWindow.cc:2264
Glib::RefPtr< Gio::SimpleAction > action_view_close
Definition NotebookWindow.hh:358
bool cell_content_insert(const std::string &, int, DTree::iterator, int)
Definition NotebookWindow.cc:2103
void load_css()
Definition NotebookWindow.cc:882
int current_canvas
Definition NotebookWindow.hh:197
Glib::RefPtr< Gio::SimpleAction > action_auto_close_latex
Definition NotebookWindow.hh:359
std::string title_prefix
Definition NotebookWindow.hh:234
void set_name(const std::string &)
Definition NotebookWindow.cc:2311
void resize_codeinput_texview(DTree::iterator, int width)
Definition NotebookWindow.cc:1052
Glib::RefPtr< Gio::SimpleAction > action_register
Definition NotebookWindow.hh:360
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:1770
Gtk::Box topbox
Definition NotebookWindow.hh:175
TeXEngine is used to convert LaTeX strings into PNG images.
Definition TeXEngine.hh:23
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:1180