Mercurial > octave
annotate libinterp/corefcn/event-manager.h @ 31605:e88a07dec498 stable
maint: Use macros to begin/end C++ namespaces.
* oct-conf-post-public.in.h: Define two macros (OCTAVE_BEGIN_NAMESPACE,
OCTAVE_END_NAMESPACE) that can be used to start/end a namespace.
* mk-opts.pl, build-env.h, build-env.in.cc, __betainc__.cc, __contourc__.cc,
__dsearchn__.cc, __eigs__.cc, __expint__.cc, __ftp__.cc, __gammainc__.cc,
__ichol__.cc, __ilu__.cc, __isprimelarge__.cc, __lin_interpn__.cc,
__magick_read__.cc, __pchip_deriv__.cc, __qp__.cc, amd.cc, auto-shlib.cc,
auto-shlib.h, balance.cc, base-text-renderer.cc, base-text-renderer.h,
besselj.cc, bitfcns.cc, bsxfun.cc, c-file-ptr-stream.cc, c-file-ptr-stream.h,
call-stack.cc, call-stack.h, ccolamd.cc, cellfun.cc, chol.cc, colamd.cc,
colloc.cc, conv2.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, data.h, debug.cc,
defaults.cc, defaults.h, defun-int.h, defun.cc, det.cc, dirfns.cc, display.cc,
display.h, dlmread.cc, dmperm.cc, dot.cc, dynamic-ld.cc, dynamic-ld.h, eig.cc,
ellipj.cc, environment.cc, environment.h, error.cc, error.h, errwarn.h,
event-manager.cc, event-manager.h, event-queue.cc, event-queue.h, fcn-info.cc,
fcn-info.h, fft.cc, fft2.cc, fftn.cc, file-io.cc, filter.cc, find.cc,
ft-text-renderer.cc, ft-text-renderer.h, gcd.cc, getgrent.cc, getpwent.cc,
getrusage.cc, givens.cc, gl-render.cc, gl-render.h, gl2ps-print.cc,
gl2ps-print.h, graphics-toolkit.cc, graphics-toolkit.h, graphics.cc,
graphics.in.h, gsvd.cc, gtk-manager.cc, gtk-manager.h, hash.cc, help.cc,
help.h, hess.cc, hex2num.cc, hook-fcn.cc, hook-fcn.h, input.cc, input.h,
interpreter-private.cc, interpreter-private.h, interpreter.cc, interpreter.h,
inv.cc, jsondecode.cc, jsonencode.cc, kron.cc, latex-text-renderer.cc,
latex-text-renderer.h, load-path.cc, load-path.h, load-save.cc, load-save.h,
lookup.cc, ls-ascii-helper.cc, ls-ascii-helper.h, ls-oct-text.cc, ls-utils.cc,
ls-utils.h, lsode.cc, lu.cc, mappers.cc, matrix_type.cc, max.cc, mex-private.h,
mex.cc, mgorth.cc, nproc.cc, oct-fstrm.cc, oct-fstrm.h, oct-hdf5-types.cc,
oct-hdf5-types.h, oct-hist.cc, oct-hist.h, oct-iostrm.cc, oct-iostrm.h,
oct-opengl.h, oct-prcstrm.cc, oct-prcstrm.h, oct-procbuf.cc, oct-procbuf.h,
oct-process.cc, oct-process.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h,
oct-strstrm.cc, oct-strstrm.h, oct-tex-lexer.in.ll, oct-tex-parser.yy,
ordqz.cc, ordschur.cc, pager.cc, pager.h, pinv.cc, pow2.cc, pr-flt-fmt.cc,
pr-output.cc, procstream.cc, procstream.h, psi.cc, qr.cc, quad.cc, quadcc.cc,
qz.cc, rand.cc, rcond.cc, regexp.cc, schur.cc, settings.cc, settings.h,
sighandlers.cc, sighandlers.h, sparse-xdiv.cc, sparse-xdiv.h, sparse-xpow.cc,
sparse-xpow.h, sparse.cc, spparms.cc, sqrtm.cc, stack-frame.cc, stack-frame.h,
stream-euler.cc, strfind.cc, strfns.cc, sub2ind.cc, svd.cc, sylvester.cc,
symbfact.cc, syminfo.cc, syminfo.h, symrcm.cc, symrec.cc, symrec.h,
symscope.cc, symscope.h, symtab.cc, symtab.h, syscalls.cc, sysdep.cc, sysdep.h,
text-engine.cc, text-engine.h, text-renderer.cc, text-renderer.h, time.cc,
toplev.cc, tril.cc, tsearch.cc, typecast.cc, url-handle-manager.cc,
url-handle-manager.h, urlwrite.cc, utils.cc, utils.h, variables.cc,
variables.h, xdiv.cc, xdiv.h, xnorm.cc, xnorm.h, xpow.cc, xpow.h,
__delaunayn__.cc, __fltk_uigetfile__.cc, __glpk__.cc, __init_fltk__.cc,
__init_gnuplot__.cc, __ode15__.cc, __voronoi__.cc, audiodevinfo.cc,
audioread.cc, convhulln.cc, fftw.cc, gzip.cc, mk-build-env-features.sh,
mk-builtins.pl, cdef-class.cc, cdef-class.h, cdef-fwd.h, cdef-manager.cc,
cdef-manager.h, cdef-method.cc, cdef-method.h, cdef-object.cc, cdef-object.h,
cdef-package.cc, cdef-package.h, cdef-property.cc, cdef-property.h,
cdef-utils.cc, cdef-utils.h, ov-base.cc, ov-base.h, ov-bool-mat.cc,
ov-builtin.h, ov-cell.cc, ov-class.cc, ov-class.h, ov-classdef.cc,
ov-classdef.h, ov-complex.cc, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn.h,
ov-java.cc, ov-java.h, ov-mex-fcn.h, ov-null-mat.cc, ov-oncleanup.cc,
ov-struct.cc, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h,
ov.cc, ov.h, octave.cc, octave.h, mk-ops.sh, op-b-b.cc, op-b-bm.cc,
op-b-sbm.cc, op-bm-b.cc, op-bm-bm.cc, op-bm-sbm.cc, op-cdm-cdm.cc, op-cell.cc,
op-chm.cc, op-class.cc, op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc,
op-cm-scm.cc, op-cm-sm.cc, op-cs-cm.cc, op-cs-cs.cc, op-cs-m.cc, op-cs-s.cc,
op-cs-scm.cc, op-cs-sm.cc, op-dm-dm.cc, op-dm-scm.cc, op-dm-sm.cc,
op-dm-template.cc, op-dms-template.cc, op-fcdm-fcdm.cc, op-fcm-fcm.cc,
op-fcm-fcs.cc, op-fcm-fm.cc, op-fcm-fs.cc, op-fcn.cc, op-fcs-fcm.cc,
op-fcs-fcs.cc, op-fcs-fm.cc, op-fcs-fs.cc, op-fdm-fdm.cc, op-fm-fcm.cc,
op-fm-fcs.cc, op-fm-fm.cc, op-fm-fs.cc, op-fs-fcm.cc, op-fs-fcs.cc,
op-fs-fm.cc, op-fs-fs.cc, op-i16-i16.cc, op-i32-i32.cc, op-i64-i64.cc,
op-i8-i8.cc, op-int-concat.cc, op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc,
op-m-scm.cc, op-m-sm.cc, op-mi.cc, op-pm-pm.cc, op-pm-scm.cc, op-pm-sm.cc,
op-pm-template.cc, op-range.cc, op-s-cm.cc, op-s-cs.cc, op-s-m.cc, op-s-s.cc,
op-s-scm.cc, op-s-sm.cc, op-sbm-b.cc, op-sbm-bm.cc, op-sbm-sbm.cc,
op-scm-cm.cc, op-scm-cs.cc, op-scm-m.cc, op-scm-s.cc, op-scm-scm.cc,
op-scm-sm.cc, op-sm-cm.cc, op-sm-cs.cc, op-sm-m.cc, op-sm-s.cc, op-sm-scm.cc,
op-sm-sm.cc, op-str-m.cc, op-str-s.cc, op-str-str.cc, op-struct.cc,
op-ui16-ui16.cc, op-ui32-ui32.cc, op-ui64-ui64.cc, op-ui8-ui8.cc, ops.h,
anon-fcn-validator.cc, anon-fcn-validator.h, bp-table.cc, bp-table.h,
comment-list.cc, comment-list.h, filepos.h, lex.h, lex.ll, oct-lvalue.cc,
oct-lvalue.h, oct-parse.yy, parse.h, profiler.cc, profiler.h,
pt-anon-scopes.cc, pt-anon-scopes.h, pt-arg-list.cc, pt-arg-list.h,
pt-args-block.cc, pt-args-block.h, pt-array-list.cc, pt-array-list.h,
pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.cc, pt-bp.h,
pt-cbinop.cc, pt-cbinop.h, pt-cell.cc, pt-cell.h, pt-check.cc, pt-check.h,
pt-classdef.cc, pt-classdef.h, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc,
pt-const.h, pt-decl.cc, pt-decl.h, pt-eval.cc, pt-eval.h, pt-except.cc,
pt-except.h, pt-exp.cc, pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc,
pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc,
pt-mat.h, pt-misc.cc, pt-misc.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc,
pt-select.h, pt-spmd.cc, pt-spmd.h, pt-stmt.cc, pt-stmt.h, pt-tm-const.cc,
pt-tm-const.h, pt-unop.cc, pt-unop.h, pt-vm-eval.cc, pt-walk.cc, pt-walk.h,
pt.cc, pt.h, token.cc, token.h, Range.cc, Range.h, idx-vector.cc, idx-vector.h,
range-fwd.h, CollocWt.cc, CollocWt.h, aepbalance.cc, aepbalance.h, chol.cc,
chol.h, gepbalance.cc, gepbalance.h, gsvd.cc, gsvd.h, hess.cc, hess.h,
lo-mappers.cc, lo-mappers.h, lo-specfun.cc, lo-specfun.h, lu.cc, lu.h,
oct-convn.cc, oct-convn.h, oct-fftw.cc, oct-fftw.h, oct-norm.cc, oct-norm.h,
oct-rand.cc, oct-rand.h, oct-spparms.cc, oct-spparms.h, qr.cc, qr.h, qrp.cc,
qrp.h, randgamma.cc, randgamma.h, randmtzig.cc, randmtzig.h, randpoisson.cc,
randpoisson.h, schur.cc, schur.h, sparse-chol.cc, sparse-chol.h, sparse-lu.cc,
sparse-lu.h, sparse-qr.cc, sparse-qr.h, svd.cc, svd.h, child-list.cc,
child-list.h, dir-ops.cc, dir-ops.h, file-ops.cc, file-ops.h, file-stat.cc,
file-stat.h, lo-sysdep.cc, lo-sysdep.h, lo-sysinfo.cc, lo-sysinfo.h,
mach-info.cc, mach-info.h, oct-env.cc, oct-env.h, oct-group.cc, oct-group.h,
oct-password.cc, oct-password.h, oct-syscalls.cc, oct-syscalls.h, oct-time.cc,
oct-time.h, oct-uname.cc, oct-uname.h, action-container.cc, action-container.h,
base-list.h, cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h, f77-fcn.h,
file-info.cc, file-info.h, lo-array-errwarn.cc, lo-array-errwarn.h, lo-hash.cc,
lo-hash.h, lo-ieee.h, lo-regexp.cc, lo-regexp.h, lo-utils.cc, lo-utils.h,
oct-base64.cc, oct-base64.h, oct-glob.cc, oct-glob.h, oct-inttypes.h,
oct-mutex.cc, oct-mutex.h, oct-refcount.h, oct-shlib.cc, oct-shlib.h,
oct-sparse.cc, oct-sparse.h, oct-string.h, octave-preserve-stream-state.h,
pathsearch.cc, pathsearch.h, quit.cc, quit.h, unwind-prot.cc, unwind-prot.h,
url-transfer.cc, url-transfer.h : Use new macros to begin/end C++ namespaces.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 01 Dec 2022 14:23:45 -0800 |
parents | d81b39f1dec1 |
children | aac27ad79be6 |
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 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
30195
diff
changeset
|
3 // Copyright (C) 2011-2022 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 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
26 #if ! defined (octave_event_manager_h) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
27 #define octave_event_manager_h 1 |
13501 | 28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21158
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21158
diff
changeset
|
30 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27285
diff
changeset
|
31 #include <functional> |
23442
53f5f8231c37
allow most header files to be compiled separately
John W. Eaton <jwe@octave.org>
parents:
23433
diff
changeset
|
32 #include <list> |
27262
d67f369b3074
use shared_ptr to manage octave_link_events object
John W. Eaton <jwe@octave.org>
parents:
27261
diff
changeset
|
33 #include <memory> |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
34 #include <stack> |
15155
9e62d5a3a45e
partial cleanup of include files in gui sources
John W. Eaton <jwe@octave.org>
parents:
15080
diff
changeset
|
35 #include <string> |
13501 | 36 |
23057
bb7513d73673
move mutex classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
37 #include "oct-mutex.h" |
25742
d3c6de326bae
close/reload editor tab when file is (re)moved in gui terminal (bug #43922)
Torsten <mttl@mailbox.org>
parents:
25653
diff
changeset
|
38 #include "octave.h" |
16420
81ec95768520
use octave-link instead of hook for edit function
John W. Eaton <jwe@octave.org>
parents:
16419
diff
changeset
|
39 #include "event-queue.h" |
25921
9c47eedc44e2
msgbox.m: use graphics objects to build dialog (bug #42490)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25742
diff
changeset
|
40 #include "uint8NDArray.h" |
16377
8430ea8c1594
open editor tab and insert marker for debugging with gui
John W. Eaton <jwe@octave.org>
parents:
16350
diff
changeset
|
41 |
24641
7d177be54c37
pass variable value to variable editor in addition to variable name
John W. Eaton <jwe@octave.org>
parents:
24631
diff
changeset
|
42 class octave_value; |
16431
5982d469f79b
use signal for setting, appending to, and clearing history widget
John W. Eaton <jwe@octave.org>
parents:
16426
diff
changeset
|
43 class string_vector; |
24645
f61502510d08
restore ability to select variables for editing from workspace widget
John W. Eaton <jwe@octave.org>
parents:
24641
diff
changeset
|
44 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31528
diff
changeset
|
45 OCTAVE_BEGIN_NAMESPACE(octave) |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29836
diff
changeset
|
46 |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27285
diff
changeset
|
47 typedef std::function<void (void)> fcn_callback; |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
48 typedef std::function<void (interpreter&)> meth_callback; |
27302
5f170ea12fa1
use Qt signals to pass interpreter callbacks to octave-qobject
John W. Eaton <jwe@octave.org>
parents:
27285
diff
changeset
|
49 |
29502
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
50 class execution_exception; |
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
|
51 class symbol_info_list; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
52 |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
53 // The methods in this class provide a way to pass signals to the GUI |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
54 // thread. A GUI that wishes to act on these events should derive |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
55 // from this class and perform actions in a thread-safe way. In |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
56 // Octave's Qt-based GUI, for example, these functions are all |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
57 // implemented as wrappers around Qt signals that trigger actions in |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
58 // the GUI. The Qt signal/slot mechanism ensures that the actions are |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
59 // properly queued for execution when the objects corresponding to the |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
60 // signal and slot belong to different threads. |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
61 // |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
62 // These functions should not be called directly. Instead all |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
63 // requests from the interpreter for GUI actions should be done |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
64 // through the event_manager class. That class checks to ensure that |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
65 // the GUI is connected and enabled before calling these virtual |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
66 // functions. |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
67 |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
68 // FIXME: it would be nice if instead of requiring the GUI to derive |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
69 // from this class, it could subscribe to individual events, possibly |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
70 // multiple times. In that way, it would be more flexible and |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
71 // decentralized, similar to the Qt signal/slot connection mechanism |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
72 // and would allow the GUI to connect multiple signals to a single |
27971
ec769a7ab9fb
fix more spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
73 // action or multiple actions to a single signal. |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
74 |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
75 // FIXME: audit this list of functions and determine whether they are |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
76 // all necessary and whether there might be better names for them. |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
77 |
29502
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
78 class OCTINTERP_API interpreter_events |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
79 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
80 public: |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
81 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
82 interpreter_events (void) = default; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
83 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
84 interpreter_events (const interpreter_events&) = default; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
85 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
86 interpreter_events& operator = (const interpreter_events&) = default; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
87 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
88 virtual ~interpreter_events (void) = default; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
89 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
90 // Note: START_GUI and CLOSE_GUI currently only work with the new |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
91 // experimental terminal widget. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
92 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
93 // Set GUI_APP to true when starting Octave as a gui application |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
94 // (invoked with the --gui option) and false when starting the GUI |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
95 // from the Octave prompt when Octave is already running as a |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
96 // command line application. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
97 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
98 virtual void start_gui (bool /*gui_app*/ = false) { } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
99 virtual void close_gui (void) { } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
100 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
101 // Dialogs. |
27311
0040b7668518
update load path dialog when path is modified via console
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27302
diff
changeset
|
102 |
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
|
103 virtual bool have_dialogs (void) const { return false; } |
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
|
104 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
105 typedef std::list<std::pair<std::string, std::string>> filter_list; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
106 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
107 virtual std::list<std::string> |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
108 file_dialog (const filter_list& /*filter*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
109 const std::string& /*title*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
110 const std::string& /*filename*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
111 const std::string& /*dirname*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
112 const std::string& /*multimode*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
113 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
114 return std::list<std::string> (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
115 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
116 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
117 virtual std::list<std::string> |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
118 input_dialog (const std::list<std::string>& /*prompt*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
119 const std::string& /*title*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
120 const std::list<float>& /*nr*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
121 const std::list<float>& /*nc*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
122 const std::list<std::string>& /*defaults*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
123 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
124 return std::list<std::string> (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
125 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
126 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
127 virtual std::pair<std::list<int>, int> |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
128 list_dialog (const std::list<std::string>& /*list*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
129 const std::string& /*mode*/, int /*width*/, int /*height*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
130 const std::list<int>& /*initial_value*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
131 const std::string& /*name*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
132 const std::list<std::string>& /*prompt*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
133 const std::string& /*ok_string*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
134 const std::string& /*cancel_string*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
135 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
136 return std::pair<std::list<int>, int> (); |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
137 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
138 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
139 virtual std::string |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
140 question_dialog (const std::string& /*msg*/, const std::string& /*title*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
141 const std::string& /*btn1*/, const std::string& /*btn2*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
142 const std::string& /*btn3*/, const std::string& /*btndef*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
143 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
144 return ""; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
145 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
146 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
147 virtual void update_path_dialog (void) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
148 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
149 virtual void show_preferences (void) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
150 |
27602
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
151 virtual void apply_preferences (void) { } |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
152 |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
153 virtual void show_terminal_window (void) { } |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
154 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
155 virtual bool show_documentation (const std::string& /*file*/) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
156 { |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
157 return false; |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
158 } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
159 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
160 virtual void show_file_browser (void) { } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
161 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
162 virtual void show_command_history (void) { } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
163 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
164 virtual void show_workspace (void) { } |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
165 |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
166 virtual void show_community_news (int /*serial*/) { } |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
167 virtual void show_release_notes (void) { } |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
168 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
169 virtual bool edit_file (const std::string& /*file*/) { return false; } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
170 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
171 virtual void |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
172 edit_variable (const std::string& /*name*/, const octave_value& /*val*/) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
173 { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
174 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
175 // Other requests for user interaction, usually some kind of |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
176 // confirmation before another action. Could these be reformulated |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
177 // using the question_dialog action? |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
178 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
179 virtual bool confirm_shutdown (void) { return true; } |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
180 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
181 virtual bool prompt_new_edit_file (const std::string& /*file*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
182 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
183 return false; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
184 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
185 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
186 virtual int |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
187 debug_cd_or_addpath_error (const std::string& /*file*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
188 const std::string& /*dir*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
189 bool /*addpath_option*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
190 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
191 return -1; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
192 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
193 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
194 // Requests for information normally stored in the GUI. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
195 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
196 virtual uint8NDArray get_named_icon (const std::string& /*icon_name*/) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
197 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
198 return uint8NDArray (); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
199 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
200 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
201 virtual std::string gui_preference (const std::string& /*key*/, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
202 const std::string& /*value*/) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
203 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
204 return ""; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
205 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
206 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
207 // Requests for GUI action that do not require user interaction. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
208 // These are different from other notifications in that they are not |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
209 // associated with changes in the interpreter state (like a change |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
210 // in the current working directory or command history). |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
211 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
212 virtual bool copy_image_to_clipboard (const std::string& /*file*/) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
213 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
214 return false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
215 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
216 |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
217 virtual void focus_window (const std::string /*win_name*/) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
218 { } |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
219 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
220 virtual void |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
221 execute_command_in_terminal (const std::string& /*command*/) { } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
222 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
223 virtual void register_documentation (const std::string& /*file*/) { } |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
224 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
225 virtual void unregister_documentation (const std::string& /*file*/) { } |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
226 |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
227 virtual void interpreter_output (const std::string& /*msg*/) { } |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
228 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
229 virtual void display_exception (const execution_exception& ee, bool beep); |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
230 |
29057
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
231 virtual void gui_status_update (const std::string& /*feature*/, |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
232 const std::string& /*status*/) { } |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
233 |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
234 virtual void update_gui_lexer (void) { } |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
235 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
236 // Notifications of events in the interpreter that a GUI will |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
237 // normally wish to respond to. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
238 |
27409
a0d49e55acae
rename change_directory to directory_changed in event manager
John W. Eaton <jwe@octave.org>
parents:
27392
diff
changeset
|
239 virtual void directory_changed (const std::string& /*dir*/) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
240 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
241 virtual void |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
242 file_remove (const std::string& /*old_nm*/, const std::string& /*new_nm*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
243 { } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
244 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
245 virtual void file_renamed (bool) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
246 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
247 virtual void |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
248 set_workspace (bool /*top_level*/, bool /*debug*/, |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
249 const symbol_info_list& /*syminfo*/, |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
250 bool /*update_variable_editor*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
251 { } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
252 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
253 virtual void clear_workspace (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
254 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
255 virtual void update_prompt (const std::string& /*prompt*/) { } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
256 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
257 virtual void set_history (const string_vector& /*hist*/) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
258 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
259 virtual void append_history (const std::string& /*hist_entry*/) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
260 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
261 virtual void clear_history (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
262 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
263 virtual void pre_input_event (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
264 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
265 virtual void post_input_event (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
266 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
267 virtual void |
27392
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
268 enter_debugger_event (const std::string& /*fcn_name*/, |
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
269 const std::string& /*fcn_file_name*/, |
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
270 int /*line*/) |
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
271 { } |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
272 |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
273 virtual void |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
274 execute_in_debugger_event (const std::string& /*file*/, int /*line*/) { } |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
275 |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
276 virtual void exit_debugger_event (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
277 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
278 virtual void |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
279 update_breakpoint (bool /*insert*/, const std::string& /*file*/, |
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
280 int /*line*/, const std::string& /*cond*/) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
281 { } |
29293
8784f20b9b8c
new interpreter_event to signal that interpreter was interrupted
John W. Eaton <jwe@octave.org>
parents:
29282
diff
changeset
|
282 |
8784f20b9b8c
new interpreter_event to signal that interpreter was interrupted
John W. Eaton <jwe@octave.org>
parents:
29282
diff
changeset
|
283 virtual void interpreter_interrupted (void) { } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
284 }; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
285 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
286 //! Provides threadsafe access to octave. |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
287 //! |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
288 //! This class provides thread-safe communication between the |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
289 //! interpreter and a GUI. |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
290 |
31528
d81b39f1dec1
Export typeinfo of event_manager class.
Markus Mützel <markus.muetzel@gmx.de>
parents:
30565
diff
changeset
|
291 class |
d81b39f1dec1
Export typeinfo of event_manager class.
Markus Mützel <markus.muetzel@gmx.de>
parents:
30565
diff
changeset
|
292 OCTINTERP_API |
d81b39f1dec1
Export typeinfo of event_manager class.
Markus Mützel <markus.muetzel@gmx.de>
parents:
30565
diff
changeset
|
293 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
|
294 { |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
295 public: |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
296 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
297 OCTINTERP_API event_manager (interpreter& interp); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
298 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
299 // No copying! |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
300 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
301 event_manager (const event_manager&) = delete; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
302 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
303 event_manager& |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
304 operator = (const event_manager&) = delete; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
305 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
306 virtual ~event_manager (void); |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
307 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
308 // OBJ should be an object of a class that is derived from the base |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
309 // class interpreter_events, or nullptr to disconnect and delete the |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
310 // previous link. |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
311 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
312 OCTINTERP_API void |
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
313 connect_link (const std::shared_ptr<interpreter_events>& obj); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
314 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
315 OCTINTERP_API bool enable (void); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
316 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
317 bool disable (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
318 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
319 bool retval = m_link_enabled; |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
320 m_link_enabled = false; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
321 return retval; |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
322 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
323 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
324 bool enabled (void) const |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
325 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
326 return m_link_enabled; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
327 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
328 |
29621
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
329 // Make the Qt actions available for others. This is a temporary |
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
330 // solution to allow Qt actions like opening the documentation |
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
331 // browser when the primary interpreter_events object is not the one |
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
332 // defined for the Qt GUI. |
29624
539ba2b7d90c
event-manager.h: Remove visibility attributes from functions defined in header.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29621
diff
changeset
|
333 void |
29621
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
334 install_qt_event_handlers (const std::shared_ptr<interpreter_events>& obj) |
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
335 { |
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
336 m_qt_event_handlers = obj; |
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
337 } |
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
338 |
29624
539ba2b7d90c
event-manager.h: Remove visibility attributes from functions defined in header.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29621
diff
changeset
|
339 std::shared_ptr<interpreter_events> |
29621
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
340 qt_event_handlers (void) const { return m_qt_event_handlers; } |
a5ee1fec49ba
provide access to qt_interpreter_event handlers from event_manager class
John W. Eaton <jwe@octave.org>
parents:
29613
diff
changeset
|
341 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
342 // If disable is TRUE, then no additional events will be processed |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
343 // other than exit. |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
344 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
345 OCTINTERP_API void process_events (bool disable = false); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
346 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
347 OCTINTERP_API void discard_events (void); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
348 |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
349 // The post_event and post_exception functions provide a thread-safe |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
350 // way for the GUI to queue interpreter functions for execution. |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
351 // The queued functions are executed when the interpreter is |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
352 // otherwise idle. |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
353 |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
354 void push_event_queue (void); |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
355 void pop_event_queue (void); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
356 |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
357 OCTINTERP_API void post_event (const fcn_callback& fcn); |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
358 OCTINTERP_API void post_event (const meth_callback& meth); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
359 |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
360 // The following functions correspond to the virtual fuunctions in |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
361 // the interpreter_events class. They provide a way for the |
27971
ec769a7ab9fb
fix more spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
362 // interpreter to notify the GUI that some event has occurred |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
363 // (directory or workspace changed, for example) or to request the |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
364 // GUI to perform some action (display a dialog, for example). |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
365 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
366 // Please keep this list of declarations in the same order as the |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
367 // ones above in the interpreter_events class. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
368 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
369 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
370 // Note: START_GUI and CLOSE_GUI currently only work with the new |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
371 // experimental terminal object. |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
372 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
373 void start_gui (bool gui_app = false) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
374 { |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
375 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
376 m_instance->start_gui (gui_app); |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
377 } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
378 |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
379 void close_gui (void) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
380 { |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
381 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
382 m_instance->close_gui (); |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
383 } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
384 |
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
|
385 // 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
|
386 |
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
|
387 bool have_dialogs (void) const |
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
|
388 { |
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
|
389 return m_qt_event_handlers && m_qt_event_handlers->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
|
390 } |
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
|
391 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
392 typedef std::list<std::pair<std::string, std::string>> filter_list; |
27311
0040b7668518
update load path dialog when path is modified via console
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27302
diff
changeset
|
393 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
394 std::list<std::string> |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
395 file_dialog (const filter_list& filter, const std::string& title, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
396 const std::string& filename, const std::string& dirname, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
397 const std::string& multimode) |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
398 { |
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
|
399 return (enabled () && have_dialogs () |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
400 ? m_instance->file_dialog (filter, title, filename, dirname, |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
401 multimode) |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
402 : std::list<std::string> ()); |
27285
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
403 } |
6c438195f4e0
internal documentation for interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27284
diff
changeset
|
404 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
405 std::list<std::string> |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
406 input_dialog (const std::list<std::string>& prompt, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
407 const std::string& title, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
408 const std::list<float>& nr, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
409 const std::list<float>& nc, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
410 const std::list<std::string>& defaults) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
411 { |
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
|
412 return (enabled () && have_dialogs () |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
413 ? m_instance->input_dialog (prompt, title, nr, nc, defaults) |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
414 : std::list<std::string> ()); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
415 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
416 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
417 std::pair<std::list<int>, int> |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
418 list_dialog (const std::list<std::string>& list, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
419 const std::string& mode, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
420 int width, int height, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
421 const std::list<int>& initial_value, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
422 const std::string& name, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
423 const std::list<std::string>& prompt, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
424 const std::string& ok_string, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
425 const std::string& cancel_string) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
426 { |
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
|
427 return (enabled () && have_dialogs () |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
428 ? m_instance->list_dialog (list, mode, width, height, |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
429 initial_value, name, prompt, |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
430 ok_string, cancel_string) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
431 : std::pair<std::list<int>, int> ()); |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
432 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
433 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
434 std::string |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
435 question_dialog (const std::string& msg, const std::string& title, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
436 const std::string& btn1, const std::string& btn2, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
437 const std::string& btn3, const std::string& btndef) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
438 { |
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
|
439 return (enabled () && have_dialogs () |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
440 ? m_instance->question_dialog (msg, title, btn1, |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
441 btn2, btn3, btndef) |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
442 : ""); |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
443 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
444 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
445 void update_path_dialog (void) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
446 { |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
447 if (application::is_gui_running () && enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
448 m_instance->update_path_dialog (); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
449 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
450 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
451 bool show_preferences (void) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
452 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
453 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
454 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
455 m_instance->show_preferences (); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
456 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
457 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
458 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
459 return false; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
460 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
461 |
27602
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
462 bool apply_preferences (void) |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
463 { |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
464 if (enabled ()) |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
465 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
466 m_instance->apply_preferences (); |
27602
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
467 return true; |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
468 } |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
469 else |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
470 return false; |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
471 } |
ba317c535adb
define new __event_manager_apply_preferences__ function
John W. Eaton <jwe@octave.org>
parents:
27442
diff
changeset
|
472 |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
473 void show_terminal_window (void) |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
474 { |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
475 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
476 m_instance->show_terminal_window (); |
29787
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
477 } |
b4d2fa28d1d4
allow terminal window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29775
diff
changeset
|
478 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
479 bool show_documentation (const std::string& file) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
480 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
481 return enabled () ? m_instance->show_documentation (file) : false; |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
482 } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
483 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
484 void show_file_browser (void) |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
485 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
486 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
487 m_instance->show_file_browser (); |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
488 } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
489 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
490 void show_command_history (void) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
491 { |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
492 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
493 m_instance->show_command_history (); |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
494 } |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
495 |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
496 void show_workspace (void) |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
497 { |
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
498 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
499 m_instance->show_workspace (); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
500 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
501 |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
502 void show_community_news (int serial = -1) |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
503 { |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
504 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
505 m_instance->show_community_news (serial); |
29835
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
506 } |
a946d742fb97
allow community news window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29787
diff
changeset
|
507 |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
508 void show_release_notes (void) |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
509 { |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
510 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
511 m_instance->show_release_notes (); |
29836
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
512 } |
56465c0739fa
allow release notes window to be opened from command line
John W. Eaton <jwe@octave.org>
parents:
29835
diff
changeset
|
513 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
514 bool edit_file (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
515 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
516 return enabled () ? m_instance->edit_file (file) : false; |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
517 } |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
518 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
519 bool edit_variable (const std::string& name, const octave_value& val) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
520 { |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
521 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
522 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
523 m_instance->edit_variable (name, val); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
524 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
525 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
526 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
527 return false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
528 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
529 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
530 bool confirm_shutdown (void) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
531 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
532 bool retval = true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
533 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
534 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
535 retval = m_instance->confirm_shutdown (); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
536 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
537 return retval; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
538 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
539 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
540 bool prompt_new_edit_file (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
541 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
542 return enabled () ? m_instance->prompt_new_edit_file (file) : false; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
543 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
544 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
545 int debug_cd_or_addpath_error (const std::string& file, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
546 const std::string& dir, bool addpath_option) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
547 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
548 return (enabled () |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
549 ? m_instance->debug_cd_or_addpath_error (file, dir, |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
550 addpath_option) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
551 : 0); |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
552 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
553 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
554 uint8NDArray get_named_icon (const std::string& icon_name) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
555 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
556 return (enabled () |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
557 ? m_instance->get_named_icon (icon_name) : uint8NDArray ()); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
558 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
559 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
560 std::string gui_preference (const std::string& key, |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
561 const std::string& value) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
562 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
563 return enabled () ? m_instance->gui_preference (key, value) : ""; |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
564 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
565 |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
566 bool copy_image_to_clipboard (const std::string& file) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
567 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
568 return enabled () ? m_instance->copy_image_to_clipboard (file) : false; |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
569 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
570 |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
571 virtual void focus_window (const std::string win_name) |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
572 { |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
573 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
574 m_instance->focus_window (win_name); |
27669
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
575 } |
271b5cd640d7
Add functions to show GUI windows (bug #57213)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
27602
diff
changeset
|
576 |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
577 // Preserves pending input. |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
578 void execute_command_in_terminal (const std::string& command) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
579 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
580 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
581 m_instance->execute_command_in_terminal (command); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
582 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
583 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
584 bool register_documentation (const std::string& file) |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
585 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
586 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
587 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
588 m_instance->register_documentation (file); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
589 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
590 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
591 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
592 return false; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
593 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
594 |
29613
9367cba2a6d5
allow most dock widgets to be used from command line
John W. Eaton <jwe@octave.org>
parents:
29503
diff
changeset
|
595 bool unregister_documentation (const std::string& file) |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
596 { |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
597 if (enabled ()) |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
598 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
599 m_instance->unregister_documentation (file); |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
600 return true; |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
601 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
602 else |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
603 return false; |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
604 } |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
605 |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
606 bool interpreter_output (const std::string& msg) |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
607 { |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
608 if (enabled ()) |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
609 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
610 m_instance->interpreter_output (msg); |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
611 return true; |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
612 } |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
613 else |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
614 return false; |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
615 } |
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29233
diff
changeset
|
616 |
29502
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
617 bool display_exception (const execution_exception& ee, bool beep = false) |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
618 { |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
619 if (enabled ()) |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
620 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
621 m_instance->display_exception (ee, beep); |
29502
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
622 return true; |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
623 } |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
624 else |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
625 return false; |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
626 } |
76fdbe78884f
allow event manager to handle display of execution exceptions
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
627 |
30346
91c6288781ba
maint: Shorten some long lines in libinterp to <= 80 characters (bug #57599)
Rik <rik@octave.org>
parents:
30195
diff
changeset
|
628 bool gui_status_update (const std::string& feature, |
91c6288781ba
maint: Shorten some long lines in libinterp to <= 80 characters (bug #57599)
Rik <rik@octave.org>
parents:
30195
diff
changeset
|
629 const std::string& status) |
29057
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
630 { |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
631 if (enabled ()) |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
632 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
633 m_instance->gui_status_update (feature, status); |
29057
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
634 return true; |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
635 } |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
636 else |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
637 return false; |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
638 } |
450920c987b8
update profiler status in gui from interpreter
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28857
diff
changeset
|
639 |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
640 bool update_gui_lexer (void) |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
641 { |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
642 if (enabled ()) |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
643 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
644 m_instance->update_gui_lexer (); |
28788
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
645 return true; |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
646 } |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
647 else |
aba2c4eadb83
add functions of loaded packages to auto-completion list (bug #56207)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27971
diff
changeset
|
648 return false; |
27442
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
649 } |
6e4519df0be2
group functions by category in interpreter_events and event_manager classes
John W. Eaton <jwe@octave.org>
parents:
27409
diff
changeset
|
650 |
27409
a0d49e55acae
rename change_directory to directory_changed in event manager
John W. Eaton <jwe@octave.org>
parents:
27392
diff
changeset
|
651 void directory_changed (const std::string& dir) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
652 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
653 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
654 m_instance->directory_changed (dir); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
655 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
656 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
657 // Methods for removing/renaming files which might be open in editor |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
658 void file_remove (const std::string& old_name, const std::string& new_name) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
659 { |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
660 if (application::is_gui_running () && enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
661 m_instance->file_remove (old_name, new_name); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
662 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
663 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
664 void file_renamed (bool load_new) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
665 { |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
666 if (application::is_gui_running () && enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
667 m_instance->file_renamed (load_new); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
668 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
669 |
29233
665c9ed14c97
Set API tags in files in libinterp/corefcn (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29057
diff
changeset
|
670 OCTINTERP_API void set_workspace (void); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
671 |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28788
diff
changeset
|
672 void set_workspace (bool top_level, const symbol_info_list& syminfo, |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
673 bool update_variable_editor = true) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
674 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
675 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
676 m_instance->set_workspace (top_level, m_debugging, syminfo, |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
677 update_variable_editor); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
678 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
679 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
680 void clear_workspace (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
681 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
682 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
683 m_instance->clear_workspace (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
684 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
685 |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
686 void update_prompt (const std::string& prompt) |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
687 { |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
688 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
689 m_instance->update_prompt (prompt); |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
690 } |
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29502
diff
changeset
|
691 |
29775
a64352cadda8
use interpreter events to set initial data for workspace and history widgets
John W. Eaton <jwe@octave.org>
parents:
29624
diff
changeset
|
692 OCTINTERP_API void set_history (void); |
a64352cadda8
use interpreter events to set initial data for workspace and history widgets
John W. Eaton <jwe@octave.org>
parents:
29624
diff
changeset
|
693 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
694 void set_history (const string_vector& hist) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
695 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
696 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
697 m_instance->set_history (hist); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
698 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
699 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
700 void append_history (const std::string& hist_entry) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
701 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
702 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
703 m_instance->append_history (hist_entry); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
704 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
705 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
706 void clear_history (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
707 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
708 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
709 m_instance->clear_history (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
710 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
711 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
712 void pre_input_event (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
713 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
714 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
715 m_instance->pre_input_event (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
716 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
717 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
718 void post_input_event (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
719 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
720 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
721 m_instance->post_input_event (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
722 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
723 |
27392
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
724 void enter_debugger_event (const std::string& fcn_name, |
820a87b87c01
clean up use of interpreter in qt_interpreter_events::enter_debugger_event
John W. Eaton <jwe@octave.org>
parents:
27311
diff
changeset
|
725 const std::string& fcn_file_name, int line) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
726 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
727 if (enabled ()) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
728 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
729 m_debugging = true; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
730 |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
731 m_instance->enter_debugger_event (fcn_name, fcn_file_name, line); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
732 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
733 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
734 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
735 void execute_in_debugger_event (const std::string& file, int line) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
736 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
737 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
738 m_instance->execute_in_debugger_event (file, line); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
739 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
740 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
741 void exit_debugger_event (void) |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
742 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
743 if (enabled () && m_debugging) |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
744 { |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
745 m_debugging = false; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
746 |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
747 m_instance->exit_debugger_event (); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
748 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
749 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
750 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
751 void update_breakpoint (bool insert, const std::string& file, |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
752 int line, const std::string& cond = "") |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
753 { |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
754 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
755 m_instance->update_breakpoint (insert, file, line, cond); |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
756 } |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
757 |
29293
8784f20b9b8c
new interpreter_event to signal that interpreter was interrupted
John W. Eaton <jwe@octave.org>
parents:
29282
diff
changeset
|
758 void interpreter_interrupted (void) |
8784f20b9b8c
new interpreter_event to signal that interpreter was interrupted
John W. Eaton <jwe@octave.org>
parents:
29282
diff
changeset
|
759 { |
8784f20b9b8c
new interpreter_event to signal that interpreter was interrupted
John W. Eaton <jwe@octave.org>
parents:
29282
diff
changeset
|
760 if (enabled ()) |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
761 m_instance->interpreter_interrupted (); |
29293
8784f20b9b8c
new interpreter_event to signal that interpreter was interrupted
John W. Eaton <jwe@octave.org>
parents:
29282
diff
changeset
|
762 } |
8784f20b9b8c
new interpreter_event to signal that interpreter was interrupted
John W. Eaton <jwe@octave.org>
parents:
29282
diff
changeset
|
763 |
27284
1a8762e5662b
remove "do_" prefix from interpreter_events class methods
John W. Eaton <jwe@octave.org>
parents:
27264
diff
changeset
|
764 protected: |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
765 |
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
766 // Semaphore to lock access to the event queue. |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
767 mutex *m_event_queue_mutex; |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
768 |
29282
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
769 // Event Queue. We use a stack so that we can handle evaluation in |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
770 // the debugger when we are executing in server mode. In server |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
771 // mode, code is evaluated from inside the event queue. So when the |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
772 // evaluator reaches a breakpoint, the queue is already locked and |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
773 // executing an event function. We can't just add a new command to the |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
774 // existing queue, so we need another one that can process new |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
775 // events generated at the debug prompt. When execution continues |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
776 // (dbcont or dbstep, for example) we pop the queue and return to |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
777 // the previous point of execution. |
0280fd549502
make debugging possible in server mode
John W. Eaton <jwe@octave.org>
parents:
29254
diff
changeset
|
778 |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
779 std::stack<std::shared_ptr <event_queue>> m_gui_event_queue; |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
780 |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
781 bool m_debugging; |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
782 bool m_link_enabled; |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
783 |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
784 private: |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
785 |
30134
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
786 interpreter& m_interpreter; |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
787 |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
788 // Using a shared_ptr to manage the link_events object ensures that it |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
789 // will be valid until it is no longer needed. |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
790 |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
791 std::shared_ptr<interpreter_events> m_instance; |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
792 |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
793 std::shared_ptr<interpreter_events> m_qt_event_handlers; |
71d738ed015d
maint: use "m_" prefix for member variables in class event_manager.
Rik <rik@octave.org>
parents:
29960
diff
changeset
|
794 |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27262
diff
changeset
|
795 }; |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29836
diff
changeset
|
796 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31528
diff
changeset
|
797 OCTAVE_END_NAMESPACE(octave) |
13541
b48ac9ad8de0
Highly improved separation of model and view classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13522
diff
changeset
|
798 |
20945
9d9270e2f98f
eliminate comments after preprocessor conditionals
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
799 #endif |