Cadabra
Computer algebra system for field theory problems
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
cadabra::NotebookWindow Class Reference

Description

Each notebook has one main window which controls it.

It has a menu bar, a status pane and one or more panels that represent a view on the document.

#include <NotebookWindow.hh>

Inheritance diagram for cadabra::NotebookWindow:
cadabra::DocumentThread cadabra::GUIBase

Public Member Functions

 NotebookWindow (Cadabra *, bool read_only=false)
 
 ~NotebookWindow ()
 
virtual void add_cell (const DTree &, DTree::iterator, bool) override
 Add a GUI cell corresponding to the document cell at the iterator. More...
 
virtual void remove_cell (const DTree &, DTree::iterator) override
 Remove a single cell together with all its child cells. More...
 
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). More...
 
virtual void update_cell (const DTree &, DTree::iterator) override
 The basic manipulations that a GUI needs to implement are adding, removing and updating (refreshing the display of) a cell. More...
 
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. More...
 
virtual size_t get_cursor_position (const DTree &, DTree::iterator) override
 Retrieve the position of the cursor in the current cell. More...
 
void select_range (const DTree &, DTree::iterator, int start, int len)
 
virtual void on_connect () override
 Network status is propagated from the ComputeThread to the GUI using the following methods. More...
 
virtual void on_disconnect (const std::string &) override
 
virtual void on_network_error () override
 
virtual void on_kernel_runstatus (bool) override
 
virtual void process_data () override
 When the ComputeThread needs to modify the document, it stores an ActionBase object on the stack (see the DocumenThread class) and then wakes up the GUI thread signalling it to process this action. More...
 
bool on_vscroll_changed (Gtk::ScrollType, double)
 
bool on_scroll (GdkEventScroll *)
 
void on_scroll_size_allocate (Gtk::Allocation &)
 
void scroll_current_cell_into_view ()
 
void scroll_cell_into_view (DTree::iterator cell)
 
void set_name (const std::string &)
 
void set_title_prefix (const std::string &)
 
void load_file (const std::string &notebook_contents)
 
void refresh_highlighting ()
 
void on_help_register ()
 
void set_statusbar_message (const std::string &message="", int line=-1, int col=-1)
 
void select_git_path ()
 Functionality for the diff viewer. More...
 
void compare_to_file ()
 
void compare_git_latest ()
 
void compare_git_choose ()
 
void compare_git_specific ()
 
void compare_git (const std::string &commit_hash)
 
std::string run_git_command (const std::string &args)
 
virtual void set_compute_thread (ComputeThread *compute) override
 Let the notebook know about the ComputeThread so that it can send cells for evaluation. More...
 
virtual void on_interactive_output (const nlohmann::json &msg) override
 
virtual void set_progress (const std::string &msg, int cur_step, int total_steps) override
 
- Public Member Functions inherited from cadabra::DocumentThread
 DocumentThread (GUIBase *)
 
 DocumentThread (const DocumentThread &)=delete
 It is not possible to copy-construct a DocumentThread as it holds on to resources which are not easily copied (such as GUI elements). More...
 
void build_visual_representation ()
 Ensure that the gui has an up-to-date representation of the dtree. More...
 
void queue_action (std::shared_ptr< ActionBase >)
 All changes to the document should be made by submitting ActionBase derived objects to the 'queue_action' function, so that an undo stack can be kept. More...
 
void new_document ()
 Setup an empty new document with a single Python input cell. More...
 
void load_from_string (const std::string &)
 Load a new notebook from a JSON string. More...
 
void undo ()
 One undo step. More...
 
std::pair< DTree::iterator, size_t > find_string (DTree::iterator start_it, size_t start_pos, const std::string &f, bool case_ins) const
 Find string, return match, or a (doc.end(), std::string::npos). More...
 
void set_user_details (const std::string &name, const std::string &email, const std::string &affiliation)
 Set user details which will be sent to the Cadabra log server. More...
 

Public Attributes

TeXEngine engine
 
double scale
 
double display_scale
 
- Public Attributes inherited from cadabra::DocumentThread
friend ActionBase
 
friend ActionAddCell
 
friend ActionPositionCursor
 
