 |
Cadabra
Computer algebra system for field theory problems
|
Go to the documentation of this file.
4 #include <gtkmm/window.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>
25 #include "../common/TeXEngine.hh"
44 virtual void add_cell(
const DTree&, DTree::iterator,
bool)
override;
88 void load_file(
const std::string& notebook_contents);
115 void on_outbox_copy(Glib::RefPtr<Gtk::Clipboard> refClipboard, DTree::iterator it);
219 std::string
save(
const std::string& fn)
const;
264 #if GTKMM_MINOR_VERSION>=10
265 std::vector<Gtk::Revealer *> to_reveal;
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:524
void compare_to_file()
Definition: NotebookWindow.cc:1774
void interactive_execute()
Definition: NotebookWindow.cc:1101
void on_clipboard_clear()
Definition: NotebookWindow.cc:2162
void compare_git_latest()
Definition: NotebookWindow.cc:1846
Gtk::HBox statusbarbox
Definition: NotebookWindow.hh:137
void on_prefs_font_size(int num)
Definition: NotebookWindow.cc:1967
virtual void on_interactive_output(const Json::Value &msg) override
Definition: NotebookWindow.cc:802
void on_help_about()
Definition: NotebookWindow.cc:1644
void on_file_export_latex()
Definition: NotebookWindow.cc:1310
void on_edit_insert_above()
Definition: NotebookWindow.cc:1467
virtual void on_connect() override
Network status is propagated from the ComputeThread to the GUI using the following methods.
Definition: NotebookWindow.cc:530
void on_file_save_as()
Definition: NotebookWindow.cc:1258
bool cell_got_focus(DTree::iterator, int)
Definition: NotebookWindow.cc:1091
void on_file_new()
Definition: NotebookWindow.cc:1173
Definition: ComputeThread.hh:35
virtual void on_kernel_runstatus(bool) override
Definition: NotebookWindow.cc:552
Console console
Definition: NotebookWindow.hh:139
Glib::RefPtr< Gtk::Action > menu_help_register
Definition: NotebookWindow.hh:261
bool idle_handler()
Definition: NotebookWindow.cc:2077
std::vector< Glib::RefPtr< Gtk::Action > > default_actions
Definition: NotebookWindow.hh:120
std::vector< NotebookCanvas * > canvasses
Definition: NotebookWindow.hh:146
Glib::RefPtr< Gtk::ActionGroup > actiongroup
Definition: NotebookWindow.hh:130
void on_file_export_python()
Definition: NotebookWindow.cc:1333
std::unique_ptr< DiffViewer > diffviewer
Definition: NotebookWindow.hh:142
Glib::Dispatcher dispatcher
Definition: NotebookWindow.hh:126
bool cell_content_erase(int, int, DTree::iterator, int)
Definition: NotebookWindow.cc:1061
void set_stop_sensitive(bool)
Definition: NotebookWindow.cc:516
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:1638
bool on_tex_error(const std::string &, DTree::iterator)
Definition: NotebookWindow.cc:1145
Definition: TeXEngine.hh:23
std::mutex status_mutex
Definition: NotebookWindow.hh:162
Definition: GUIBase.hh:16
void on_file_export_html()
Definition: NotebookWindow.cc:1290
double display_scale
Definition: NotebookWindow.hh:61
virtual void on_disconnect(const std::string &) override
Definition: NotebookWindow.cc:538
void on_crash_window_closed(int)
Definition: NotebookWindow.cc:607
void compare_git_specific()
Definition: NotebookWindow.cc:1940
std::string run_git_command(const std::string &args)
Definition: NotebookWindow.cc:1801
int quit(void *)
Definition: Server.cc:237
std::string title_prefix
Definition: NotebookWindow.hh:168
double scale
Definition: NotebookWindow.hh:60
bool quit_safeguard(bool quit)
Definition: NotebookWindow.cc:1401
void on_edit_cell_is_python()
Definition: NotebookWindow.cc:1514
std::string name
Definition: NotebookWindow.hh:168
void update_title()
Definition: NotebookWindow.cc:500
std::string kernel_string
Definition: NotebookWindow.hh:163
void on_view_close()
Definition: NotebookWindow.cc:1546
Glib::RefPtr< Gtk::Action > action_copy
Definition: NotebookWindow.hh:186
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:898
std::string clipboard_txt
Definition: NotebookWindow.hh:216
Gtk::Spinner kernel_spinner
Definition: NotebookWindow.hh:154
bool read_only
Definition: NotebookWindow.hh:169
void refresh_highlighting()
Definition: NotebookWindow.cc:2069
virtual void remove_cell(const DTree &, DTree::iterator) override
Remove a single cell together with all its child cells.
Definition: NotebookWindow.cc:807
The Cadabra notebook application.
Definition: Cadabra.hh:11
~NotebookWindow()
Definition: NotebookWindow.cc:400
void on_run_stop()
Definition: NotebookWindow.cc:1594
void on_edit_paste()
Definition: NotebookWindow.cc:1463
bool modified
Definition: NotebookWindow.hh:169
void on_file_close()
Definition: NotebookWindow.cc:1186
bool on_vscroll_changed(Gtk::ScrollType, double)
Definition: NotebookWindow.cc:970
void compare_git(const std::string &commit_hash)
Definition: NotebookWindow.cc:1828
void unselect_output_cell()
Definition: NotebookWindow.cc:2088
Gtk::Label status_label
Definition: NotebookWindow.hh:156
void on_prefs_choose_colours()
Definition: NotebookWindow.cc:2046
void on_edit_copy()
Definition: NotebookWindow.cc:1452
Glib::RefPtr< Gtk::Action > action_paste
Definition: NotebookWindow.hh:186
void load_file(const std::string ¬ebook_contents)
Definition: NotebookWindow.cc:1229
Gtk::ProgressBar progressbar
Definition: NotebookWindow.hh:153
virtual bool on_configure_event(GdkEventConfigure *cfg) override
Definition: NotebookWindow.cc:470
Gtk::Label kernel_label
Definition: NotebookWindow.hh:156
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:884
bool is_configured
Definition: NotebookWindow.hh:259
void on_scroll_size_allocate(Gtk::Allocation &)
Definition: NotebookWindow.cc:994
void process_todo_queue()
Todo deque processing logic.
Definition: NotebookWindow.cc:559
void on_help_register()
Definition: NotebookWindow.cc:1674
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:874
bool cell_content_execute(DTree::iterator, int, bool shift_enter_pressed)
Definition: NotebookWindow.cc:1106
void set_name(const std::string &)
Definition: NotebookWindow.cc:1223
virtual bool on_key_press_event(GdkEventKey *) override
Definition: NotebookWindow.cc:612
bool kernel_spinner_status
Definition: NotebookWindow.hh:155
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:636
Glib::RefPtr< Gtk::CssProvider > css_provider
Definition: NotebookWindow.hh:251
void on_prefs_use_defaults()
Definition: NotebookWindow.cc:2053
DTree::iterator follow_cell
Definition: NotebookWindow.hh:256
const char info[]
Definition: Snoop.hh:159
void compare_git_choose()
Definition: NotebookWindow.cc:1878
virtual bool on_delete_event(GdkEventAny *) override
Definition: NotebookWindow.cc:424
void on_kernel_restart()
Definition: NotebookWindow.cc:1599
tree< DataCell > DTree
Definition: DataCell.hh:103
Definition: DocumentThread.hh:39
bool cell_content_insert(const std::string &, int, DTree::iterator, int)
Definition: NotebookWindow.cc:1048
Gtk::VBox mainbox
Definition: NotebookWindow.hh:135
Glib::RefPtr< Gtk::UIManager > uimanager
Definition: NotebookWindow.hh:131
DTree::iterator selected_cell
Definition: NotebookWindow.hh:113
void on_file_save()
Definition: NotebookWindow.cc:1238
bool on_scroll(GdkEventScroll *)
Definition: NotebookWindow.cc:985
Gtk::HBox supermainbox
Definition: NotebookWindow.hh:134
Definition: Console.hh:25
bool cell_toggle_visibility(DTree::iterator it, int)
Definition: NotebookWindow.cc:1011
bool cell_content_changed(DTree::iterator it, int i)
Definition: NotebookWindow.cc:1039
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Algorithm.cc:1045
void on_edit_undo()
Definition: NotebookWindow.cc:1447
void on_run_cell()
Definition: NotebookWindow.cc:1557
void on_file_export_html_segment()
Definition: NotebookWindow.cc:1353
virtual size_t get_cursor_position(const DTree &, DTree::iterator) override
Retrieve the position of the cursor in the current cell.
Definition: NotebookWindow.cc:923
virtual void on_network_error() override
Definition: NotebookWindow.cc:545
void on_outbox_copy(Glib::RefPtr< Gtk::Clipboard > refClipboard, DTree::iterator it)
Definition: NotebookWindow.cc:2124
std::string clipboard_cdb
Definition: NotebookWindow.hh:216
void on_clipboard_get(Gtk::SelectionData &, guint info)
Clipboard handling.
Definition: NotebookWindow.cc:2151
void on_edit_cell_is_latex()
Definition: NotebookWindow.cc:1525
void load_css(const std::string &)
Definition: NotebookWindow.cc:404
void on_run_runall()
Definition: NotebookWindow.cc:1570
Gtk::Dialog console_win
Definition: NotebookWindow.hh:140
void on_file_quit()
Definition: NotebookWindow.cc:1439
void on_edit_split()
Definition: NotebookWindow.cc:1507
std::string status_string
Definition: NotebookWindow.hh:163
Glib::RefPtr< Gio::Settings > settings
Definition: NotebookWindow.hh:252
int last_configure_width
Definition: NotebookWindow.hh:255
bool handle_outbox_select(GdkEventButton *, DTree::iterator it)
Definition: NotebookWindow.cc:2102
void on_help() const
Definition: NotebookWindow.cc:1606
DTree::iterator current_cell
Definition: NotebookWindow.hh:110
void dim_output_cells(DTree::iterator it)
Definition: NotebookWindow.cc:1074
void on_text_scaling_factor_changed(const std::string &key)
Definition: NotebookWindow.cc:1742
TeXEngine engine
Definition: NotebookWindow.hh:59
int current_canvas
Definition: NotebookWindow.hh:147
bool crash_window_hidden
Definition: NotebookWindow.hh:227
std::string save(const std::string &fn) const
Definition: NotebookWindow.cc:1376
void on_file_open()
Definition: NotebookWindow.cc:1192
void on_prefs_highlight_syntax(bool on)
Definition: NotebookWindow.cc:2015
Cadabra * cdbapp
Definition: NotebookWindow.hh:118
ComputeThread * compute
Definition: DocumentThread.hh:118
Definition: NotebookWindow.hh:37
Gtk::VBox topbox
Definition: NotebookWindow.hh:133
void on_edit_insert_below()
Definition: NotebookWindow.cc:1478
void scroll_current_cell_into_view()
Definition: NotebookWindow.cc:936
void on_edit_delete()
Definition: NotebookWindow.cc:1489
void set_title_prefix(const std::string &)
Definition: NotebookWindow.cc:495
NotebookWindow(Cadabra *, bool read_only=false)
Definition: NotebookWindow.cc:31
void select_git_path()
Functionality for the diff viewer.
Definition: NotebookWindow.cc:1764
void on_view_split()
Definition: NotebookWindow.cc:1536
void on_run_runtocursor()
Definition: NotebookWindow.cc:1582
void on_prefs_set_cv(int vis)
Definition: NotebookWindow.cc:434