diff libinterp/corefcn/interpreter.h @ 23721:b2d55b52ee51

new class to manage help system and associated variables * help.h, help.cc (help_system): New class. Handle built_in_docstrings_file, doc_cache_file, info_file, info_program, makeinfo_program, suppress_verbose_help_message, and texi_macros_file variables. Move most static and global functions inside class. Change all uses. * interpreter.h, interpreter.cc (interpreter::m_help_system): New member variable. (interpreter::get_help_system): New function. * interpreter-private.h, interpreter-private.cc (__get_help_system__): New function. * defaults.h, defaults.cc (Vbuilt_in_docstrings_file, VEXEC_PATH, VIMAGE_PATH): Delete. (config::prepend_octave_home, config::prepend_octave_exec_home): Define here instead of as static functions in defaults.cc. (init_defaults): Now static. (set_default_info_file, set_default_info_prog, set_default_texi_macros_file, set_default_doc_cache_file, set_built_in_docstrings_file, install_defaults): Delete. * toplev.cc (F__octave_config_info__): Don't include "infofile" in the struct. * octave.cc (application::init): Don't call install_defaults. * documentation-dock-widget.h, documentation-dock-widget.cc (documentation_dock_widget::load_info_file): New slot. * main-window.cc (main_window::main_window): Connect m_interpreter::octave_ready_signal to doc_browser_window::load_info_file. * octave-gui.cc (gui_application::gui_application): Don't call install_defaults here. * webinfo.h, webinfo.cc (webinfo::load_info_file): New function to set file for info browser after interpreter is ready instead of doing that in the webinfo constructor.
author John W. Eaton <jwe@octave.org>
date Thu, 29 Jun 2017 20:16:54 -0400
parents 69a111259a2c
children ab8831d346c1
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.h	Thu Jun 29 16:44:47 2017 -0400
+++ b/libinterp/corefcn/interpreter.h	Thu Jun 29 20:16:54 2017 -0400
@@ -32,6 +32,7 @@
 
 #include "dynamic-ld.h"
 #include "environment.h"
+#include "help.h"
 #include "load-path.h"
 #include "ov-classdef.h"
 #include "pt-eval.h"
@@ -143,6 +144,11 @@
       return m_environment;
     }
 
+    help_system& get_help_system (void)
+    {
+      return m_help_system;
+    }
+
     dynamic_loader& get_dynamic_loader (void)
     {
       return m_dynamic_loader;
@@ -208,6 +214,8 @@
 
     environment m_environment;
 
+    help_system m_help_system;
+
     dynamic_loader m_dynamic_loader;
 
     load_path m_load_path;