friend ActionRemoveCell
 
friend ActionSplitCell
 
friend ActionSetRunStatus
 
friend ActionInsertText
 
friend ActionCompleteText
 
friend ActionEraseText
 
Prefs prefs
 

Protected Member Functions

virtual bool on_key_press_event (GdkEventKey *) override
 
virtual bool on_delete_event (GdkEventAny *) override
 
virtual bool on_configure_event (GdkEventConfigure *cfg) override
 
virtual bool on_unhandled_error (const std::exception &err) override
 
bool handle_outbox_select (GdkEventButton *, DTree::iterator it)
 
void unselect_output_cell ()
 
void on_outbox_copy (Glib::RefPtr< Gtk::Clipboard > refClipboard, DTree::iterator it)
 
- Protected Member Functions inherited from cadabra::DocumentThread
void process_action_queue ()
 Process the action queue. More...
 
bool help_type_and_topic (const std::string &before, const std::string &after, help_t &help_type, std::string &help_topic) const
 

Protected Attributes

DTree::iterator current_cell
 
DTree::iterator selected_cell
 
- Protected Attributes inherited from cadabra::DocumentThread
GUIBasegui
 
ComputeThreadcompute
 
DTree doc
 The actual document tree. More...
 
std::mutex stack_mutex
 The action undo/redo/todo stacks and logic to execute them. More...
 
ActionStack undo_stack
 
ActionStack redo_stack
 
std::queue< std::shared_ptr< ActionBase > > pending_actions
 
bool disable_stacks
 

Private Member Functions

void update_status ()
 
void tex_run_async ()
 
void update_title ()
 
void set_stop_sensitive (bool)
 
void on_file_new ()
 
void on_file_open ()
 
void on_file_close ()
 
void on_file_save ()
 
void on_file_save_as ()
 
void on_file_save_as_jupyter ()
 
void on_file_export_html ()
 
void on_file_export_html_segment ()
 
void on_file_export_latex ()
 
void on_file_export_python ()
 
void on_file_quit ()
 
bool quit_safeguard (bool quit)
 
bool on_first_redraw ()
 
void on_edit_undo ()
 
void on_edit_copy (const Glib::VariantBase &)
 
void on_edit_paste ()
 
void on_edit_insert_above ()
 
void on_edit_insert_below ()
 
void on_edit_delete ()
 
void on_edit_split ()
 
void on_edit_cell_is_latex ()
 
void on_edit_cell_is_python ()
 
void on_ignore_cell_on_import ()
 
void on_edit_find ()
 
void on_view_split ()
 
void on_view_close ()
 
void on_run_cell ()
 
void on_run_runall ()
 
void on_run_runtocursor ()
 
void on_run_stop ()
 
void on_prefs_set_cv (int vis)
 
void on_prefs_font_size (int num)
 
void on_prefs_highlight_syntax (bool on)
 
void on_prefs_microtex (bool on)
 
void on_prefs_choose_colours ()
 
void on_prefs_use_defaults ()
 
void on_tools_options ()
 
void on_tools_clear_cache ()
 
void on_help_about ()
 
void on_help () const
 
void on_kernel_restart ()
 
void on_search_text_changed ()
 Search handling. More...
 
void on_clipboard_get (Gtk::SelectionData &, guint info)
 Clipboard handling. More...
 
void on_clipboard_clear ()
 
std::string save (const std::string &fn) const
 
void process_todo_queue ()
 Todo deque processing logic. More...
 
void refresh_after_tex_engine_run ()
 Refresh the display after a TeX engine run has completed. More...
 
void handle_thread_tex_error ()
 Handle a TeX error which occurred on a threaded TeX run (activated by tex_run_async) and is stored in tex_error_string. More...
 
void on_crash_window_closed (int)
 
bool cell_got_focus (DTree::iterator, int)
 
bool cell_toggle_visibility (DTree::iterator it, int)
 
bool cell_content_insert (const std::string &, int, DTree::iterator, int)
 
bool cell_content_erase (int, int, DTree::iterator, int)
 
bool cell_content_execute (DTree::iterator, int, bool shift_enter_pressed)
 
