comparison libinterp/corefcn/event-manager.h @ 31771:21f9b34eb893

maint: Eliminate "(void)" in C++ function prototypes/declarations. * mk-opts.pl, external.txi, embedded.cc, make_int.cc, standalone.cc, standalonebuiltin.cc, BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h, ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h, CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h, ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h, Figure.cc, Figure.h, FigureWindow.cc, FigureWindow.h, GLCanvas.cc, GLCanvas.h, GenericEventNotify.h, KeyMap.cc, ListBoxControl.cc, ListBoxControl.h, Logger.cc, Logger.h, Menu.cc, Menu.h, MenuContainer.h, Object.cc, Object.h, ObjectProxy.cc, ObjectProxy.h, Panel.cc, Panel.h, PopupMenuControl.cc, PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h, PushTool.cc, PushTool.h, RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc, SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h, TextEdit.h, ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h, ToolBar.cc, ToolBar.h, ToolBarButton.cc, ToolBarButton.h, gl-select.cc, gl-select.h, qopengl-functions.h, qt-graphics-toolkit.h, qdialog.cpp, qfontdialog.cpp, qprintdialog_win.cpp, liboctgui-build-info.h, liboctgui-build-info.in.cc, color-picker.cc, color-picker.h, command-widget.cc, command-widget.h, community-news.cc, community-news.h, dialog.cc, dialog.h, documentation-bookmarks.cc, documentation-bookmarks.h, documentation-dock-widget.cc, documentation-dock-widget.h, documentation.cc, documentation.h, dw-main-window.cc, dw-main-window.h, external-editor-interface.cc, external-editor-interface.h, files-dock-widget.cc, files-dock-widget.h, find-files-dialog.cc, find-files-dialog.h, find-files-model.cc, find-files-model.h, gui-preferences.cc, gui-preferences.h, gui-settings.cc, gui-settings.h, history-dock-widget.cc, history-dock-widget.h, interpreter-qobject.cc, interpreter-qobject.h, file-editor-interface.h, file-editor-tab.cc, file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc, find-dialog.h, marker.cc, marker.h, octave-qscintilla.cc, octave-qscintilla.h, octave-txt-lexer.cc, octave-txt-lexer.h, main-window.cc, main-window.h, news-reader.cc, news-reader.h, octave-dock-widget.cc, octave-dock-widget.h, octave-qobject.cc, octave-qobject.h, qt-application.cc, qt-application.h, qt-interpreter-events.cc, qt-interpreter-events.h, release-notes.cc, release-notes.h, set-path-dialog.cc, set-path-dialog.h, set-path-model.cc, set-path-model.h, settings-dialog.cc, settings-dialog.h, shortcuts-tree-widget.cc, shortcuts-tree-widget.h, tab-bar.cc, tab-bar.h, terminal-dock-widget.cc, terminal-dock-widget.h, variable-editor-model.cc, variable-editor-model.h, variable-editor.cc, variable-editor.h, welcome-wizard.cc, welcome-wizard.h, workspace-model.cc, workspace-model.h, workspace-view.cc, workspace-view.h, build-env.h, Cell.cc, Cell.h, __contourc__.cc, __magick_read__.cc, auto-shlib.cc, auto-shlib.h, base-text-renderer.h, bsxfun.cc, c-file-ptr-stream.cc, c-file-ptr-stream.h, call-stack.cc, call-stack.h, debug.cc, defaults.cc, defaults.h, defun.cc, display.cc, display.h, dynamic-ld.cc, dynamic-ld.h, environment.cc, environment.h, error.cc, error.h, errwarn.cc, errwarn.h, event-manager.cc, event-manager.h, event-queue.cc, event-queue.h, fcn-info.cc, fcn-info.h, ft-text-renderer.cc, ft-text-renderer.h, genprops.awk, gh-manager.cc, gh-manager.h, gl-render.cc, gl-render.h, gl2ps-print.cc, graphics-toolkit.h, graphics.cc, graphics.in.h, gtk-manager.cc, gtk-manager.h, help.cc, help.h, hook-fcn.h, input.cc, input.h, interpreter-private.cc, interpreter-private.h, interpreter.cc, interpreter.h, jsondecode.cc, latex-text-renderer.cc, latex-text-renderer.h, load-path.cc, load-path.h, load-save.cc, load-save.h, ls-hdf5.cc, ls-hdf5.h, mxarray.h, oct-errno.h, oct-errno.in.cc, oct-fstrm.cc, oct-fstrm.h, oct-handle.h, oct-hist.cc, oct-hist.h, oct-iostrm.cc, oct-iostrm.h, oct-map.cc, oct-map.h, oct-opengl.h, oct-prcstrm.cc, oct-prcstrm.h, oct-procbuf.cc, oct-procbuf.h, oct-process.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.cc, oct-strstrm.h, oct-tex-lexer.in.ll, pager.cc, pager.h, pr-flt-fmt.cc, pr-flt-fmt.h, pr-output.cc, pr-output.h, procstream.cc, procstream.h, settings.cc, settings.h, sighandlers.cc, sighandlers.h, stack-frame.cc, stack-frame.h, svd.cc, syminfo.cc, syminfo.h, symrec.cc, symrec.h, symscope.cc, symscope.h, symtab.cc, symtab.h, sysdep.cc, sysdep.h, text-engine.cc, text-engine.h, text-renderer.cc, text-renderer.h, toplev.cc, url-handle-manager.cc, url-handle-manager.h, variables.cc, xpow.cc, __init_fltk__.cc, __init_gnuplot__.cc, __ode15__.cc, audiodevinfo.cc, gzip.cc, liboctinterp-build-info.h, liboctinterp-build-info.in.cc, mk-build-env-features.sh, mk-builtins.pl, cdef-class.cc, cdef-class.h, 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-diag.cc, ov-base-diag.h, ov-base-int.cc, ov-base-int.h, ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.cc, ov-base-scalar.h, ov-base-sparse.cc, ov-base-sparse.h, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-bool.cc, ov-bool.h, ov-builtin.cc, ov-builtin.h, ov-cell.cc, ov-cell.h, ov-ch-mat.cc, ov-ch-mat.h, ov-class.cc, ov-class.h, ov-classdef.cc, ov-classdef.h, ov-colon.h, ov-complex.cc, ov-complex.h, ov-cs-list.h, ov-cx-diag.cc, ov-cx-diag.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-dld-fcn.cc, ov-dld-fcn.h, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn.cc, ov-fcn.h, ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-complex.h, ov-flt-cx-diag.cc, ov-flt-cx-diag.h, ov-flt-cx-mat.cc, ov-flt-cx-mat.h, ov-flt-re-diag.cc, ov-flt-re-diag.h, ov-flt-re-mat.cc, ov-flt-re-mat.h, ov-intx.h, ov-java.cc, ov-java.h, ov-lazy-idx.cc, ov-lazy-idx.h, ov-legacy-range.cc, ov-legacy-range.h, ov-magic-int.cc, ov-magic-int.h, ov-mex-fcn.cc, ov-mex-fcn.h, ov-null-mat.cc, ov-null-mat.h, ov-oncleanup.cc, ov-oncleanup.h, ov-perm.cc, ov-perm.h, ov-range.cc, ov-range.h, ov-re-diag.cc, ov-re-diag.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc, ov-struct.h, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov.cc, ov.h, ovl.cc, ovl.h, octave.cc, octave.h, 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.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.h, pt-cbinop.h, pt-cell.h, pt-check.h, pt-classdef.cc, pt-classdef.h, pt-cmd.h, pt-colon.h, 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.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-walk.h, pt.cc, pt.h, token.cc, token.h, usage.h, Array-base.cc, Array.h, CColVector.cc, CColVector.h, CDiagMatrix.cc, CDiagMatrix.h, CMatrix.cc, CMatrix.h, CNDArray.cc, CNDArray.h, CRowVector.cc, CRowVector.h, CSparse.cc, CSparse.h, DiagArray2.cc, DiagArray2.h, MArray.cc, MArray.h, MDiagArray2.h, MSparse.h, MatrixType.cc, MatrixType.h, PermMatrix.cc, PermMatrix.h, Range.cc, Range.h, Sparse-b.cc, Sparse.cc, Sparse.h, boolMatrix.cc, boolMatrix.h, boolNDArray.cc, boolNDArray.h, boolSparse.cc, boolSparse.h, chMatrix.h, chNDArray.h, dColVector.cc, dColVector.h, dDiagMatrix.cc, dDiagMatrix.h, dMatrix.cc, dMatrix.h, dNDArray.cc, dNDArray.h, dRowVector.cc, dRowVector.h, dSparse.cc, dSparse.h, dim-vector.cc, dim-vector.h, fCColVector.cc, fCColVector.h, fCDiagMatrix.cc, fCDiagMatrix.h, fCMatrix.cc, fCMatrix.h, fCNDArray.cc, fCNDArray.h, fCRowVector.cc, fCRowVector.h, fColVector.cc, fColVector.h, fDiagMatrix.cc, fDiagMatrix.h, fMatrix.cc, fMatrix.h, fNDArray.cc, fNDArray.h, fRowVector.cc, fRowVector.h, idx-vector.cc, idx-vector.h, intNDArray.cc, intNDArray.h, liboctave-build-info.h, liboctave-build-info.in.cc, CollocWt.cc, CollocWt.h, DAE.h, DAEFunc.h, DAERT.h, DAERTFunc.h, DASPK.cc, DASPK.h, DASRT.cc, DASRT.h, DASSL.cc, DASSL.h, DET.h, EIG.h, LSODE.cc, LSODE.h, ODE.h, ODEFunc.h, ODES.h, ODESFunc.h, Quad.h, aepbalance.cc, aepbalance.h, base-dae.h, base-de.h, chol.cc, chol.h, eigs-base.cc, fEIG.h, gepbalance.h, gsvd.cc, gsvd.h, hess.h, lu.cc, lu.h, oct-fftw.cc, oct-fftw.h, oct-rand.cc, oct-rand.h, oct-spparms.cc, oct-spparms.h, qr.cc, qr.h, qrp.cc, qrp.h, randmtzig.cc, randmtzig.h, 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.h, base-list.h, caseless-str.h, cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h, data-conv.cc, file-info.h, glob-match.cc, glob-match.h, kpse.cc, kpse.h, lo-array-errwarn.cc, lo-array-errwarn.h, lo-hash.cc, lo-hash.h, lo-ieee.cc, lo-ieee.h, lo-regexp.cc, lo-regexp.h, oct-inttypes.cc, oct-inttypes.h, oct-mutex.cc, oct-mutex.h, oct-refcount.h, oct-shlib.cc, oct-shlib.h, oct-sort.cc, oct-sort.h, oct-sparse.cc, octave-preserve-stream-state.h, pathsearch.cc, pathsearch.h, quit.cc, singleton-cleanup.cc, singleton-cleanup.h, str-vec.cc, str-vec.h, unwind-prot.cc, unwind-prot.h, url-transfer.cc, url-transfer.h, version.cc, version.in.h, cxx-signal-helpers.cc, acinclude.m4, main-cli.cc, main-gui.cc, main.in.cc, mkoctfile.in.cc, octave-build-info.h, octave-build-info.in.cc, octave-config.in.cc, octave-svgconvert.cc, shared-fcns.h: maint: Eliminate "(void)" in C++ function prototypes/declarations.
author Rik <rik@octave.org>
date Tue, 24 Jan 2023 17:19:44 -0800
parents 597f3ee61a48
children febd82d1a8de
comparison
equal deleted inserted replaced
31770:1d1eff97670e 31771:21f9b34eb893
42 class octave_value; 42 class octave_value;
43 class string_vector; 43 class string_vector;
44 44
45 OCTAVE_BEGIN_NAMESPACE(octave) 45 OCTAVE_BEGIN_NAMESPACE(octave)
46 46
47 typedef std::function<void (void)> fcn_callback; 47 typedef std::function<void ()> fcn_callback;
48 typedef std::function<void (interpreter&)> meth_callback; 48 typedef std::function<void (interpreter&)> meth_callback;
49 49
50 class execution_exception; 50 class execution_exception;
51 class symbol_info_list; 51 class symbol_info_list;
52 52
77 77
78 class OCTINTERP_API interpreter_events 78 class OCTINTERP_API interpreter_events
79 { 79 {
80 public: 80 public:
81 81
82 interpreter_events (void) = default; 82 interpreter_events () = default;
83 83
84 interpreter_events (const interpreter_events&) = default; 84 interpreter_events (const interpreter_events&) = default;
85 85
86 interpreter_events& operator = (const interpreter_events&) = default; 86 interpreter_events& operator = (const interpreter_events&) = default;
87 87
88 virtual ~interpreter_events (void) = default; 88 virtual ~interpreter_events () = default;
89 89
90 // Note: START_GUI and CLOSE_GUI currently only work with the new 90 // Note: START_GUI and CLOSE_GUI currently only work with the new
91 // experimental terminal widget. 91 // experimental terminal widget.
92 92
93 // Set GUI_APP to true when starting Octave as a gui application 93 // Set GUI_APP to true when starting Octave as a gui application
94 // (invoked with the --gui option) and false when starting the GUI 94 // (invoked with the --gui option) and false when starting the GUI
95 // from the Octave prompt when Octave is already running as a 95 // from the Octave prompt when Octave is already running as a
96 // command line application. 96 // command line application.
97 97
98 virtual void start_gui (bool /*gui_app*/ = false) { } 98 virtual void start_gui (bool /*gui_app*/ = false) { }
99 virtual void close_gui (void) { } 99 virtual void close_gui () { }
100 100
101 // Dialogs. 101 // Dialogs.
102 102
103 virtual bool have_dialogs (void) const { return false; } 103 virtual bool have_dialogs () const { return false; }
104 104
105 typedef std::list<std::pair<std::string, std::string>> filter_list; 105 typedef std::list<std::pair<std::string, std::string>> filter_list;
106 106
107 virtual std::list<std::string> 107 virtual std::list<std::string>
108 file_dialog (const filter_list& /*filter*/, 108 file_dialog (const filter_list& /*filter*/,
142 const std::string& /*btn3*/, const std::string& /*btndef*/) 142 const std::string& /*btn3*/, const std::string& /*btndef*/)
143 { 143 {
144 return ""; 144 return "";
145 } 145 }
146 146
147 virtual void update_path_dialog (void) { } 147 virtual void update_path_dialog () { }
148 148
149 virtual void show_preferences (void) { } 149 virtual void show_preferences () { }
150 150
151 virtual void apply_preferences (void) { } 151 virtual void apply_preferences () { }
152 152
153 virtual void show_terminal_window (void) { } 153 virtual void show_terminal_window () { }
154 154
155 virtual bool show_documentation (const std::string& /*file*/) 155 virtual bool show_documentation (const std::string& /*file*/)
156 { 156 {
157 return false; 157 return false;
158 } 158 }
159 159
160 virtual void show_file_browser (void) { } 160 virtual void show_file_browser () { }
161 161
162 virtual void show_command_history (void) { } 162 virtual void show_command_history () { }
163 163
164 virtual void show_workspace (void) { } 164 virtual void show_workspace () { }
165 165
166 virtual void show_community_news (int /*serial*/) { } 166 virtual void show_community_news (int /*serial*/) { }
167 virtual void show_release_notes (void) { } 167 virtual void show_release_notes () { }
168 168
169 virtual bool edit_file (const std::string& /*file*/) { return false; } 169 virtual bool edit_file (const std::string& /*file*/) { return false; }
170 170
171 virtual void 171 virtual void
172 edit_variable (const std::string& /*name*/, const octave_value& /*val*/) 172 edit_variable (const std::string& /*name*/, const octave_value& /*val*/)
174 174
175 // Other requests for user interaction, usually some kind of 175 // Other requests for user interaction, usually some kind of
176 // confirmation before another action. Could these be reformulated 176 // confirmation before another action. Could these be reformulated
177 // using the question_dialog action? 177 // using the question_dialog action?
178 178
179 virtual bool confirm_shutdown (void) { return true; } 179 virtual bool confirm_shutdown () { return true; }
180 180
181 virtual bool prompt_new_edit_file (const std::string& /*file*/) 181 virtual bool prompt_new_edit_file (const std::string& /*file*/)
182 { 182 {
183 return false; 183 return false;
184 } 184 }
229 virtual void display_exception (const execution_exception& ee, bool beep); 229 virtual void display_exception (const execution_exception& ee, bool beep);
230 230
231 virtual void gui_status_update (const std::string& /*feature*/, 231 virtual void gui_status_update (const std::string& /*feature*/,
232 const std::string& /*status*/) { } 232 const std::string& /*status*/) { }
233 233
234 virtual void update_gui_lexer (void) { } 234 virtual void update_gui_lexer () { }
235 235
236 // Notifications of events in the interpreter that a GUI will 236 // Notifications of events in the interpreter that a GUI will
237 // normally wish to respond to. 237 // normally wish to respond to.
238 238
239 virtual void directory_changed (const std::string& /*dir*/) { } 239 virtual void directory_changed (const std::string& /*dir*/) { }
248 set_workspace (bool /*top_level*/, bool /*debug*/, 248 set_workspace (bool /*top_level*/, bool /*debug*/,
249 const symbol_info_list& /*syminfo*/, 249 const symbol_info_list& /*syminfo*/,
250 bool /*update_variable_editor*/) 250 bool /*update_variable_editor*/)
251 { } 251 { }
252 252
253 virtual void clear_workspace (void) { } 253 virtual void clear_workspace () { }
254 254
255 virtual void update_prompt (const std::string& /*prompt*/) { } 255 virtual void update_prompt (const std::string& /*prompt*/) { }
256 256
257 virtual void set_history (const string_vector& /*hist*/) { } 257 virtual void set_history (const string_vector& /*hist*/) { }
258 258
259 virtual void append_history (const std::string& /*hist_entry*/) { } 259 virtual void append_history (const std::string& /*hist_entry*/) { }
260 260
261 virtual void clear_history (void) { } 261 virtual void clear_history () { }
262 262
263 virtual void pre_input_event (void) { } 263 virtual void pre_input_event () { }
264 264
265 virtual void post_input_event (void) { } 265 virtual void post_input_event () { }
266 266
267 virtual void 267 virtual void
268 enter_debugger_event (const std::string& /*fcn_name*/, 268 enter_debugger_event (const std::string& /*fcn_name*/,
269 const std::string& /*fcn_file_name*/, 269 const std::string& /*fcn_file_name*/,
270 int /*line*/) 270 int /*line*/)
271 { } 271 { }
272 272
273 virtual void 273 virtual void
274 execute_in_debugger_event (const std::string& /*file*/, int /*line*/) { } 274 execute_in_debugger_event (const std::string& /*file*/, int /*line*/) { }
275 275
276 virtual void exit_debugger_event (void) { } 276 virtual void exit_debugger_event () { }
277 277
278 virtual void 278 virtual void
279 update_breakpoint (bool /*insert*/, const std::string& /*file*/, 279 update_breakpoint (bool /*insert*/, const std::string& /*file*/,
280 int /*line*/, const std::string& /*cond*/) 280 int /*line*/, const std::string& /*cond*/)
281 { } 281 { }
282 282
283 virtual void interpreter_interrupted (void) { } 283 virtual void interpreter_interrupted () { }
284 }; 284 };
285 285
286 //! Provides threadsafe access to octave. 286 //! Provides threadsafe access to octave.
287 //! 287 //!
288 //! This class provides thread-safe communication between the 288 //! This class provides thread-safe communication between the
301 event_manager (const event_manager&) = delete; 301 event_manager (const event_manager&) = delete;
302 302
303 event_manager& 303 event_manager&
304 operator = (const event_manager&) = delete; 304 operator = (const event_manager&) = delete;
305 305
306 virtual ~event_manager (void); 306 virtual ~event_manager ();
307 307
308 // OBJ should be an object of a class that is derived from the base 308 // OBJ should be an object of a class that is derived from the base
309 // class interpreter_events, or nullptr to disconnect and delete the 309 // class interpreter_events, or nullptr to disconnect and delete the
310 // previous link. 310 // previous link.
311 311
312 OCTINTERP_API void 312 OCTINTERP_API void
313 connect_link (const std::shared_ptr<interpreter_events>& obj); 313 connect_link (const std::shared_ptr<interpreter_events>& obj);
314 314
315 OCTINTERP_API bool enable (void); 315 OCTINTERP_API bool enable ();
316 316
317 bool disable (void) 317 bool disable ()
318 { 318 {
319 bool retval = m_link_enabled; 319 bool retval = m_link_enabled;
320 m_link_enabled = false; 320 m_link_enabled = false;
321 return retval; 321 return retval;
322 } 322 }
323 323
324 bool enabled (void) const 324 bool enabled () const
325 { 325 {
326 return m_link_enabled; 326 return m_link_enabled;
327 } 327 }
328 328
329 // Make the Qt actions available for others. This is a temporary 329 // Make the Qt actions available for others. This is a temporary
335 { 335 {
336 m_qt_event_handlers = obj; 336 m_qt_event_handlers = obj;
337 } 337 }
338 338
339 std::shared_ptr<interpreter_events> 339 std::shared_ptr<interpreter_events>
340 qt_event_handlers (void) const { return m_qt_event_handlers; } 340 qt_event_handlers () const { return m_qt_event_handlers; }
341 341
342 // If disable is TRUE, then no additional events will be processed 342 // If disable is TRUE, then no additional events will be processed
343 // other than exit. 343 // other than exit.
344 344
345 OCTINTERP_API void process_events (bool disable = false); 345 OCTINTERP_API void process_events (bool disable = false);
346 346
347 OCTINTERP_API void discard_events (void); 347 OCTINTERP_API void discard_events ();
348 348
349 // The post_event and post_exception functions provide a thread-safe 349 // The post_event and post_exception functions provide a thread-safe
350 // way for the GUI to queue interpreter functions for execution. 350 // way for the GUI to queue interpreter functions for execution.
351 // The queued functions are executed when the interpreter is 351 // The queued functions are executed when the interpreter is
352 // otherwise idle. 352 // otherwise idle.
353 353
354 void push_event_queue (void); 354 void push_event_queue ();
355 void pop_event_queue (void); 355 void pop_event_queue ();
356 356
357 OCTINTERP_API void post_event (const fcn_callback& fcn); 357 OCTINTERP_API void post_event (const fcn_callback& fcn);
358 OCTINTERP_API void post_event (const meth_callback& meth); 358 OCTINTERP_API void post_event (const meth_callback& meth);
359 359
360 // The following functions correspond to the virtual fuunctions in 360 // The following functions correspond to the virtual fuunctions in
374 { 374 {
375 if (enabled ()) 375 if (enabled ())
376 m_instance->start_gui (gui_app); 376 m_instance->start_gui (gui_app);
377 } 377 }
378 378
379 void close_gui (void) 379 void close_gui ()
380 { 380 {
381 if (enabled ()) 381 if (enabled ())
382 m_instance->close_gui (); 382 m_instance->close_gui ();
383 } 383 }
384 384
385 // Dialogs 385 // Dialogs
386 386
387 bool have_dialogs (void) const 387 bool have_dialogs () const
388 { 388 {
389 return m_qt_event_handlers && m_qt_event_handlers->have_dialogs (); 389 return m_qt_event_handlers && m_qt_event_handlers->have_dialogs ();
390 } 390 }
391 391
392 typedef std::list<std::pair<std::string, std::string>> filter_list; 392 typedef std::list<std::pair<std::string, std::string>> filter_list;
440 ? m_instance->question_dialog (msg, title, btn1, 440 ? m_instance->question_dialog (msg, title, btn1,
441 btn2, btn3, btndef) 441 btn2, btn3, btndef)
442 : ""); 442 : "");
443 } 443 }
444 444
445 void update_path_dialog (void) 445 void update_path_dialog ()
446 { 446 {
447 if (application::is_gui_running () && enabled ()) 447 if (application::is_gui_running () && enabled ())
448 m_instance->update_path_dialog (); 448 m_instance->update_path_dialog ();
449 } 449 }
450 450
451 bool show_preferences (void) 451 bool show_preferences ()
452 { 452 {
453 if (enabled ()) 453 if (enabled ())
454 { 454 {
455 m_instance->show_preferences (); 455 m_instance->show_preferences ();
456 return true; 456 return true;
457 } 457 }
458 else 458 else
459 return false; 459 return false;
460 } 460 }
461 461
462 bool apply_preferences (void) 462 bool apply_preferences ()
463 { 463 {
464 if (enabled ()) 464 if (enabled ())
465 { 465 {
466 m_instance->apply_preferences (); 466 m_instance->apply_preferences ();
467 return true; 467 return true;
468 } 468 }
469 else 469 else
470 return false; 470 return false;
471 } 471 }
472 472
473 void show_terminal_window (void) 473 void show_terminal_window ()
474 { 474 {
475 if (enabled ()) 475 if (enabled ())
476 m_instance->show_terminal_window (); 476 m_instance->show_terminal_window ();
477 } 477 }
478 478
479 bool show_documentation (const std::string& file) 479 bool show_documentation (const std::string& file)
480 { 480 {
481 return enabled () ? m_instance->show_documentation (file) : false; 481 return enabled () ? m_instance->show_documentation (file) : false;
482 } 482 }
483 483
484 void show_file_browser (void) 484 void show_file_browser ()
485 { 485 {
486 if (enabled ()) 486 if (enabled ())
487 m_instance->show_file_browser (); 487 m_instance->show_file_browser ();
488 } 488 }
489 489
490 void show_command_history (void) 490 void show_command_history ()
491 { 491 {
492 if (enabled ()) 492 if (enabled ())
493 m_instance->show_command_history (); 493 m_instance->show_command_history ();
494 } 494 }
495 495
496 void show_workspace (void) 496 void show_workspace ()
497 { 497 {
498 if (enabled ()) 498 if (enabled ())
499 m_instance->show_workspace (); 499 m_instance->show_workspace ();
500 } 500 }
501 501
503 { 503 {
504 if (enabled ()) 504 if (enabled ())
505 m_instance->show_community_news (serial); 505 m_instance->show_community_news (serial);
506 } 506 }
507 507
508 void show_release_notes (void) 508 void show_release_notes ()
509 { 509 {
510 if (enabled ()) 510 if (enabled ())
511 m_instance->show_release_notes (); 511 m_instance->show_release_notes ();
512 } 512 }
513 513
525 } 525 }
526 else 526 else
527 return false; 527 return false;
528 } 528 }
529 529
530 bool confirm_shutdown (void) 530 bool confirm_shutdown ()
531 { 531 {
532 bool retval = true; 532 bool retval = true;
533 533
534 if (enabled ()) 534 if (enabled ())
535 retval = m_instance->confirm_shutdown (); 535 retval = m_instance->confirm_shutdown ();
635 } 635 }
636 else 636 else
637 return false; 637 return false;
638 } 638 }
639 639
640 bool update_gui_lexer (void) 640 bool update_gui_lexer ()
641 { 641 {
642 if (enabled ()) 642 if (enabled ())
643 { 643 {
644 m_instance->update_gui_lexer (); 644 m_instance->update_gui_lexer ();
645 return true; 645 return true;
665 { 665 {
666 if (application::is_gui_running () && enabled ()) 666 if (application::is_gui_running () && enabled ())
667 m_instance->file_renamed (load_new); 667 m_instance->file_renamed (load_new);
668 } 668 }
669 669
670 OCTINTERP_API void set_workspace (void); 670 OCTINTERP_API void set_workspace ();
671 671
672 void set_workspace (bool top_level, const symbol_info_list& syminfo, 672 void set_workspace (bool top_level, const symbol_info_list& syminfo,
673 bool update_variable_editor = true) 673 bool update_variable_editor = true)
674 { 674 {
675 if (enabled ()) 675 if (enabled ())
676 m_instance->set_workspace (top_level, m_debugging, syminfo, 676 m_instance->set_workspace (top_level, m_debugging, syminfo,
677 update_variable_editor); 677 update_variable_editor);
678 } 678 }
679 679
680 void clear_workspace (void) 680 void clear_workspace ()
681 { 681 {
682 if (enabled ()) 682 if (enabled ())
683 m_instance->clear_workspace (); 683 m_instance->clear_workspace ();
684 } 684 }
685 685
687 { 687 {
688 if (enabled ()) 688 if (enabled ())
689 m_instance->update_prompt (prompt); 689 m_instance->update_prompt (prompt);
690 } 690 }
691 691
692 OCTINTERP_API void set_history (void); 692 OCTINTERP_API void set_history ();
693 693
694 void set_history (const string_vector& hist) 694 void set_history (const string_vector& hist)
695 { 695 {
696 if (enabled ()) 696 if (enabled ())
697 m_instance->set_history (hist); 697 m_instance->set_history (hist);
701 { 701 {
702 if (enabled ()) 702 if (enabled ())
703 m_instance->append_history (hist_entry); 703 m_instance->append_history (hist_entry);
704 } 704 }
705 705
706 void clear_history (void) 706 void clear_history ()
707 { 707 {
708 if (enabled ()) 708 if (enabled ())
709 m_instance->clear_history (); 709 m_instance->clear_history ();
710 } 710 }
711 711
712 void pre_input_event (void) 712 void pre_input_event ()
713 { 713 {
714 if (enabled ()) 714 if (enabled ())
715 m_instance->pre_input_event (); 715 m_instance->pre_input_event ();
716 } 716 }
717 717
718 void post_input_event (void) 718 void post_input_event ()
719 { 719 {
720 if (enabled ()) 720 if (enabled ())
721 m_instance->post_input_event (); 721 m_instance->post_input_event ();
722 } 722 }
723 723
736 { 736 {
737 if (enabled ()) 737 if (enabled ())
738 m_instance->execute_in_debugger_event (file, line); 738 m_instance->execute_in_debugger_event (file, line);
739 } 739 }
740 740
741 void exit_debugger_event (void) 741 void exit_debugger_event ()
742 { 742 {
743 if (enabled () && m_debugging) 743 if (enabled () && m_debugging)
744 { 744 {
745 m_debugging = false; 745 m_debugging = false;
746 746
753 { 753 {
754 if (enabled ()) 754 if (enabled ())
755 m_instance->update_breakpoint (insert, file, line, cond); 755 m_instance->update_breakpoint (insert, file, line, cond);
756 } 756 }
757 757
758 void interpreter_interrupted (void) 758 void interpreter_interrupted ()
759 { 759 {
760 if (enabled ()) 760 if (enabled ())
761 m_instance->interpreter_interrupted (); 761 m_instance->interpreter_interrupted ();
762 } 762 }
763 763