Mercurial > octave
annotate libinterp/corefcn/event-manager.h @ 29282:0280fd549502
make debugging possible in server mode
* event-manager.h, event-manager.cc (event_manager::gui_event_queue):
Use a stack of event_queue objects.
* pt-eval.h, pt-eval.cc (debugger::server_loop): New function.
(debugger::repl): Handle case of execution in server mode.
(tree_evaluator::set_parser): Allow setting m_parser.
(tree_evaluator::server_mode): Allow setting server_mode.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Jan 2021 01:30:18 -0500 |
parents | 11343ca3c125 |
children | 8784f20b9b8c |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
3 // Copyright (C) 2011-2020 The Octave Project Developers |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
13501 | 25 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
26 #if ! defined (octave_event_manager_h) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
27 #define octave_event_manager_h 1 |
13501 | 28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21158
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21158
diff
changeset
|
30 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27285
diff
changeset
|
31 #include <functional> |
23442
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23433
diff
changeset
|
32 #include <list> |
27262
d67f369b3074
use shared_ptr to manage octave_link_events object
John W. Eaton <jwe@octave.org>
parents:
27261
diff
changeset
|
33 #include <memory> |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
34 #include <stack> |
15155
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15080
diff
changeset
|
35 #include <string> |
13501 | 36 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
37 #include "oct-mutex.h" |
25742
d3c6de326bae
close/reload editor tab when file is (re)moved in gui terminal (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25653
diff
changeset
|
38 #include "octave.h" |
16420
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16419
diff
changeset
|
39 #include "event-queue.h" |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25742
diff
changeset
|
40 #include "uint8NDArray.h" |
16377
8430ea8c1594
open editor tab and insert marker for debugging with gui
John W. Eaton <jwe@octave.org>
parents:
16350
diff
changeset
|
41 |
24641
7d177be54c37
pass variable value to variable editor in addition to variable name
John W. Eaton <jwe@octave.org>
parents:
24631
diff
changeset
|
42 class octave_value; |
16431
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
43 class string_vector; |
24645
f61502510d08
restore ability to select variables for editing from workspace widget
John W. Eaton <jwe@octave.org>
parents:
24641
diff
changeset
|
44 |
f61502510d08
restore ability to select variables for editing from workspace widget
John W. Eaton <jwe@octave.org>
parents:
24641
diff
changeset
|
45 namespace octave |
f61502510d08
restore ability to select variables for editing from workspace widget
John W. Eaton <jwe@octave.org>
parents:
24641
diff
changeset
|
46 { |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27285
diff
changeset
|
47 typedef std::function<void (void)> fcn_callback; |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
48 typedef std::function<void (interpreter&)> meth_callback; |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27285
diff
changeset
|
49 |
26117
a6df420457ac
use symbol_info_list instead of symbol_scope to pass workspace info to gui
John W. Eaton <jwe@octave.org>
parents:
25948
diff
changeset
|
50 class symbol_info_list; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
51 |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
52 // The methods in this class provide a way to pass signals to the GUI |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
53 // thread. A GUI that wishes to act on these events should derive |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
54 // from this class and perform actions in a thread-safe way. In |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
55 // Octave's Qt-based GUI, for example, these functions are all |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
56 // implemented as wrappers around Qt signals that trigger actions in |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
57 // the GUI. The Qt signal/slot mechanism ensures that the actions are |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
58 // properly queued for execution when the objects corresponding to the |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
59 // signal and slot belong to different threads. |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
60 // |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
61 // These functions should not be called directly. Instead all |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
62 // requests from the interpreter for GUI actions should be done |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
63 // through the event_manager class. That class checks to ensure that |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
64 // the GUI is connected and enabled before calling these virtual |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
65 // functions. |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
66 |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
67 // FIXME: it would be nice if instead of requiring the GUI to derive |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
68 // from this class, it could subscribe to individual events, possibly |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
69 // multiple times. In that way, it would be more flexible and |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
70 // decentralized, similar to the Qt signal/slot connection mechanism |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
71 // and would allow the GUI to connect multiple signals to a single |
27971
ec769a7ab9fb
fix more spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
72 // action or multiple actions to a single signal. |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
73 |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
74 // FIXME: audit this list of functions and determine whether they are |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
75 // all necessary and whether there might be better names for them. |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
76 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
77 class interpreter_events |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
78 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
79 public: |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
80 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
81 interpreter_events (void) = default; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
82 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
83 interpreter_events (const interpreter_events&) = default; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
84 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
85 interpreter_events& operator = (const interpreter_events&) = default; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
86 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
87 virtual ~interpreter_events (void) = default; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
88 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
89 // Dialogs. |
27311
0040b7668518
update load path dialog when path is modified via console
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27302
diff
changeset
|
90 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
91 typedef std::list<std::pair<std::string, std::string>> filter_list; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
92 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
93 virtual std::list<std::string> |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
94 file_dialog (const filter_list& /*filter*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
95 const std::string& /*title*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
96 const std::string& /*filename*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
97 const std::string& /*dirname*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
98 const std::string& /*multimode*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
99 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
100 return std::list<std::string> (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
101 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
102 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
103 virtual std::list<std::string> |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
104 input_dialog (const std::list<std::string>& /*prompt*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
105 const std::string& /*title*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
106 const std::list<float>& /*nr*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
107 const std::list<float>& /*nc*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
108 const std::list<std::string>& /*defaults*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
109 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
110 return std::list<std::string> (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
111 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
112 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
113 virtual std::pair<std::list<int>, int> |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
114 list_dialog (const std::list<std::string>& /*list*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
115 const std::string& /*mode*/, int /*width*/, int /*height*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
116 const std::list<int>& /*initial_value*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
117 const std::string& /*name*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
118 const std::list<std::string>& /*prompt*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
119 const std::string& /*ok_string*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
120 const std::string& /*cancel_string*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
121 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
122 return std::pair<std::list<int>, int> (); |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
123 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
124 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
125 virtual std::string |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
126 question_dialog (const std::string& /*msg*/, const std::string& /*title*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
127 const std::string& /*btn1*/, const std::string& /*btn2*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
128 const std::string& /*btn3*/, const std::string& /*btndef*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
129 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
130 return ""; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
131 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
132 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
133 virtual void update_path_dialog (void) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
134 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
135 virtual void show_preferences (void) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
136 |
27602
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
137 virtual void apply_preferences (void) { } |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
138 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
139 virtual void show_doc (const std::string& /*file*/) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
140 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
141 virtual bool edit_file (const std::string& /*file*/) { return false; } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
142 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
143 virtual void |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
144 edit_variable (const std::string& /*name*/, const octave_value& /*val*/) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
145 { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
146 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
147 // Other requests for user interaction, usually some kind of |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
148 // confirmation before another action. Could these be reformulated |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
149 // using the question_dialog action? |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
150 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
151 virtual bool confirm_shutdown (void) { return false; } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
152 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
153 virtual bool prompt_new_edit_file (const std::string& /*file*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
154 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
155 return false; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
156 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
157 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
158 virtual int |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
159 debug_cd_or_addpath_error (const std::string& /*file*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
160 const std::string& /*dir*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
161 bool /*addpath_option*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
162 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
163 return -1; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
164 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
165 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
166 // Requests for information normally stored in the GUI. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
167 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
168 virtual uint8NDArray get_named_icon (const std::string& /*icon_name*/) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
169 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
170 return uint8NDArray (); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
171 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
172 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
173 virtual std::string gui_preference (const std::string& /*key*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
174 const std::string& /*value*/) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
175 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
176 return ""; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
177 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
178 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
179 // Requests for GUI action that do not require user interaction. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
180 // These are different from other notifications in that they are not |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
181 // associated with changes in the interpreter state (like a change |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
182 // in the current working directory or command history). |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
183 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
184 virtual bool copy_image_to_clipboard (const std::string& /*file*/) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
185 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
186 return false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
187 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
188 |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
189 virtual void focus_window (const std::string /*win_name*/) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
190 { } |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
191 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
192 virtual void |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
193 execute_command_in_terminal (const std::string& /*command*/) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
194 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
195 virtual void register_doc (const std::string& /*file*/) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
196 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
197 virtual void unregister_doc (const std::string& /*file*/) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
198 |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
199 virtual void interpreter_output (const std::string& /*msg*/) { } |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
200 |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
201 |
29057
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
202 virtual void gui_status_update (const std::string& /*feature*/, |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
203 const std::string& /*status*/) { } |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
204 |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
205 virtual void update_gui_lexer (void) { } |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
206 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
207 // Notifications of events in the interpreter that a GUI will |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
208 // normally wish to respond to. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
209 |
27409
a0d49e55acae
rename change_directory to directory_changed in event manager
John W. Eaton <jwe@octave.org>
parents:
27392
diff
changeset
|
210 virtual void directory_changed (const std::string& /*dir*/) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
211 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
212 virtual void |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
213 file_remove (const std::string& /*old_nm*/, const std::string& /*new_nm*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
214 { } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
215 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
216 virtual void file_renamed (bool) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
217 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
218 virtual void |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
219 set_workspace (bool /*top_level*/, bool /*debug*/, |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
220 const symbol_info_list& /*syminfo*/, |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
221 bool /*update_variable_editor*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
222 { } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
223 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
224 virtual void clear_workspace (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
225 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
226 virtual void set_history (const string_vector& /*hist*/) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
227 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
228 virtual void append_history (const std::string& /*hist_entry*/) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
229 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
230 virtual void clear_history (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
231 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
232 virtual void pre_input_event (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
233 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
234 virtual void post_input_event (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
235 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
236 virtual void |
27392
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
237 enter_debugger_event (const std::string& /*fcn_name*/, |
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
238 const std::string& /*fcn_file_name*/, |
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
239 int /*line*/) |
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
240 { } |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
241 |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
242 virtual void |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
243 execute_in_debugger_event (const std::string& /*file*/, int /*line*/) { } |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
244 |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
245 virtual void exit_debugger_event (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
246 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
247 virtual void |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
248 update_breakpoint (bool /*insert*/, const std::string& /*file*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
249 int /*line*/, const std::string& /*cond*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
250 { } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
251 }; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
252 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
253 //! Provides threadsafe access to octave. |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
254 //! |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
255 //! This class provides thread-safe communication between the |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
256 //! interpreter and a GUI. |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
257 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
258 class event_manager |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
259 { |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
260 public: |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
261 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
262 OCTINTERP_API event_manager (interpreter& interp); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
263 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
264 // No copying! |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
265 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
266 event_manager (const event_manager&) = delete; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
267 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
268 event_manager& |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
269 operator = (const event_manager&) = delete; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
270 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
271 virtual ~event_manager (void); |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
272 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
273 // OBJ should be an object of a class that is derived from the base |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
274 // class interpreter_events, or nullptr to disconnect and delete the |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
275 // previous link. |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
276 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
277 OCTINTERP_API void |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
278 connect_link (const std::shared_ptr<interpreter_events>& obj); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
279 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
280 OCTINTERP_API bool enable (void); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
281 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
282 bool disable (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
283 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
284 bool retval = link_enabled; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
285 link_enabled = false; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
286 return retval; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
287 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
288 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
289 bool enabled (void) const |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
290 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
291 return link_enabled; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
292 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
293 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
294 // If disable is TRUE, then no additional events will be processed |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
295 // other than exit. |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
296 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
297 OCTINTERP_API void process_events (bool disable = false); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
298 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
299 OCTINTERP_API void discard_events (void); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
300 |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
301 // The post_event and post_exception functions provide a thread-safe |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
302 // way for the GUI to queue interpreter functions for execution. |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
303 // The queued functions are executed when the interpreter is |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
304 // otherwise idle. |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
305 |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
306 void push_event_queue (void); |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
307 void pop_event_queue (void); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
308 |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
309 OCTINTERP_API void post_event (const fcn_callback& fcn); |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
310 OCTINTERP_API void post_event (const meth_callback& meth); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
311 |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
312 // The following functions correspond to the virtual fuunctions in |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
313 // the interpreter_events class. They provide a way for the |
27971
ec769a7ab9fb
fix more spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
314 // interpreter to notify the GUI that some event has occurred |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
315 // (directory or workspace changed, for example) or to request the |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
316 // GUI to perform some action (display a dialog, for example). |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
317 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
318 // Please keep this list of declarations in the same order as the |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
319 // ones above in the interpreter_events class. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
320 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
321 typedef std::list<std::pair<std::string, std::string>> filter_list; |
27311
0040b7668518
update load path dialog when path is modified via console
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27302
diff
changeset
|
322 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
323 std::list<std::string> |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
324 file_dialog (const filter_list& filter, const std::string& title, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
325 const std::string& filename, const std::string& dirname, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
326 const std::string& multimode) |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
327 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
328 return (enabled () |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
329 ? instance->file_dialog (filter, title, filename, dirname, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
330 multimode) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
331 : std::list<std::string> ()); |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
332 } |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
333 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
334 std::list<std::string> |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
335 input_dialog (const std::list<std::string>& prompt, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
336 const std::string& title, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
337 const std::list<float>& nr, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
338 const std::list<float>& nc, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
339 const std::list<std::string>& defaults) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
340 { |
27264
378d3c91f85b
style fixes for event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27263
diff
changeset
|
341 return (enabled () |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
342 ? instance->input_dialog (prompt, title, nr, nc, defaults) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
343 : std::list<std::string> ()); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
344 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
345 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
346 std::pair<std::list<int>, int> |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
347 list_dialog (const std::list<std::string>& list, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
348 const std::string& mode, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
349 int width, int height, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
350 const std::list<int>& initial_value, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
351 const std::string& name, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
352 const std::list<std::string>& prompt, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
353 const std::string& ok_string, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
354 const std::string& cancel_string) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
355 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
356 return (enabled () |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
357 ? instance->list_dialog (list, mode, width, height, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
358 initial_value, name, prompt, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
359 ok_string, cancel_string) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
360 : std::pair<std::list<int>, int> ()); |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
361 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
362 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
363 std::string |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
364 question_dialog (const std::string& msg, const std::string& title, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
365 const std::string& btn1, const std::string& btn2, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
366 const std::string& btn3, const std::string& btndef) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
367 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
368 return (enabled () |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
369 ? instance->question_dialog (msg, title, btn1, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
370 btn2, btn3, btndef) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
371 : ""); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
372 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
373 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
374 void update_path_dialog (void) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
375 { |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
376 if (application::is_gui_running () && enabled ()) |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
377 instance->update_path_dialog (); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
378 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
379 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
380 bool show_preferences (void) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
381 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
382 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
383 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
384 instance->show_preferences (); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
385 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
386 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
387 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
388 return false; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
389 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
390 |
27602
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
391 bool apply_preferences (void) |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
392 { |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
393 if (enabled ()) |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
394 { |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
395 instance->apply_preferences (); |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
396 return true; |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
397 } |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
398 else |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
399 return false; |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
400 } |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
401 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
402 bool show_doc (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
403 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
404 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
405 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
406 instance->show_doc (file); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
407 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
408 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
409 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
410 return false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
411 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
412 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
413 bool edit_file (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
414 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
415 return enabled () ? instance->edit_file (file) : false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
416 } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
417 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
418 bool edit_variable (const std::string& name, const octave_value& val) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
419 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
420 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
421 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
422 instance->edit_variable (name, val); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
423 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
424 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
425 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
426 return false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
427 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
428 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
429 bool confirm_shutdown (void) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
430 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
431 bool retval = true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
432 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
433 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
434 retval = instance->confirm_shutdown (); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
435 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
436 return retval; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
437 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
438 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
439 bool prompt_new_edit_file (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
440 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
441 return enabled () ? instance->prompt_new_edit_file (file) : false; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
442 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
443 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
444 int debug_cd_or_addpath_error (const std::string& file, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
445 const std::string& dir, bool addpath_option) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
446 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
447 return (enabled () |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
448 ? instance->debug_cd_or_addpath_error (file, dir, addpath_option) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
449 : 0); |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
450 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
451 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
452 uint8NDArray get_named_icon (const std::string& icon_name) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
453 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
454 return (enabled () |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
455 ? instance->get_named_icon (icon_name) : uint8NDArray ()); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
456 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
457 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
458 std::string gui_preference (const std::string& key, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
459 const std::string& value) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
460 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
461 return enabled () ? instance->gui_preference (key, value) : ""; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
462 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
463 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
464 bool copy_image_to_clipboard (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
465 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
466 return enabled () ? instance->copy_image_to_clipboard (file) : false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
467 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
468 |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
469 virtual void focus_window (const std::string win_name) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
470 { |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
471 if (enabled ()) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
472 instance->focus_window (win_name); |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
473 } |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
474 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
475 // Preserves pending input. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
476 void execute_command_in_terminal (const std::string& command) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
477 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
478 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
479 instance->execute_command_in_terminal (command); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
480 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
481 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
482 bool register_doc (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
483 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
484 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
485 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
486 instance->register_doc (file); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
487 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
488 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
489 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
490 return false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
491 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
492 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
493 bool unregister_doc (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
494 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
495 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
496 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
497 instance->unregister_doc (file); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
498 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
499 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
500 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
501 return false; |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
502 } |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
503 |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
504 bool interpreter_output (const std::string& msg) |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
505 { |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
506 if (enabled ()) |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
507 { |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
508 instance->interpreter_output (msg); |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
509 return true; |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
510 } |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
511 else |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
512 return false; |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
513 } |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
514 |
29057
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
515 bool gui_status_update (const std::string& feature, const std::string& status) |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
516 { |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
517 if (enabled ()) |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
518 { |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
519 instance->gui_status_update (feature, status); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
520 return true; |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
521 } |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
522 else |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
523 return false; |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
524 } |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
525 |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
526 bool update_gui_lexer (void) |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
527 { |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
528 if (enabled ()) |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
529 { |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
530 instance->update_gui_lexer (); |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
531 return true; |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
532 } |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
533 else |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
534 return false; |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
535 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
536 |
27409
a0d49e55acae
rename change_directory to directory_changed in event manager
John W. Eaton <jwe@octave.org>
parents:
27392
diff
changeset
|
537 void directory_changed (const std::string& dir) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
538 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
539 if (enabled ()) |
27409
a0d49e55acae
rename change_directory to directory_changed in event manager
John W. Eaton <jwe@octave.org>
parents:
27392
diff
changeset
|
540 instance->directory_changed (dir); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
541 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
542 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
543 // Methods for removing/renaming files which might be open in editor |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
544 void file_remove (const std::string& old_name, const std::string& new_name) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
545 { |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
546 if (application::is_gui_running () && enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
547 instance->file_remove (old_name, new_name); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
548 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
549 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
550 void file_renamed (bool load_new) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
551 { |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
552 if (application::is_gui_running () && enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
553 instance->file_renamed (load_new); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
554 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
555 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
556 OCTINTERP_API void set_workspace (void); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
557 |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
558 void set_workspace (bool top_level, const symbol_info_list& syminfo, |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
559 bool update_variable_editor = true) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
560 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
561 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
562 instance->set_workspace (top_level, debugging, syminfo, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
563 update_variable_editor); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
564 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
565 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
566 void clear_workspace (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
567 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
568 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
569 instance->clear_workspace (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
570 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
571 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
572 void set_history (const string_vector& hist) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
573 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
574 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
575 instance->set_history (hist); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
576 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
577 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
578 void append_history (const std::string& hist_entry) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
579 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
580 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
581 instance->append_history (hist_entry); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
582 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
583 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
584 void clear_history (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
585 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
586 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
587 instance->clear_history (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
588 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
589 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
590 void pre_input_event (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
591 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
592 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
593 instance->pre_input_event (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
594 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
595 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
596 void post_input_event (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
597 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
598 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
599 instance->post_input_event (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
600 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
601 |
27392
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
602 void enter_debugger_event (const std::string& fcn_name, |
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
603 const std::string& fcn_file_name, int line) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
604 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
605 if (enabled ()) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
606 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
607 debugging = true; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
608 |
27392
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
609 instance->enter_debugger_event (fcn_name, fcn_file_name, line); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
610 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
611 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
612 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
613 void execute_in_debugger_event (const std::string& file, int line) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
614 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
615 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
616 instance->execute_in_debugger_event (file, line); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
617 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
618 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
619 void exit_debugger_event (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
620 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
621 if (enabled () && debugging) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
622 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
623 debugging = false; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
624 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
625 instance->exit_debugger_event (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
626 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
627 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
628 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
629 void update_breakpoint (bool insert, const std::string& file, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
630 int line, const std::string& cond = "") |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
631 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
632 if (enabled ()) |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
633 instance->update_breakpoint (insert, file, line, cond); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
634 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
635 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
636 private: |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
637 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27285
diff
changeset
|
638 interpreter& m_interpreter; |
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27285
diff
changeset
|
639 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
640 // Using a shared_ptr to manage the link_events object ensures that it |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
641 // will be valid until it is no longer needed. |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
642 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
643 std::shared_ptr<interpreter_events> instance; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
644 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
645 protected: |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
646 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
647 // Semaphore to lock access to the event queue. |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
648 mutex *event_queue_mutex; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
649 |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
650 // Event Queue. We use a stack so that we can handle evaluation in |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
651 // the debugger when we are executing in server mode. In server |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
652 // mode, code is evaluated from inside the event queue. So when the |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
653 // evaluator reaches a breakpoint, the queue is already locked and |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
654 // executing an event function. We can't just add a new command to the |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
655 // existing queue, so we need another one that can process new |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
656 // events generated at the debug prompt. When execution continues |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
657 // (dbcont or dbstep, for example) we pop the queue and return to |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
658 // the previous point of execution. |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
659 |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
660 std::stack<std::shared_ptr <event_queue>> gui_event_queue; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
661 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
662 bool debugging; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
663 bool link_enabled; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
664 }; |
24645
f61502510d08
restore ability to select variables for editing from workspace widget
John W. Eaton <jwe@octave.org>
parents:
24641
diff
changeset
|
665 } |
13541
b48ac9ad8de0
Highly improved separation of model and view classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13522
diff
changeset
|
666 |
20945
9d9270e2f98f
eliminate comments after preprocessor conditionals
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
667 #endif |