bool cell_content_changed (DTree::iterator it, int i)
 
bool cell_complete_request (DTree::iterator it, int pos, int i)
 
void interactive_execute ()
 
void dim_output_cells (DTree::iterator it)
 
bool on_tex_error (const std::string &, DTree::iterator)
 
void load_css ()
 
void on_text_scaling_factor_changed (const std::string &key)
 
bool idle_handler ()
 

Private Attributes

Glib::RefPtr< Cadabracdbapp
 
std::vector< Glib::RefPtr< Gio::SimpleAction > > default_actions
 
Glib::Dispatcher dispatcher
 
Glib::RefPtr< Gio::SimpleActionGroup > actiongroup
 
Glib::RefPtr< Gtk::Builder > uimanager
 
Gtk::VBox topbox
 
Gtk::HBox toolbar
 
Gtk::Button tool_open
 
Gtk::Button tool_save
 
Gtk::Button tool_save_as
 
Gtk::Button tool_run
 
Gtk::Button tool_run_to
 
Gtk::Button tool_stop
 
Gtk::Button tool_restart
 
Gtk::HBox supermainbox
 
Gtk::Paned dragbox
 
Gtk::VBox mainbox
 
Gtk::SearchBar searchbar
 
Gtk::HBox search_hbox
 
Gtk::SearchEntry searchentry
 
Gtk::CheckButton search_case_insensitive
 
Gtk::Label search_result
 
Gtk::HBox statusbarbox
 
Console console
 
Gtk::Dialog console_win
 
std::unique_ptr< DiffViewerdiffviewer
 
std::vector< NotebookCanvas * > canvasses
 
int current_canvas
 
Gtk::ProgressBar progressbar
 
Gtk::Spinner kernel_spinner
 
bool kernel_spinner_status
 
Gtk::Label status_label
 
Gtk::Label kernel_label
 
Gtk::Label top_label
 
std::mutex status_mutex
 
std::string status_string
 
std::string kernel_string
 
std::string progress_string
 
double progress_frac
 
int status_line
 
int status_col
 
Glib::Dispatcher dispatch_update_status
 
Glib::Dispatcher dispatch_refresh
 
Glib::Dispatcher dispatch_tex_error
 
std::string name
 
std::string title_prefix
 
bool modified
 
bool read_only
 
std::string clipboard_txt
 
std::string clipboard_cdb
 
bool crash_window_hidden
 
Glib::RefPtr< Gtk::CssProvider > css_provider
 
Glib::RefPtr< Gio::Settings > settings
 
int last_configure_width
 
DTree::iterator follow_cell
 
std::recursive_mutex tex_need_width_mutex
 
std::unique_ptr< std::thread > tex_thread
 
bool tex_running
 
int tex_need_width
 
std::string tex_error_string
 
std::pair< DTree::iterator, size_t > last_find_location
 
std::string last_find_string
 
bool is_configured
 
Glib::RefPtr< Gio::SimpleAction > action_copy
 
Glib::RefPtr< Gio::SimpleAction > action_paste
 
Glib::RefPtr< Gio::SimpleAction > action_fontsize
 
Glib::RefPtr< Gio::SimpleAction > action_highlight
 
Glib::RefPtr< Gio::SimpleAction > action_stop
 
Glib::RefPtr< Gio::SimpleAction > action_register
 
Glib::RefPtr< Gio::SimpleAction > action_console
 
Glib::RefPtr< Gio::SimpleAction > action_microtex
 

Additional Inherited Members

- Protected Types inherited from cadabra::DocumentThread
enum class  help_t { algorithm , property , latex , none }
 Help system. More...
 
typedef std::stack< std::shared_ptr< ActionBase > > ActionStack
 

Constructor & Destructor Documentation

◆ NotebookWindow()

NotebookWindow::NotebookWindow ( Cadabra c,
bool  read_only = false 
)

◆ ~NotebookWindow()

NotebookWindow::~NotebookWindow ( )

Member Function Documentation

◆ add_cell()

void NotebookWindow::add_cell ( const DTree ,
DTree::iterator  ,
bool  visible 
)
overridevirtual

Add a GUI cell corresponding to the document cell at the iterator.

