Mercurial > octave
annotate libinterp/corefcn/help.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 | 092078913d54 |
children | 5111b1b5034d |
rev | line source |
---|---|
1 | 1 /* |
2 | |
23219
3ac9f9ecfae5
maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents:
23083
diff
changeset
|
3 Copyright (C) 1993-2017 John W. Eaton |
1 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
9 the Free Software Foundation; either version 3 of the License, or |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
10 (at your option) any later version. |
1 | 11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 GNU General Public License for more details. |
1 | 16 |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
1 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
23 #if ! defined (octave_help_h) |
383 | 24 #define octave_help_h 1 |
1 | 25 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
27 |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
28 #include <iosfwd> |
1755 | 29 #include <string> |
30 | |
31 class string_vector; | |
32 | |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
33 class interpreter; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
34 class octave_value; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
35 class octave_value_list; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
36 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
37 namespace octave |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
38 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
39 class help_system |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
40 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
41 public: |
1 | 42 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
43 help_system (interpreter& interp) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
44 : m_interpreter (interp), |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
45 m_built_in_docstrings_file (init_built_in_docstrings_file ()), |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
46 m_doc_cache_file (init_doc_cache_file ()), |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
47 m_info_file (init_info_file ()), |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
48 m_info_program (init_info_program ()), |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
49 m_makeinfo_program ("makeinfo"), |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
50 m_suppress_verbose_help_message (false), |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
51 m_texi_macros_file (init_texi_macros_file ()) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
52 { } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
53 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
54 octave_value |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
55 built_in_docstrings_file (const octave_value_list& args, int nargout); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
56 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
57 std::string |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
58 built_in_docstrings_file (void) const { return m_built_in_docstrings_file; } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
59 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
60 std::string built_in_docstrings_file (const std::string& file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
61 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
62 return set (m_built_in_docstrings_file, file); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
63 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
64 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
65 octave_value doc_cache_file (const octave_value_list& args, int nargout); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
66 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
67 std::string doc_cache_file (void) const { return m_doc_cache_file; } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
68 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
69 std::string doc_cache_file (const std::string& file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
70 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
71 return set (m_doc_cache_file, file); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
72 } |
6243 | 73 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
74 octave_value info_file (const octave_value_list& args, int nargout); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
75 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
76 std::string info_file (void) const { return m_info_file; } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
77 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
78 std::string info_file (const std::string& file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
79 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
80 return set (m_info_file, file); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
81 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
82 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
83 octave_value info_program (const octave_value_list& args, int nargout); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
84 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
85 std::string info_program (void) const { return m_info_program; } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
86 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
87 std::string info_program (const std::string& file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
88 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
89 return set (m_info_program, file); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
90 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
91 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
92 octave_value makeinfo_program (const octave_value_list& args, int nargout); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
93 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
94 std::string makeinfo_program (void) const { return m_makeinfo_program; } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
95 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
96 std::string makeinfo_program (const std::string& file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
97 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
98 return set (m_makeinfo_program, file); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
99 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
100 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
101 octave_value |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
102 suppress_verbose_help_message (const octave_value_list& args, int nargout); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
103 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
104 bool suppress_verbose_help_message (void) const |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
105 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
106 return m_suppress_verbose_help_message; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
107 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
108 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
109 bool suppress_verbose_help_message (bool flag) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
110 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
111 return set (m_suppress_verbose_help_message, flag); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
112 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
113 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
114 octave_value texi_macros_file (const octave_value_list& args, int nargout); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
115 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
116 std::string texi_macros_file (void) const { return m_texi_macros_file; } |
8861 | 117 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
118 std::string texi_macros_file (const std::string& file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
119 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
120 return set (m_texi_macros_file, file); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
121 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
122 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
123 std::string raw_help (const std::string&, bool&) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
124 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
125 std::string which (const std::string& name) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
126 std::string which (const std::string& name, std::string& type) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
127 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
128 string_vector make_name_list (void) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
129 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
130 void get_help_text (const std::string& name, std::string& text, |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
131 std::string& format) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
132 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
133 void get_help_text_from_file (const std::string& fname, std::string& text, |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
134 std::string& format) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
135 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
136 private: |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
137 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
138 interpreter& m_interpreter; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
139 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
140 // Name of the file containing doc strings for built-in functions. |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
141 // (--built-in-docstrings-file file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
142 std::string m_built_in_docstrings_file; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
143 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
144 // Name of the doc cache file specified on the command line. |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
145 // (--doc-cache-file file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
146 std::string m_doc_cache_file; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
147 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
148 // Name of the info file specified on command line. |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
149 // (--info-file file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
150 std::string m_info_file; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
151 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
152 // Name of the info reader we'd like to use. |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
153 // (--info-program program) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
154 std::string m_info_program; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
155 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
156 // Name of the makeinfo program to run. |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
157 std::string m_makeinfo_program; |
14614
4e9dc46d4125
handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
158 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
159 // If TRUE, don't print additional help message in help and usage |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
160 // functions. |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
161 bool m_suppress_verbose_help_message; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
162 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
163 // Name of the file containing local Texinfo macros that are prepended |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
164 // to doc strings before processing. |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
165 // (--texi-macros-file) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
166 std::string m_texi_macros_file; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
167 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
168 static std::string init_built_in_docstrings_file (void); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
169 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
170 static std::string init_doc_cache_file (void); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
171 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
172 static std::string init_info_file (void); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
173 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
174 static std::string init_info_program (void); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
175 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
176 static std::string init_texi_macros_file (void); |
2202 | 177 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
178 template <typename T> |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
179 T set (T& var, const T& new_val) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
180 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
181 T old_val = var; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
182 var = new_val; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
183 return old_val; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
184 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
185 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
186 string_vector local_functions (void) const; |
2202 | 187 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
188 bool raw_help_from_symbol_table (const std::string& nm, |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
189 std::string& h, std::string& w, |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
190 bool& symbol_found) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
191 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
192 bool raw_help_from_file (const std::string& nm, |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
193 std::string& h, std::string& file, |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
194 bool& symbol_found) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
195 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
196 bool raw_help_from_docstrings_file (const std::string& nm, std::string& h, |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
197 bool& symbol_found) const; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
198 }; |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
199 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
200 extern string_vector make_name_list (void); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
201 } |
7082 | 202 |
1 | 203 #endif |