Mercurial > octave
annotate libinterp/corefcn/event-manager.cc @ 33617:ec2635a02328 bytecode-interpreter tip
maint: Merge default to bytecode-interpreter.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 21 May 2024 18:29:03 +0200 |
parents | 4e5bc9c4f657 |
children |
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 // |
32632
2e484f9f1f18
maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
32589
diff
changeset
|
3 // Copyright (C) 2011-2024 The Octave Project Developers |
27923
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 |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21440
diff
changeset
|
26 #if defined (HAVE_CONFIG_H) |
21301
40de9f8f23a6
Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents:
21200
diff
changeset
|
27 # include "config.h" |
15155
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15041
diff
changeset
|
28 #endif |
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15041
diff
changeset
|
29 |
29502
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
30 #include <iostream> |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
31 |
23976
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
32 #include "builtin-defun-decls.h" |
15155
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15041
diff
changeset
|
33 #include "cmd-edit.h" |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
34 #include "cmd-hist.h" |
16420
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
35 #include "defun.h" |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
36 #include "event-manager.h" |
23976
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
37 #include "interpreter.h" |
23599
5cb3a2bb5e1e
don't use singleton for symbol_table
John W. Eaton <jwe@octave.org>
parents:
23457
diff
changeset
|
38 #include "interpreter-private.h" |
15155
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15041
diff
changeset
|
39 #include "oct-env.h" |
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15041
diff
changeset
|
40 #include "oct-mutex.h" |
23976
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
41 #include "ovl.h" |
22091
0f6fc2ec3b1a
move call_stack class to a separate file
John W. Eaton <jwe@octave.org>
parents:
21966
diff
changeset
|
42 #include "pager.h" |
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
|
43 #include "syminfo.h" |
13501 | 44 |
29502
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
45 #include "quit.h" |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
46 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31105
diff
changeset
|
47 OCTAVE_BEGIN_NAMESPACE(octave) |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29958
diff
changeset
|
48 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31706
diff
changeset
|
49 static int readline_event_hook () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
50 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
51 event_manager& evmgr = __get_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
|
52 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
53 evmgr.process_events (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
54 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
55 return 0; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
56 } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
57 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
58 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
59 interpreter_events::display_exception (const execution_exception& ee, |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
60 bool beep) |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
61 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
62 if (beep) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
63 std::cerr << "\a"; |
29502
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
64 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
65 ee.display (std::cerr); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
66 } |
29502
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
67 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
68 event_manager::event_manager (interpreter& interp) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
69 : m_event_queue_mutex (new mutex ()), m_gui_event_queue (), |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
70 m_debugging (false), m_link_enabled (true), |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
71 m_interpreter (interp), m_instance (new interpreter_events ()), |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
72 m_qt_event_handlers () |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
73 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
74 push_event_queue (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
75 command_editor::add_event_hook (readline_event_hook); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
76 } |
15371
eec0d1fcba4f
use Octave singleton style for octave_link class
John W. Eaton <jwe@octave.org>
parents:
15204
diff
changeset
|
77 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31706
diff
changeset
|
78 event_manager::~event_manager () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
79 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
80 delete m_event_queue_mutex; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
81 } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
82 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
83 // Programming Note: It is possible to disable the link without deleting |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
84 // the connection. This allows it to be temporarily disabled. But if |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
85 // the link is removed, we also set the link_enabled flag to false |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
86 // because if there is no link, it can't be enabled. Also, access to |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
87 // instance is only protected by a check on the link_enabled flag. |
14668
6a6733a55982
Removed unused classes and added octave loop hook.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14664
diff
changeset
|
88 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
89 void |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
90 event_manager::connect_link (const std::shared_ptr<interpreter_events>& obj) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
91 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
92 if (! obj) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
93 disable (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
94 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
95 m_instance = obj; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
96 } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
97 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
98 bool |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
99 event_manager::enable () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
100 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
101 bool retval = m_link_enabled; |
15371
eec0d1fcba4f
use Octave singleton style for octave_link class
John W. Eaton <jwe@octave.org>
parents:
15204
diff
changeset
|
102 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
103 if (m_instance) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
104 m_link_enabled = true; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
105 else |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
106 warning ("event_manager: must have connected link to enable"); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
107 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
108 return retval; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
109 } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
110 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
111 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
112 event_manager::process_events (bool disable_flag) |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
113 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
114 if (enabled ()) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
115 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
116 if (disable_flag) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
117 disable (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
118 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
119 m_event_queue_mutex->lock (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
120 std::shared_ptr<event_queue> evq = m_gui_event_queue.top (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
121 m_event_queue_mutex->unlock (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
122 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
123 evq->run (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
124 } |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
125 } |
21440
062c65569ad7
avoid some address-sanitizer leak warnings (bug #47372)
John W. Eaton <jwe@octave.org>
parents:
21301
diff
changeset
|
126 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
127 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
128 event_manager::discard_events () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
129 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
130 if (enabled ()) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
131 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
132 m_event_queue_mutex->lock (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
133 std::shared_ptr<event_queue> evq = m_gui_event_queue.top (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
134 m_event_queue_mutex->unlock (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
135 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
136 evq->discard (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
137 } |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
138 } |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29057
diff
changeset
|
139 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
140 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
141 event_manager::push_event_queue () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
142 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
143 std::shared_ptr<event_queue> evq (new event_queue ()); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
144 m_gui_event_queue.push (evq); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
145 } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
146 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
147 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
148 event_manager::pop_event_queue () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
149 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
150 // FIXME: Should we worry about the possibility of events remaining |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
151 // in the queue when we pop back to the previous queue? If so, then |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
152 // we will probably want to push them on to the front of the |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
153 // previous queue so they will be executed before any other events |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
154 // that were in the previous queue. This case could happen if |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
155 // graphics callback functions were added to the event queue during a |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
156 // debug session just after a dbcont command was added but before it |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
157 // executed and brought us here, for example. |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29057
diff
changeset
|
158 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
159 std::shared_ptr<event_queue> evq = m_gui_event_queue.top (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
160 m_gui_event_queue.pop (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
161 } |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29057
diff
changeset
|
162 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
163 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
164 event_manager::post_event (const fcn_callback& fcn) |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
165 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
166 if (enabled ()) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
167 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
168 std::shared_ptr<event_queue> evq = m_gui_event_queue.top (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
169 evq->add (fcn); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
170 } |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
171 } |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29057
diff
changeset
|
172 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
173 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
174 event_manager::post_event (const meth_callback& meth) |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
175 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
176 if (enabled ()) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
177 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
178 std::shared_ptr<event_queue> evq = m_gui_event_queue.top (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
179 evq->add (std::bind (meth, std::ref (m_interpreter))); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
180 } |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
181 } |
27260
5ac60319575b
separate octave_link event queue from events and actions
John W. Eaton <jwe@octave.org>
parents:
27259
diff
changeset
|
182 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
183 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
184 event_manager::set_workspace () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
185 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
186 if (enabled ()) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
187 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
188 tree_evaluator& tw = m_interpreter.get_evaluator (); |
27260
5ac60319575b
separate octave_link event queue from events and actions
John W. Eaton <jwe@octave.org>
parents:
27259
diff
changeset
|
189 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
190 m_instance->set_workspace (tw.at_top_level (), m_debugging, |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
191 tw.get_symbol_info (), true); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
192 } |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
193 } |
29775
a64352cadda8
use interpreter events to set initial data for workspace and history widgets
John W. Eaton <jwe@octave.org>
parents:
29621
diff
changeset
|
194 |
32589
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
195 void |
05b4479c29d8
maint: C++ style check for libinterp/ before 9.1 release.
Rik <rik@octave.org>
parents:
31771
diff
changeset
|
196 event_manager::set_history () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
197 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
198 if (enabled ()) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
199 m_instance->set_history (command_history::list ()); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
200 } |
29958
32c3a5805893
move DEFUN and DEFMETHOD functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
29950
diff
changeset
|
201 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
202 // FIXME: Should the following function be __event_manager_desktop__ |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
203 // with the desktop function implemented in a .m file, similar to the |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
204 // way the UI* functions work? |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
205 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
206 DEFMETHOD (desktop, interp, , , |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
207 doc: /* -*- texinfo -*- |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
208 @deftypefn {} {} desktop () |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
209 If running in command-line mode, start the GUI desktop. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
210 @end deftypefn */) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
211 { |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
212 if (interp.experimental_terminal_widget ()) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
213 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
214 if (! application::is_gui_running ()) |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
215 { |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
216 // FIXME: Currently, the following action is queued and |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
217 // executed in a Qt event loop and we return immediately to |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
218 // the command prompt where additional commands may be |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
219 // executed. Is that what should happen? Or should we be |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
220 // waiting until the GUI exits to return to the command |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
221 // prompt, similar to the way the UI* functions work? |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
222 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
223 event_manager& evmgr = interp.get_event_manager (); |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
224 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
225 evmgr.start_gui (); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
226 } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
227 else |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
228 warning ("GUI desktop is already running"); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
229 } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
230 else |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
231 error ("desktop function requires new experimental terminal widget"); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
232 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
233 return ovl (); |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
234 } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
235 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
236 DEFMETHOD (__event_manager_enabled__, interp, , , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
237 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
238 @deftypefn {} {@var{tf} =} __event_manager_enabled__ () |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
239 Undocumented internal function. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
240 @end deftypefn */) |
16552
8fc1f6535380
new function, __octave_link_enabled__
John W. Eaton <jwe@octave.org>
parents:
16551
diff
changeset
|
241 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
242 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
243 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
244 return ovl (evmgr.enabled ()); |
16552
8fc1f6535380
new function, __octave_link_enabled__
John W. Eaton <jwe@octave.org>
parents:
16551
diff
changeset
|
245 } |
8fc1f6535380
new function, __octave_link_enabled__
John W. Eaton <jwe@octave.org>
parents:
16551
diff
changeset
|
246 |
30195
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
247 DEFMETHOD (__event_manager_have_dialogs__, interp, , , |
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
248 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
249 @deftypefn {} {@var{tf} =} __event_manager_have_dialogs__ () |
30195
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
250 Undocumented internal function. |
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
251 @end deftypefn */) |
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
252 { |
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
253 event_manager& evmgr = interp.get_event_manager (); |
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
254 |
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
255 return ovl (evmgr.have_dialogs ()); |
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
256 } |
a7981aa5822b
event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30134
diff
changeset
|
257 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
258 DEFMETHOD (__event_manager_edit_file__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
259 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
260 @deftypefn {} {@var{status} =} __event_manager_edit_file__ (@var{file}) |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
261 Undocumented internal function. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
262 @end deftypefn */) |
16420
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
263 { |
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
264 octave_value retval; |
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
265 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
266 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
267 |
16420
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
268 if (args.length () == 1) |
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
269 { |
27264
378d3c91f85b
style fixes for event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27263
diff
changeset
|
270 std::string file |
378d3c91f85b
style fixes for event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27263
diff
changeset
|
271 = args(0).xstring_value ("first argument must be filename"); |
16420
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
272 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
273 flush_stdout (); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
274 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
275 retval = evmgr.edit_file (file); |
16420
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
276 } |
17884
766ad9be2966
Prompt for non-existent new file when using edit.m from GUI (bug #40450)
Torsten <ttl@justmail.de>
parents:
17787
diff
changeset
|
277 else if (args.length () == 2) |
766ad9be2966
Prompt for non-existent new file when using edit.m from GUI (bug #40450)
Torsten <ttl@justmail.de>
parents:
17787
diff
changeset
|
278 { |
27264
378d3c91f85b
style fixes for event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27263
diff
changeset
|
279 std::string file |
378d3c91f85b
style fixes for event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27263
diff
changeset
|
280 = args(0).xstring_value ("first argument must be filename"); |
17884
766ad9be2966
Prompt for non-existent new file when using edit.m from GUI (bug #40450)
Torsten <ttl@justmail.de>
parents:
17787
diff
changeset
|
281 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
282 flush_stdout (); |
17884
766ad9be2966
Prompt for non-existent new file when using edit.m from GUI (bug #40450)
Torsten <ttl@justmail.de>
parents:
17787
diff
changeset
|
283 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
284 retval = evmgr.prompt_new_edit_file (file); |
17884
766ad9be2966
Prompt for non-existent new file when using edit.m from GUI (bug #40450)
Torsten <ttl@justmail.de>
parents:
17787
diff
changeset
|
285 } |
16420
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
286 |
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
287 return retval; |
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16415
diff
changeset
|
288 } |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
289 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
290 DEFMETHOD (__event_manager_question_dialog__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
291 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
292 @deftypefn {} {@var{btn_val} =} __event_manager_question_dialog__ (@var{msg}, @var{title}, @var{btn1}, @var{btn2}, @var{btn3}, @var{default}) |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
293 Undocumented internal function. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
294 @end deftypefn */) |
16551
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
295 { |
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
296 octave_value retval; |
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
297 |
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
298 if (args.length () == 6) |
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
299 { |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20667
diff
changeset
|
300 std::string msg = args(0).xstring_value ("invalid arguments"); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20667
diff
changeset
|
301 std::string title = args(1).xstring_value ("invalid arguments"); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20667
diff
changeset
|
302 std::string btn1 = args(2).xstring_value ("invalid arguments"); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20667
diff
changeset
|
303 std::string btn2 = args(3).xstring_value ("invalid arguments"); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20667
diff
changeset
|
304 std::string btn3 = args(4).xstring_value ("invalid arguments"); |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20667
diff
changeset
|
305 std::string btndef = args(5).xstring_value ("invalid arguments"); |
16551
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
306 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
307 flush_stdout (); |
16551
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
308 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
309 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
310 |
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 retval = evmgr.question_dialog (msg, title, btn1, btn2, btn3, btndef); |
16551
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
312 } |
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
313 |
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
314 return retval; |
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
315 } |
6ae555fc8c43
Add questdlg dialog function and fix variety of dialog bugs.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
16524
diff
changeset
|
316 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
317 DEFMETHOD (__event_manager_file_dialog__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
318 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
319 @deftypefn {} {[@var{fname}, @var{fpath}, @var{fltidx}] =} __event_manager_file_dialog__ (@var{filterlist}, @var{title}, @var{filename}, @var{multiselect}, @var{pathname}) |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
320 Undocumented internal function. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
321 @end deftypefn */) |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
322 { |
30196
813b7827c5f8
Remove "position" argument from file dialog functions (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30195
diff
changeset
|
323 if (args.length () != 5) |
20941
a4f5da7c5463
maint: Replace "octave_value_list ()" with "ovl ()".
Rik <rik@octave.org>
parents:
20898
diff
changeset
|
324 return ovl (); |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
325 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
326 octave_value_list retval (3); |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
327 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
328 const Array<std::string> flist = args(0).cellstr_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
329 std::string title = args(1).string_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
330 std::string filename = args(2).string_value (); |
30196
813b7827c5f8
Remove "position" argument from file dialog functions (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30195
diff
changeset
|
331 std::string multi_on = args(3).string_value (); // on, off, create |
813b7827c5f8
Remove "position" argument from file dialog functions (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents:
30195
diff
changeset
|
332 std::string pathname = args(4).string_value (); |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
333 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
334 octave_idx_type nel; |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
335 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
336 event_manager::filter_list filter_lst; |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
337 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
338 for (octave_idx_type i = 0; i < flist.rows (); i++) |
30390
a61e1a0f6024
maint: style check C++ files in libinterp/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
30196
diff
changeset
|
339 filter_lst.push_back (std::make_pair (flist(i, 0), |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
340 (flist.columns () > 1 |
30390
a61e1a0f6024
maint: style check C++ files in libinterp/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
30196
diff
changeset
|
341 ? flist(i, 1) : ""))); |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
342 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
343 flush_stdout (); |
16580
adc150db1809
style fixes for uigetfile changes
John W. Eaton <jwe@octave.org>
parents:
16579
diff
changeset
|
344 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
345 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
346 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
347 std::list<std::string> items_lst |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
348 = evmgr.file_dialog (filter_lst, title, filename, pathname, multi_on); |
20667
8742e0b1cc49
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20581
diff
changeset
|
349 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
350 nel = items_lst.size (); |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
351 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
352 // If 3, then retval is filename, directory, and selected index. |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
353 if (nel <= 3) |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
354 { |
21836
2049e123bf7b
uigetdir, uigetfile, uiputfile: Return zeros when user cancels (bug #48171)
Mike Miller <mtmiller@octave.org>
parents:
21748
diff
changeset
|
355 if (items_lst.front ().empty ()) |
21837
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
356 retval = ovl (octave_value (0.), octave_value (0.), octave_value (0.)); |
21836
2049e123bf7b
uigetdir, uigetfile, uiputfile: Return zeros when user cancels (bug #48171)
Mike Miller <mtmiller@octave.org>
parents:
21748
diff
changeset
|
357 else |
21837
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
358 { |
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
359 int idx = 0; |
22862
e365e87371a3
maint: Use C++ range feature to simplify some for loops in libinterp/corefcn.
Rik <rik@octave.org>
parents:
22755
diff
changeset
|
360 for (auto& str : items_lst) |
21837
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
361 { |
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
362 if (idx != 2) |
22862
e365e87371a3
maint: Use C++ range feature to simplify some for loops in libinterp/corefcn.
Rik <rik@octave.org>
parents:
22755
diff
changeset
|
363 retval(idx++) = str; |
21837
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
364 else |
33240
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
365 { |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
366 // FIXME: Should we warn or error on invalid or out of |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
367 // range values in STR? When atoi was used for |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
368 // conversion instead of std::stoi we did not. Was |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
369 // that intentional? |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
370 |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
371 try |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
372 { |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
373 retval(idx++) = std::stoi (str); |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
374 } |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
375 catch (const std::invalid_argument&) { } |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
376 catch (const std::out_of_range&) { } |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
377 } |
21837
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
378 } |
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
379 } |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
380 } |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
381 else |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
382 { |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
383 // Multiple files. |
21837
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
384 nel -= 2; |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
385 Cell items (dim_vector (1, nel)); |
20667
8742e0b1cc49
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20581
diff
changeset
|
386 |
25337
3ff9192b676e
use auto keyword to declare iterator variables where possible
John W. Eaton <jwe@octave.org>
parents:
25060
diff
changeset
|
387 auto it = items_lst.begin (); |
20667
8742e0b1cc49
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20581
diff
changeset
|
388 |
21837
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
389 for (int idx = 0; idx < nel; idx++, it++) |
3ef630a564f8
Clean up C++ code for F__octave_link_file_dialog__.
Rik <rik@octave.org>
parents:
21836
diff
changeset
|
390 items.xelem (idx) = *it; |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
391 |
33240
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
392 auto fpath = *it++; |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
393 |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
394 int idx = 0; |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
395 |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
396 // FIXME: Should we warn or error on invalid or out of range |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
397 // values in *IT? When atoi was used for conversion instead of |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
398 // std::stoi we did not. Was that intentional? |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
399 |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
400 try |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
401 { |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
402 idx = std::stoi (*it); |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
403 } |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
404 catch (const std::invalid_argument&) { } |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
405 catch (const std::out_of_range&) { } |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
406 |
4e5bc9c4f657
use std::stoi or std::stoul instead of atoi (bug #65342)
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
407 retval = ovl (items, fpath, idx); |
16580
adc150db1809
style fixes for uigetfile changes
John W. Eaton <jwe@octave.org>
parents:
16579
diff
changeset
|
408 } |
16579
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
409 |
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
410 return retval; |
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
411 } |
7f8db1942dc0
Add Qt link uigetfile dialog implementation.
John Donoghue <john.donoghue@ieee.org>
parents:
16552
diff
changeset
|
412 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
413 DEFMETHOD (__event_manager_list_dialog__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
414 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
415 @deftypefn {} {[@var{sel}, @var{ok}] =} __event_manager_list_dialog__ (@var{list}, @var{mode}, @var{size}, @var{initial}, @var{name}, @var{prompt}, @var{ok_string}, @var{cancel_string}) |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
416 Undocumented internal function. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
417 @end deftypefn */) |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
418 { |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
419 if (args.length () != 8) |
20941
a4f5da7c5463
maint: Replace "octave_value_list ()" with "ovl ()".
Rik <rik@octave.org>
parents:
20898
diff
changeset
|
420 return ovl (); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
421 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
422 Cell list = args(0).cell_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
423 const Array<std::string> tlist = list.cellstr_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
424 octave_idx_type nel = tlist.numel (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
425 std::list<std::string> list_lst; |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
426 for (octave_idx_type i = 0; i < nel; i++) |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
427 list_lst.push_back (tlist(i)); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
428 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
429 std::string mode = args(1).string_value (); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
430 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
431 Matrix size_matrix = args(2).matrix_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
432 int width = size_matrix(0); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
433 int height = size_matrix(1); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
434 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
435 Matrix initial_matrix = args(3).matrix_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
436 nel = initial_matrix.numel (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
437 std::list<int> initial_lst; |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
438 for (octave_idx_type i = 0; i < nel; i++) |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
439 initial_lst.push_back (initial_matrix(i)); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
440 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
441 std::string name = args(4).string_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
442 list = args(5).cell_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
443 const Array<std::string> plist = list.cellstr_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
444 nel = plist.numel (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
445 std::list<std::string> prompt_lst; |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
446 for (octave_idx_type i = 0; i < nel; i++) |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
447 prompt_lst.push_back (plist(i)); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
448 std::string ok_string = args(6).string_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
449 std::string cancel_string = args(7).string_value (); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
450 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
451 flush_stdout (); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
452 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
453 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
454 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
455 std::pair<std::list<int>, int> result |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
456 = evmgr.list_dialog (list_lst, mode, width, height, initial_lst, |
27932
b018f553fd85
maint: Use Octave coding conventions in libinterp/
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
457 name, prompt_lst, ok_string, cancel_string); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
458 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
459 std::list<int> items_lst = result.first; |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
460 nel = items_lst.size (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
461 Matrix items (dim_vector (1, nel)); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
462 octave_idx_type i = 0; |
22862
e365e87371a3
maint: Use C++ range feature to simplify some for loops in libinterp/corefcn.
Rik <rik@octave.org>
parents:
22755
diff
changeset
|
463 for (const auto& int_el : items_lst) |
e365e87371a3
maint: Use C++ range feature to simplify some for loops in libinterp/corefcn.
Rik <rik@octave.org>
parents:
22755
diff
changeset
|
464 items.xelem(i++) = int_el; |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
465 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
466 return ovl (items, result.second); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
467 } |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
468 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
469 DEFMETHOD (__event_manager_input_dialog__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
470 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
471 @deftypefn {} {@var{cstr} =} __event_manager_input_dialog__ (@var{prompt}, @var{title}, @var{rowscols}, @var{defaults}) |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
472 Undocumented internal function. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
473 @end deftypefn */) |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
474 { |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
475 if (args.length () != 4) |
20941
a4f5da7c5463
maint: Replace "octave_value_list ()" with "ovl ()".
Rik <rik@octave.org>
parents:
20898
diff
changeset
|
476 return ovl (); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
477 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
478 Cell prompt = args(0).cell_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
479 Array<std::string> tmp = prompt.cellstr_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
480 octave_idx_type nel = tmp.numel (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
481 std::list<std::string> prompt_lst; |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
482 for (octave_idx_type i = 0; i < nel; i++) |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
483 prompt_lst.push_back (tmp(i)); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
484 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
485 std::string title = args(1).string_value (); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
486 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
487 Matrix rc = args(2).matrix_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
488 nel = rc.rows (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
489 std::list<float> nr; |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
490 std::list<float> nc; |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
491 for (octave_idx_type i = 0; i < nel; i++) |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
492 { |
30390
a61e1a0f6024
maint: style check C++ files in libinterp/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
30196
diff
changeset
|
493 nr.push_back (rc(i, 0)); |
a61e1a0f6024
maint: style check C++ files in libinterp/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
30196
diff
changeset
|
494 nc.push_back (rc(i, 1)); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
495 } |
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
496 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
497 Cell defaults = args(3).cell_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
498 tmp = defaults.cellstr_value (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
499 nel = tmp.numel (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
500 std::list<std::string> defaults_lst; |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
501 for (octave_idx_type i = 0; i < nel; i++) |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
502 defaults_lst.push_back (tmp(i)); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
503 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
504 flush_stdout (); |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
505 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
506 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
507 |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
508 std::list<std::string> items_lst |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
509 = evmgr.input_dialog (prompt_lst, title, nr, nc, defaults_lst); |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
510 |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
511 nel = items_lst.size (); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
512 Cell items (dim_vector (nel, 1)); |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
513 octave_idx_type i = 0; |
22862
e365e87371a3
maint: Use C++ range feature to simplify some for loops in libinterp/corefcn.
Rik <rik@octave.org>
parents:
22755
diff
changeset
|
514 for (const auto& str_el : items_lst) |
e365e87371a3
maint: Use C++ range feature to simplify some for loops in libinterp/corefcn.
Rik <rik@octave.org>
parents:
22755
diff
changeset
|
515 items.xelem(i++) = str_el; |
20898
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
516 |
8da80da1ac37
maint: Use ovl() more places in the code.
Rik <rik@octave.org>
parents:
20892
diff
changeset
|
517 return ovl (items); |
16512
7f2395651a1c
dialog boxes with Qt widgets
Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
parents:
16485
diff
changeset
|
518 } |
17010
c50ee84842a9
Add preferences and prefdir functions
John Donoghue <john.donoghue@ieee.org>
parents:
16894
diff
changeset
|
519 |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
520 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
521 DEFMETHOD (__event_manager_named_icon__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
522 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
523 @deftypefn {} {@var{icon} =} __event_manager_dialog_icons__ (@var{icon_name}) |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
524 Undocumented internal function. |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
525 @end deftypefn */) |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
526 { |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
527 uint8NDArray retval; |
25948
700b3f415ebe
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
25921
diff
changeset
|
528 |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
529 if (args.length () > 0) |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
530 { |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
531 std::string icon_name = args(0).xstring_value ("invalid arguments"); |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
532 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
533 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
534 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
535 retval = evmgr.get_named_icon (icon_name); |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
536 } |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
537 |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
538 return ovl (retval); |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
539 } |
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25790
diff
changeset
|
540 |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
541 // FIXME: Why does this function return any value at all? |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
542 DEFMETHOD (__event_manager_show_preferences__, interp, , , |
27932
b018f553fd85
maint: Use Octave coding conventions in libinterp/
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
543 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
544 @deftypefn {} {@var{status} =} __event_manager_show_preferences__ () |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
545 Undocumented internal function. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
546 @end deftypefn */) |
17010
c50ee84842a9
Add preferences and prefdir functions
John Donoghue <john.donoghue@ieee.org>
parents:
16894
diff
changeset
|
547 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
548 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
549 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
550 return ovl (evmgr.show_preferences ()); |
17010
c50ee84842a9
Add preferences and prefdir functions
John Donoghue <john.donoghue@ieee.org>
parents:
16894
diff
changeset
|
551 } |
c50ee84842a9
Add preferences and prefdir functions
John Donoghue <john.donoghue@ieee.org>
parents:
16894
diff
changeset
|
552 |
27602
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27554
diff
changeset
|
553 DEFMETHOD (__event_manager_apply_preferences__, interp, , , |
27932
b018f553fd85
maint: Use Octave coding conventions in libinterp/
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
554 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
555 @deftypefn {} {@var{status} =} __event_manager_apply_preferences__ () |
27602
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27554
diff
changeset
|
556 Undocumented internal function. |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27554
diff
changeset
|
557 @end deftypefn */) |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27554
diff
changeset
|
558 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
559 event_manager& evmgr = interp.get_event_manager (); |
27602
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27554
diff
changeset
|
560 |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27554
diff
changeset
|
561 return ovl (evmgr.apply_preferences ()); |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27554
diff
changeset
|
562 } |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27554
diff
changeset
|
563 |
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 DEFMETHOD (__event_manager_gui_preference__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
565 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
566 @deftypefn {} {@var{prefval} =} __event_manager_gui_preference__ (@var{key}) |
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
567 @deftypefnx {} {@var{prefval} =} __event_manager_gui_preference__ (@var{key}, @var{value}) |
25639
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
568 Undocumented internal function. |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
569 @end deftypefn */) |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
570 { |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
571 std::string key; |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
572 std::string value = ""; |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
573 |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
574 if (args.length () >= 1) |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
575 key = args(0).string_value(); |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
576 else |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
577 error ("__event_manager_gui_preference__: " |
25639
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
578 "first argument must be the preference key"); |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
579 |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
580 if (args.length () >= 2) |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
581 value = args(1).string_value(); |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
582 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
583 if (application::is_gui_running ()) |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
584 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
585 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
586 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
587 return ovl (evmgr.gui_preference (key, value)); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
588 } |
26336
a6694db4bd41
Do not try to change GUI preferences if it isn't running (bug #55318).
Torsten <mttl@mailbox.org>
parents:
26117
diff
changeset
|
589 else |
a6694db4bd41
Do not try to change GUI preferences if it isn't running (bug #55318).
Torsten <mttl@mailbox.org>
parents:
26117
diff
changeset
|
590 return ovl (value); |
25639
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
591 } |
7644e7f1721f
change gui preferences from within the worker thread (bug #49119)
Torsten <mttl@mailbox.org>
parents:
25337
diff
changeset
|
592 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
593 DEFMETHOD (__event_manager_file_remove__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
594 doc: /* -*- texinfo -*- |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
595 @deftypefn {} {} __event_manager_file_remove__ () |
25790
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
596 Undocumented internal function. |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
597 @end deftypefn */) |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
598 { |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
599 std::string old_name, new_name; |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
600 |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
601 if (args.length () == 2) |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
602 { |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
603 old_name = args(0).string_value(); |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
604 new_name = args(1).string_value(); |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
605 } |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
606 else |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
607 error ("__event_manager_file_remove__: " |
25790
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
608 "old and new name expected as arguments"); |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
609 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
610 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
611 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
612 evmgr.file_remove (old_name, new_name); |
25790
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
613 |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
614 return ovl (); |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
615 } |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
616 |
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 DEFMETHOD (__event_manager_file_renamed__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
618 doc: /* -*- texinfo -*- |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
619 @deftypefn {} {} __event_manager_file_renamed__ () |
25790
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
620 Undocumented internal function. |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
621 @end deftypefn */) |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
622 { |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
623 bool load_new; |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
624 |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
625 if (args.length () == 1) |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
626 load_new = args(0).bool_value(); |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
627 else |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
628 error ("__event_manager_file_renamed__: " |
25790
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
629 "first argument must be boolean for reload new named file"); |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
630 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
631 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
632 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
633 evmgr.file_renamed (load_new); |
25790
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
634 |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
635 return ovl (); |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
636 } |
872111558bc0
reload editor files when their path changes by using movefile (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25639
diff
changeset
|
637 |
24641
7d177be54c37
pass variable value to variable editor in addition to variable name
John W. Eaton <jwe@octave.org>
parents:
24631
diff
changeset
|
638 DEFMETHOD (openvar, interp, args, , |
7d177be54c37
pass variable value to variable editor in addition to variable name
John W. Eaton <jwe@octave.org>
parents:
24631
diff
changeset
|
639 doc: /* -*- texinfo -*- |
23938
e54e13ee99ce
openvar: fix doc string declaration
Mike Miller <mtmiller@octave.org>
parents:
23927
diff
changeset
|
640 @deftypefn {} {} openvar (@var{name}) |
e54e13ee99ce
openvar: fix doc string declaration
Mike Miller <mtmiller@octave.org>
parents:
23927
diff
changeset
|
641 Open the variable @var{name} in the graphical Variable Editor. |
e54e13ee99ce
openvar: fix doc string declaration
Mike Miller <mtmiller@octave.org>
parents:
23927
diff
changeset
|
642 @end deftypefn */) |
23927
e3a36f84d01d
provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
23693
diff
changeset
|
643 { |
23976
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
644 if (args.length () != 1) |
23927
e3a36f84d01d
provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
23693
diff
changeset
|
645 print_usage (); |
e3a36f84d01d
provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
23693
diff
changeset
|
646 |
23976
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
647 if (! args(0).is_string ()) |
24208
eec262017c6a
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
24082
diff
changeset
|
648 error ("openvar: NAME must be a string"); |
23976
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
649 |
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
650 std::string name = args(0).string_value (); |
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
651 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
652 octave_value val = interp.varval (name); |
24641
7d177be54c37
pass variable value to variable editor in addition to variable name
John W. Eaton <jwe@octave.org>
parents:
24631
diff
changeset
|
653 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
654 if (val.is_undefined ()) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
655 error ("openvar: '%s' is not a variable", name.c_str ()); |
24641
7d177be54c37
pass variable value to variable editor in addition to variable name
John W. Eaton <jwe@octave.org>
parents:
24631
diff
changeset
|
656 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
657 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
658 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
659 evmgr.edit_variable (name, val); |
23976
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
660 |
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
661 return ovl (); |
23927
e3a36f84d01d
provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
23693
diff
changeset
|
662 } |
e3a36f84d01d
provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
23693
diff
changeset
|
663 |
23976
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
664 /* |
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
665 %!error openvar () |
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
666 %!error openvar ("a", "b") |
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
667 %!error <NAME must be a string> openvar (1:10) |
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
668 */ |
529272d1c271
Complete openvar implementation (bug #51899).
Rik <rik@octave.org>
parents:
23938
diff
changeset
|
669 |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
670 DEFMETHOD (__event_manager_show_terminal_window__, interp, , , |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
671 doc: /* -*- texinfo -*- |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
672 @deftypefn {} {} __event_manager_show_terminal_window__ () |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
673 Undocumented internal function. |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
674 @end deftypefn */) |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
675 { |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
676 std::string file; |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
677 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
678 event_manager& evmgr = interp.get_event_manager (); |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
679 |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
680 evmgr.show_terminal_window (); |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
681 |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
682 return ovl (); |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
683 } |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
684 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
685 DEFMETHOD (__event_manager_show_documentation__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
686 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
687 @deftypefn {} {@var{status} =} __event_manager_show_documentation__ (@var{filename}) |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
688 Undocumented internal function. |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
689 @end deftypefn */) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
690 { |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
691 std::string file; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
692 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
693 if (args.length () >= 1) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
694 file = args(0).string_value(); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
695 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
696 event_manager& evmgr = interp.get_event_manager (); |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
697 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
698 return ovl (evmgr.show_documentation (file)); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
699 } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
700 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
701 DEFMETHOD (__event_manager_register_documentation__, interp, args, , |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
702 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
703 @deftypefn {} {@var{status} =} __event_manager_register_documentation__ (@var{filename}) |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
704 Undocumented internal function. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21837
diff
changeset
|
705 @end deftypefn */) |
17029
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
17010
diff
changeset
|
706 { |
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
17010
diff
changeset
|
707 std::string file; |
17010
c50ee84842a9
Add preferences and prefdir functions
John Donoghue <john.donoghue@ieee.org>
parents:
16894
diff
changeset
|
708 |
17029
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
17010
diff
changeset
|
709 if (args.length () >= 1) |
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
17010
diff
changeset
|
710 file = args(0).string_value(); |
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
17010
diff
changeset
|
711 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
712 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
713 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
714 return ovl (evmgr.register_documentation (file)); |
17029
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
17010
diff
changeset
|
715 } |
25060
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
716 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
717 DEFMETHOD (__event_manager_unregister_documentation__, interp, args, , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
718 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
719 @deftypefn {} {@var{status} =} __event_manager_unregister_documentation__ (@var{filename}) |
25060
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
720 Undocumented internal function. |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
721 @end deftypefn */) |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
722 { |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
723 std::string file; |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
724 |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
725 if (args.length () >= 1) |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
726 file = args(0).string_value(); |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
727 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
728 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
729 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
730 return ovl (evmgr.unregister_documentation (file)); |
25060
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
731 } |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
732 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
733 DEFMETHOD (__event_manager_show_file_browser__, interp, , , |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
734 doc: /* -*- texinfo -*- |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
735 @deftypefn {} {} __event_manager_show_file_browser__ () |
25060
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
736 Undocumented internal function. |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
737 @end deftypefn */) |
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
738 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
739 event_manager& evmgr = interp.get_event_manager (); |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
740 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
741 evmgr.show_file_browser (); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
742 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
743 return ovl (); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
744 } |
25060
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
745 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
746 DEFMETHOD (__event_manager_show_command_history__, interp, , , |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
747 doc: /* -*- texinfo -*- |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
748 @deftypefn {} {} __event_manager_show_command_history__ () |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
749 Undocumented internal function. |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
750 @end deftypefn */) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
751 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
752 event_manager& evmgr = interp.get_event_manager (); |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27260
diff
changeset
|
753 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
754 evmgr.show_command_history (); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
755 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
756 return ovl (); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
757 } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
758 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
759 DEFMETHOD (__event_manager_show_workspace__, interp, , , |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
760 doc: /* -*- texinfo -*- |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
761 @deftypefn {} {} __event_manager_show_workspace__ () |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
762 Undocumented internal function. |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
763 @end deftypefn */) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
764 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
765 event_manager& evmgr = interp.get_event_manager (); |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
766 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
767 evmgr.show_workspace (); |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
768 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29601
diff
changeset
|
769 return ovl (); |
25060
1cd3aeda7598
Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25054
diff
changeset
|
770 } |
27554
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
771 |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
772 DEFMETHOD (__event_manager_show_community_news__, interp, , , |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
773 doc: /* -*- texinfo -*- |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
774 @deftypefn {} {} __event_manager_show_community_news__ () |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
775 Undocumented internal function. |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
776 @end deftypefn */) |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
777 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
778 event_manager& evmgr = interp.get_event_manager (); |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
779 |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
780 evmgr.show_community_news (); |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
781 |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
782 return ovl (); |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
783 } |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
784 |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
785 DEFMETHOD (__event_manager_show_release_notes__, interp, , , |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
786 doc: /* -*- texinfo -*- |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
787 @deftypefn {} {} __event_manager_show_release_notes__ () |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
788 Undocumented internal function. |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
789 @end deftypefn */) |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
790 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
791 event_manager& evmgr = interp.get_event_manager (); |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
792 |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
793 evmgr.show_release_notes (); |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
794 |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
795 return ovl (); |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
796 } |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
797 |
29057
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
798 DEFMETHOD (__event_manager_gui_status_update__, interp, args, , |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
799 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
800 @deftypefn {} {@var{status} =} __event_manager_gui_status_update__ (@var{feature}, @var{status}) |
29057
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
801 Internal function for updating the status of some features in the GUI. |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
802 @end deftypefn */) |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
803 { |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
804 // This is currently a stub and should only be activated some |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
805 // interpreter action only implemented in m-files requires to update |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
806 // a status indicator in the gui. BUT: This internal function can |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
807 // be activated by the user leading to gui indicators not reflecting |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
808 // the real state of the related feature. |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
809 return ovl (); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
810 |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
811 std::string feature; |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
812 std::string status; |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
813 |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
814 if (! (Fisguirunning ())(0).is_true ()) |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
815 return ovl (); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
816 |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
817 if (args.length () < 2) |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
818 error ("__event_manager_gui_status_update__: two parameters required"); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
819 if (! (args(0).is_string ())) |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
820 error ("__event_manager_gui_status_update__: FEATURE must be a string"); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
821 if (! (args(1).is_string ())) |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
822 error ("__event_manager_gui_status_update__: STATUS must be a string"); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
823 |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
824 feature = args(0).string_value (); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
825 status = args(1).string_value (); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
826 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
827 event_manager& evmgr = interp.get_event_manager (); |
29057
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
828 |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
829 return ovl (evmgr.gui_status_update (feature, status)); |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
830 } |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28888
diff
changeset
|
831 |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
832 DEFMETHOD (__event_manager_update_gui_lexer__, interp, , , |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
833 doc: /* -*- texinfo -*- |
30888
32d2b6604a9f
doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
834 @deftypefn {} {@var{status} =} __event_manager_update_gui_lexer__ () |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
835 Undocumented internal function. |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
836 @end deftypefn */) |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
837 { |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
838 event_manager& evmgr = interp.get_event_manager (); |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
839 |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
840 return ovl (evmgr.update_gui_lexer ()); |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
841 } |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27987
diff
changeset
|
842 |
27554
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
843 DEFMETHOD (__event_manager_copy_image_to_clipboard__, interp, args, , |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
844 doc: /* -*- texinfo -*- |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
845 @deftypefn {} {} __event_manager_copy_image_to_clipboard__ (@var{filename}) |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
846 Undocumented internal function. |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
847 @end deftypefn */) |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
848 { |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
849 std::string file; |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
850 |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
851 if (args.length () >= 1) |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
852 file = args(0).string_value(); |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
853 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
854 event_manager& evmgr = interp.get_event_manager (); |
27554
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
855 evmgr.copy_image_to_clipboard (file); |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
856 return ovl (); |
d0f778462a51
Restore hability to copy figure to clipboard (bug #55970)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27444
diff
changeset
|
857 } |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
858 |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
859 DEFMETHOD (commandhistory, interp, args, , |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
860 doc: /* -*- texinfo -*- |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
861 @deftypefn {} {} commandhistory () |
27673
58bff27d8714
Fix typo in cset 271b5cd640d7 (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27669
diff
changeset
|
862 Show the GUI command history window and give it the keyboard focus. |
27795
afbaad39d25c
doc: grammarcheck C++ files in libinterp/ directory.
Rik <rik@octave.org>
parents:
27688
diff
changeset
|
863 @seealso{commandwindow, filebrowser, workspace} |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
864 @end deftypefn */) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
865 { |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
866 if (args.length () != 0) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
867 print_usage (); |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
868 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
869 event_manager& evmgr = interp.get_event_manager (); |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
870 evmgr.focus_window ("history"); |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
871 return ovl (); |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
872 } |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
873 |
27688
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
874 DEFMETHOD (commandwindow, interp, args, , |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
875 doc: /* -*- texinfo -*- |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
876 @deftypefn {} {} commandwindow () |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
877 Show the GUI command window and give it the keyboard focus. |
27795
afbaad39d25c
doc: grammarcheck C++ files in libinterp/ directory.
Rik <rik@octave.org>
parents:
27688
diff
changeset
|
878 @seealso{commandhistory, filebrowser, workspace} |
27688
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
879 @end deftypefn */) |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
880 { |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
881 if (args.length () != 0) |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
882 print_usage (); |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
883 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
884 event_manager& evmgr = interp.get_event_manager (); |
27688
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
885 evmgr.focus_window ("command"); |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
886 return ovl (); |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
887 } |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
888 |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
889 DEFMETHOD (filebrowser, interp, args, , |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
890 doc: /* -*- texinfo -*- |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
891 @deftypefn {} {} filebrowser () |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
892 Show the GUI file browser window and give it the keyboard focus. |
27795
afbaad39d25c
doc: grammarcheck C++ files in libinterp/ directory.
Rik <rik@octave.org>
parents:
27688
diff
changeset
|
893 @seealso{commandwindow, commandhistory, workspace} |
27688
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
894 @end deftypefn */) |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
895 { |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
896 if (args.length () != 0) |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
897 print_usage (); |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
898 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
899 event_manager& evmgr = interp.get_event_manager (); |
27688
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
900 evmgr.focus_window ("filebrowser"); |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
901 return ovl (); |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
902 } |
7e6836784575
doc: Move commandwind() function and friends to new section of manual (bug #57213).
Rik <rik@octave.org>
parents:
27673
diff
changeset
|
903 |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
904 DEFMETHOD (workspace, interp, args, , |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
905 doc: /* -*- texinfo -*- |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
906 @deftypefn {} {} workspace () |
27673
58bff27d8714
Fix typo in cset 271b5cd640d7 (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27669
diff
changeset
|
907 Show the GUI workspace window and give it the keyboard focus. |
27795
afbaad39d25c
doc: grammarcheck C++ files in libinterp/ directory.
Rik <rik@octave.org>
parents:
27688
diff
changeset
|
908 @seealso{commandwindow, commandhistory, filebrowser} |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
909 @end deftypefn */) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
910 { |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
911 if (args.length () != 0) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
912 print_usage (); |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
913 |
29961
7d6709900da7
eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
914 event_manager& evmgr = interp.get_event_manager (); |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
915 evmgr.focus_window ("workspace"); |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
916 return ovl (); |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
917 } |
29958
32c3a5805893
move DEFUN and DEFMETHOD functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
29950
diff
changeset
|
918 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31105
diff
changeset
|
919 OCTAVE_END_NAMESPACE(octave) |