The GUI needs to figure out from the location of this cell in the DTree where to insert the cell in the visual display. If the 'visible' flag is false, hide the cell from view independent of whether its hidden flag is set (this is only used when constructing a document on load time and we do not want to show cells until they have all been added to the document).

Implements cadabra::GUIBase.

◆ cell_complete_request()

bool NotebookWindow::cell_complete_request ( DTree::iterator  it,
int  pos,
int  i 
)
private

◆ cell_content_changed()

bool NotebookWindow::cell_content_changed ( DTree::iterator  it,
int  i 
)
private

◆ cell_content_erase()

bool NotebookWindow::cell_content_erase ( int  start,
int  end,
DTree::iterator  it,
int   
)
private

◆ cell_content_execute()

bool NotebookWindow::cell_content_execute ( DTree::iterator  it,
int  canvas_number,
bool  shift_enter_pressed 
)
private

◆ cell_content_insert()

bool NotebookWindow::cell_content_insert ( const std::string &  content,
int  pos,
DTree::iterator  it,
int   
)
private

◆ cell_got_focus()

bool NotebookWindow::cell_got_focus ( DTree::iterator  it,
int  canvas_number 
)
private

◆ cell_toggle_visibility()

bool NotebookWindow::cell_toggle_visibility ( DTree::iterator  it,
int   
)
private

◆ compare_git()

void NotebookWindow::compare_git ( const std::string &  commit_hash)

◆ compare_git_choose()

void NotebookWindow::compare_git_choose ( )

◆ compare_git_latest()

void NotebookWindow::compare_git_latest ( )

◆ compare_git_specific()

void NotebookWindow::compare_git_specific ( )

◆ compare_to_file()

void NotebookWindow::compare_to_file ( )

◆ dim_output_cells()

void NotebookWindow::dim_output_cells ( DTree::iterator  it)
private

◆ get_cursor_position()

size_t NotebookWindow::get_cursor_position ( const DTree ,
DTree::iterator   
)
overridevirtual

Retrieve the position of the cursor in the current cell.

Implements cadabra::GUIBase.

◆ handle_outbox_select()

bool NotebookWindow::handle_outbox_select ( GdkEventButton *  ,
DTree::iterator  it 
)
protected

◆ handle_thread_tex_error()

void NotebookWindow::handle_thread_tex_error ( )
private

Handle a TeX error which occurred on a threaded TeX run (activated by tex_run_async) and is stored in tex_error_string.

◆ idle_handler()

bool NotebookWindow::idle_handler ( )
private

◆ interactive_execute()

void NotebookWindow::interactive_execute ( )
private

◆ load_css()

void NotebookWindow::load_css ( )
private

◆ load_file()

void NotebookWindow::load_file ( const std::string &  notebook_contents)

◆ on_clipboard_clear()

void NotebookWindow::on_clipboard_clear ( )
private

◆ on_clipboard_get()

void NotebookWindow::on_clipboard_get ( Gtk::SelectionData &  selection_data,
guint  info 
)
private

Clipboard handling.

◆ on_configure_event()

bool NotebookWindow::on_configure_event ( GdkEventConfigure *  cfg)
overrideprotectedvirtual

◆ on_connect()

void NotebookWindow::on_connect ( )
overridevirtual

Network status is propagated from the ComputeThread to the GUI using the following methods.

These get called on the compute thread (as opposed to the functions above, which get called on the gui thread).

Implements cadabra::GUIBase.

◆ on_crash_window_closed()

void NotebookWindow::on_crash_window_closed ( int  )
private

◆ on_delete_event()

bool NotebookWindow::on_delete_event ( GdkEventAny *  event)
overrideprotectedvirtual

◆ on_disconnect()

void NotebookWindow::on_disconnect ( const std::string &  reason)
overridevirtual

Implements cadabra::GUIBase.

◆ on_edit_cell_is_latex()

void NotebookWindow::on_edit_cell_is_latex ( )
private

◆ on_edit_cell_is_python()

void NotebookWindow::on_edit_cell_is_python ( )
private

◆ on_edit_copy()

void NotebookWindow::on_edit_copy ( const Glib::VariantBase &  )
private

◆ on_edit_delete()

void NotebookWindow::on_edit_delete ( )
private

◆ on_edit_find()

void NotebookWindow::on_edit_find ( )
private

◆ on_edit_insert_above()

void NotebookWindow::on_edit_insert_above ( )
private

◆ on_edit_insert_below()

void NotebookWindow::on_edit_insert_below ( )
private

◆ on_edit_paste()

void NotebookWindow::on_edit_paste ( )
private

◆ on_edit_split()

void NotebookWindow::on_edit_split ( )
private

◆ on_edit_undo()

void NotebookWindow::on_edit_undo ( )
private

◆ on_file_close()

void NotebookWindow::on_file_close ( )
private

◆ on_file_export_html()

void NotebookWindow::on_file_export_html ( )
private

◆ on_file_export_html_segment()

void NotebookWindow::on_file_export_html_segment ( )
private

◆ on_file_export_latex()

void NotebookWindow::on_file_export_latex ( )
private

◆ on_file_export_python()

void NotebookWindow::on_file_export_python ( )
private

◆ on_file_new()

void NotebookWindow::on_file_new ( )
private

◆ on_file_open()

void NotebookWindow::on_file_open ( )
private

◆ on_file_quit()

void NotebookWindow::on_file_quit ( )
private

◆ on_file_save()

void NotebookWindow::on_file_save ( )
private

◆ on_file_save_as()

void NotebookWindow::on_file_save_as ( )
private

◆ on_file_save_as_jupyter()

void NotebookWindow::on_file_save_as_jupyter ( )
private

◆ on_first_redraw()

bool NotebookWindow::on_first_redraw ( )
private

◆ on_help()

void NotebookWindow::on_help ( ) const
private

◆ on_help_about()

void NotebookWindow::on_help_about ( )
private

◆ on_help_register()

void NotebookWindow::on_help_register ( )

◆ on_ignore_cell_on_import()

void NotebookWindow::on_ignore_cell_on_import ( )
private

◆ on_interactive_output()

void NotebookWindow::on_interactive_output ( const nlohmann::json &  msg)
overridevirtual

Reimplemented from cadabra::DocumentThread.

◆ on_kernel_restart()

void NotebookWindow::on_kernel_restart ( )
private

◆ on_kernel_runstatus()

void NotebookWindow::on_kernel_runstatus ( bool  running)
overridevirtual

Implements cadabra::GUIBase.

◆ on_key_press_event()

bool NotebookWindow::on_key_press_event ( GdkEventKey *  event)
overrideprotectedvirtual

◆ on_network_error()

void NotebookWindow::on_network_error ( )
overridevirtual

Implements cadabra::GUIBase.

◆ on_outbox_copy()

void NotebookWindow::on_outbox_copy ( Glib::RefPtr< Gtk::Clipboard >  refClipboard,
DTree::iterator  it 
)
protected

◆ on_prefs_choose_colours()

void NotebookWindow::on_prefs_choose_colours ( )
private

◆ on_prefs_font_size()

void NotebookWindow::on_prefs_font_size ( int  num)
private

◆ on_prefs_highlight_syntax()

void NotebookWindow::on_prefs_highlight_syntax ( bool  on)
private

◆ on_prefs_microtex()

void NotebookWindow::on_prefs_microtex ( bool  on)
private

◆ on_prefs_set_cv()

void NotebookWindow::on_prefs_set_cv ( int  vis)
private

◆ on_prefs_use_defaults()

void NotebookWindow::on_prefs_use_defaults ( )
private

◆ on_run_cell()

void NotebookWindow::on_run_cell ( )
private

◆ on_run_runall()

void NotebookWindow::on_run_runall ( )
private

◆ on_run_runtocursor()

void NotebookWindow::on_run_runtocursor ( )
private

◆ on_run_stop()

void NotebookWindow::on_run_stop ( )
private

◆ on_scroll()

bool NotebookWindow::on_scroll ( GdkEventScroll *  )

◆ on_scroll_size_allocate()

void NotebookWindow::on_scroll_size_allocate ( Gtk::Allocation &  )

◆ on_search_text_changed()

void NotebookWindow::on_search_text_changed ( )
private

Search handling.

◆ on_tex_error()

bool NotebookWindow::on_tex_error ( const std::string &  str,
DTree::iterator   
)
private

◆ on_text_scaling_factor_changed()

void NotebookWindow::on_text_scaling_factor_changed ( const std::string &  key)
private

◆ on_tools_clear_cache()

void NotebookWindow::on_tools_clear_cache ( )
private

◆ on_tools_options()

void NotebookWindow::on_tools_options ( )
private

◆ on_unhandled_error()

bool NotebookWindow::on_unhandled_error ( const std::exception &  err)
overrideprotectedvirtual

Reimplemented from cadabra::DocumentThread.

◆ on_view_close()

void NotebookWindow::on_view_close ( )
private

◆ on_view_split()

void NotebookWindow::on_view_split ( )
private

◆ on_vscroll_changed()

bool NotebookWindow::on_vscroll_changed ( Gtk::ScrollType  ,
double   
)

◆ position_cursor()

void NotebookWindow::position_cursor ( const DTree ,
DTree::iterator  ,
int   
)
overridevirtual

Position the cursor in the current canvas in the widget corresponding to the indicated cell.

Implements cadabra::GUIBase.

◆ process_data()

void NotebookWindow::process_data ( )
overridevirtual

When the ComputeThread needs to modify the document, it stores an ActionBase object on the stack (see the DocumenThread class) and then wakes up the GUI thread signalling it to process this action.

The following member should wake up the GUI thread and make it enter the processing part.

Implements cadabra::GUIBase.

◆ process_todo_queue()

void NotebookWindow::process_todo_queue ( )
private

Todo deque processing logic.

This gets called by the dispatcher, but it is also allowed to call this from within NotebookWindow itself. The important thing is that it is run on the GUI thread.

◆ quit_safeguard()

bool NotebookWindow::quit_safeguard ( bool  quit)
private

◆ refresh_after_tex_engine_run()

void NotebookWindow::refresh_after_tex_engine_run ( )
private

Refresh the display after a TeX engine run has completed.

The TeX engine is run on a different thread so as to not block the UI, and on completion triggers dispatcher_refresh, which calls this function on the main thread.

◆ refresh_highlighting()

void NotebookWindow::refresh_highlighting ( )

◆ remove_all_cells()

void NotebookWindow::remove_all_cells ( )
overridevirtual

Remove all GUI cells from the display (used as a quick way to clear all before loading a new document).

Implements cadabra::GUIBase.

◆ remove_cell()

void NotebookWindow::remove_cell ( const DTree ,
DTree::iterator   
)
overridevirtual

Remove a single cell together with all its child cells.

Some toolkits (e.g. Gtk) will take care of that entire child tree removal automatically, in which case the only thing that needs done for the child cells is to remove any reference to their VisualCells.

Implements cadabra::GUIBase.

◆ run_git_command()

std::string NotebookWindow::run_git_command ( const std::string &  args)

◆ save()

std::string NotebookWindow::save ( const std::string &  fn) const
private

◆ scroll_cell_into_view()

void NotebookWindow::scroll_cell_into_view ( DTree::iterator  cell)

◆ scroll_current_cell_into_view()

void NotebookWindow::scroll_current_cell_into_view ( )

◆ select_git_path()

void NotebookWindow::select_git_path ( )

Functionality for the diff viewer.

◆ select_range()

void NotebookWindow::select_range ( const DTree ,
DTree::iterator  it,
int  start,
int  len 
)

◆ set_compute_thread()

void NotebookWindow::set_compute_thread ( ComputeThread cl)
overridevirtual

Let the notebook know about the ComputeThread so that it can send cells for evaluation.

Notebook does NOT own this pointer.

Reimplemented from cadabra::DocumentThread.

◆ set_name()

void NotebookWindow::set_name ( const std::string &  n)

◆ set_progress()

void NotebookWindow::set_progress ( const std::string &  msg,
int  cur_step,
int  total_steps 
)
overridevirtual

Reimplemented from cadabra::DocumentThread.

◆ set_statusbar_message()

void NotebookWindow::set_statusbar_message ( const std::string &  message = "",
int  line = -1,
int  col = -1 
)

◆ set_stop_sensitive()

void NotebookWindow::set_stop_sensitive ( bool  s)
private

◆ set_title_prefix()

void NotebookWindow::set_title_prefix ( const std::string &  pf)

◆ tex_run_async()

void NotebookWindow::tex_run_async ( )
private

◆ unselect_output_cell()

void NotebookWindow::unselect_output_cell ( )
protected

◆ update_cell()

void NotebookWindow::update_cell ( const DTree ,
DTree::iterator   
)
overridevirtual

The basic manipulations that a GUI needs to implement are adding, removing and updating (refreshing the display of) a cell.

The code in DocumentThread will call these to make the GUI update its display. Called on the document thread.

Implements cadabra::GUIBase.

◆ update_status()

void NotebookWindow::update_status ( )
private

◆ update_title()

void NotebookWindow::update_title ( )
private

Member Data Documentation

◆ action_console

Glib::RefPtr<Gio::SimpleAction> cadabra::NotebookWindow::action_console
private

◆ action_copy

Glib::RefPtr<Gio::SimpleAction> cadabra::NotebookWindow::action_copy
private

◆ action_fontsize

Glib::RefPtr<Gio::SimpleAction> cadabra::NotebookWindow::action_fontsize
private

◆ action_highlight

Glib::RefPtr<Gio::SimpleAction> cadabra::NotebookWindow::action_highlight
private

◆ action_microtex

Glib::RefPtr<Gio::SimpleAction> cadabra::NotebookWindow::action_microtex
private

◆ action_paste

Glib::RefPtr<Gio::SimpleAction> cadabra::NotebookWindow::action_paste
private

◆ action_register

Glib::RefPtr<Gio::SimpleAction> cadabra::NotebookWindow::action_register
private

◆ action_stop

Glib::RefPtr<Gio::SimpleAction> cadabra::NotebookWindow::action_stop
private

◆ actiongroup

Glib::RefPtr<Gio::SimpleActionGroup> cadabra::NotebookWindow::actiongroup
private

◆ canvasses

std::vector<NotebookCanvas *> cadabra::NotebookWindow::canvasses
private

◆ cdbapp

Glib::RefPtr<Cadabra> cadabra::NotebookWindow::cdbapp
private

◆ clipboard_cdb

std::string cadabra::NotebookWindow::clipboard_cdb
private

◆ clipboard_txt

std::string cadabra::NotebookWindow::clipboard_txt
private

◆ console

Console cadabra::NotebookWindow::console
private

◆ console_win

Gtk::Dialog cadabra::NotebookWindow::console_win
private

◆ crash_window_hidden

bool cadabra::NotebookWindow::crash_window_hidden
private

◆ css_provider

Glib::RefPtr<Gtk::CssProvider> cadabra::NotebookWindow::css_provider
private

◆ current_canvas

int cadabra::NotebookWindow::current_canvas
private

◆ current_cell

DTree::iterator cadabra::NotebookWindow::current_cell
protected

◆ default_actions

std::vector<Glib::RefPtr<Gio::SimpleAction> > cadabra::NotebookWindow::default_actions
private

◆ diffviewer

std::unique_ptr<DiffViewer> cadabra::NotebookWindow::diffviewer
private

◆ dispatch_refresh

Glib::Dispatcher cadabra::NotebookWindow::dispatch_refresh
private

◆ dispatch_tex_error

Glib::Dispatcher cadabra::NotebookWindow::dispatch_tex_error
private

◆ dispatch_update_status

Glib::Dispatcher cadabra::NotebookWindow::dispatch_update_status
private

◆ dispatcher

Glib::Dispatcher cadabra::NotebookWindow::dispatcher
private

◆ display_scale

double cadabra::NotebookWindow::display_scale

◆ dragbox

Gtk::Paned cadabra::NotebookWindow::dragbox
private

◆ engine

TeXEngine cadabra::NotebookWindow::engine

◆ follow_cell

DTree::iterator cadabra::NotebookWindow::follow_cell
private

◆ is_configured

bool cadabra::NotebookWindow::is_configured
private

◆ kernel_label

Gtk::Label cadabra::NotebookWindow::kernel_label
private

◆ kernel_spinner

Gtk::Spinner cadabra::NotebookWindow::kernel_spinner
private

◆ kernel_spinner_status

bool cadabra::NotebookWindow::kernel_spinner_status
private

◆ kernel_string

std::string cadabra::NotebookWindow::kernel_string
private

◆ last_configure_width

int cadabra::NotebookWindow::last_configure_width
private

◆ last_find_location

std::pair<DTree::iterator, size_t> cadabra::NotebookWindow::last_find_location
private

◆ last_find_string

std::string cadabra::NotebookWindow::last_find_string
private

◆ mainbox

Gtk::VBox cadabra::NotebookWindow::mainbox
private

◆ modified

bool cadabra::NotebookWindow::modified
private

◆ name

std::string cadabra::NotebookWindow::name
private

◆ progress_frac

double cadabra::NotebookWindow::progress_frac
private

◆ progress_string

std::string cadabra::NotebookWindow::progress_string
private

◆ progressbar

Gtk::ProgressBar cadabra::NotebookWindow::progressbar
private

◆ read_only

bool cadabra::NotebookWindow::read_only
private

◆ scale

double cadabra::NotebookWindow::scale

◆ search_case_insensitive

Gtk::CheckButton cadabra::NotebookWindow::search_case_insensitive
private

◆ search_hbox

Gtk::HBox cadabra::NotebookWindow::search_hbox
private

◆ search_result

Gtk::Label cadabra::NotebookWindow::search_result
private

◆ searchbar

Gtk::SearchBar cadabra::NotebookWindow::searchbar
private

◆ searchentry

Gtk::SearchEntry cadabra::NotebookWindow::searchentry
private

◆ selected_cell

DTree::iterator cadabra::NotebookWindow::selected_cell
protected

◆ settings

Glib::RefPtr<Gio::Settings> cadabra::NotebookWindow::settings
private

◆ status_col

int cadabra::NotebookWindow::status_col
private

◆ status_label

Gtk::Label cadabra::NotebookWindow::status_label
private

◆ status_line

int cadabra::NotebookWindow::status_line
private

◆ status_mutex

std::mutex cadabra::NotebookWindow::status_mutex
private

◆ status_string

std::string cadabra::NotebookWindow::status_string
private

◆ statusbarbox

Gtk::HBox cadabra::NotebookWindow::statusbarbox
private

◆ supermainbox

Gtk::HBox cadabra::NotebookWindow::supermainbox
private

◆ tex_error_string

std::string cadabra::NotebookWindow::tex_error_string
private

◆ tex_need_width

int cadabra::NotebookWindow::tex_need_width
private

◆ tex_need_width_mutex

std::recursive_mutex cadabra::NotebookWindow::tex_need_width_mutex
private

◆ tex_running

bool cadabra::NotebookWindow::tex_running
private

◆ tex_thread

std::unique_ptr<std::thread> cadabra::NotebookWindow::tex_thread
private

◆ title_prefix

std::string cadabra::NotebookWindow::title_prefix
private

◆ tool_open

Gtk::Button cadabra::NotebookWindow::tool_open
private

◆ tool_restart

Gtk::Button cadabra::NotebookWindow::tool_restart
private

◆ tool_run

Gtk::Button cadabra::NotebookWindow::tool_run
private

◆ tool_run_to

Gtk::Button cadabra::NotebookWindow::tool_run_to
private

◆ tool_save

Gtk::Button cadabra::NotebookWindow::tool_save
private

◆ tool_save_as

Gtk::Button cadabra::NotebookWindow::tool_save_as
private

◆ tool_stop

Gtk::Button cadabra::NotebookWindow::tool_stop
private

◆ toolbar

Gtk::HBox cadabra::NotebookWindow::toolbar
private

◆ top_label

Gtk::Label cadabra::NotebookWindow::top_label
private

◆ topbox

Gtk::VBox cadabra::NotebookWindow::topbox
private

◆ uimanager

Glib::RefPtr<Gtk::Builder> cadabra::NotebookWindow::uimanager
private

The documentation for this class was generated from the following files: