GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
event-manager.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2011-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_event_manager_h)
27#define octave_event_manager_h 1
28
29#include "octave-config.h"
30
31#include <functional>
32#include <list>
33#include <memory>
34#include <stack>
35#include <string>
36
37#include "oct-mutex.h"
38#include "octave.h"
39#include "event-queue.h"
40#include "uint8NDArray.h"
41
42class octave_value;
43class string_vector;
44
46
47typedef std::function<void ()> fcn_callback;
48typedef std::function<void (interpreter&)> meth_callback;
49
52
53// The methods in this class provide a way to pass signals to the GUI
54// thread. A GUI that wishes to act on these events should derive
55// from this class and perform actions in a thread-safe way. In
56// Octave's Qt-based GUI, for example, these functions are all
57// implemented as wrappers around Qt signals that trigger actions in
58// the GUI. The Qt signal/slot mechanism ensures that the actions are
59// properly queued for execution when the objects corresponding to the
60// signal and slot belong to different threads.
61//
62// These functions should not be called directly. Instead all
63// requests from the interpreter for GUI actions should be done
64// through the event_manager class. That class checks to ensure that
65// the GUI is connected and enabled before calling these virtual
66// functions.
67
68// FIXME: it would be nice if instead of requiring the GUI to derive
69// from this class, it could subscribe to individual events, possibly
70// multiple times. In that way, it would be more flexible and
71// decentralized, similar to the Qt signal/slot connection mechanism
72// and would allow the GUI to connect multiple signals to a single
73// action or multiple actions to a single signal.
74
75// FIXME: audit this list of functions and determine whether they are
76// all necessary and whether there might be better names for them.
77
78class OCTINTERP_API interpreter_events
79{
80public:
81
82 interpreter_events () = default;
83
85
87
88 virtual ~interpreter_events () = default;
89
90 // Note: START_GUI and CLOSE_GUI currently only work with the new
91 // experimental terminal widget.
92
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
95 // from the Octave prompt when Octave is already running as a
96 // command line application.
97
98 virtual void start_gui (bool /*gui_app*/ = false) { }
99 virtual void close_gui () { }
100
101 // Dialogs.
102
103 virtual bool have_dialogs () const { return false; }
104
105 typedef std::list<std::pair<std::string, std::string>> filter_list;
106
107 virtual std::list<std::string>
108 file_dialog (const filter_list& /*filter*/,
109 const std::string& /*title*/,
110 const std::string& /*filename*/,
111 const std::string& /*dirname*/,
112 const std::string& /*multimode*/)
113 {
114 return std::list<std::string> ();
115 }
116
117 virtual std::list<std::string>
118 input_dialog (const std::list<std::string>& /*prompt*/,
119 const std::string& /*title*/,
120 const std::list<float>& /*nr*/,
121 const std::list<float>& /*nc*/,
122 const std::list<std::string>& /*defaults*/)
123 {
124 return std::list<std::string> ();
125 }
126
127 virtual std::pair<std::list<int>, int>
128 list_dialog (const std::list<std::string>& /*list*/,
129 const std::string& /*mode*/, int /*width*/, int /*height*/,
130 const std::list<int>& /*initial_value*/,
131 const std::string& /*name*/,
132 const std::list<std::string>& /*prompt*/,
133 const std::string& /*ok_string*/,
134 const std::string& /*cancel_string*/)
135 {
136 return std::pair<std::list<int>, int> ();
137 }
138
139 virtual std::string
140 question_dialog (const std::string& /*msg*/, const std::string& /*title*/,
141 const std::string& /*btn1*/, const std::string& /*btn2*/,
142 const std::string& /*btn3*/, const std::string& /*btndef*/)
143 {
144 return "";
145 }
146
147 virtual void update_path_dialog () { }
148
149 virtual void show_preferences () { }
150
151 virtual void apply_preferences () { }
152
153 virtual void show_terminal_window () { }
154
155 virtual bool show_documentation (const std::string& /*file*/)
156 {
157 return false;
158 }
159
160 virtual void show_file_browser () { }
161
162 virtual void show_command_history () { }
163
164 virtual void show_workspace () { }
165
166 virtual void show_community_news (int /*serial*/) { }
167 virtual void show_release_notes () { }
168
169 virtual bool edit_file (const std::string& /*file*/) { return false; }
170
171 virtual void
172 edit_variable (const std::string& /*name*/, const octave_value& /*val*/)
173 { }
174
175 // Other requests for user interaction, usually some kind of
176 // confirmation before another action. Could these be reformulated
177 // using the question_dialog action?
178
179 virtual bool confirm_shutdown () { return true; }
180
181 virtual bool prompt_new_edit_file (const std::string& /*file*/)
182 {
183 return false;
184 }
185
186 virtual int
187 debug_cd_or_addpath_error (const std::string& /*file*/,
188 const std::string& /*dir*/,
189 bool /*addpath_option*/)
190 {
191 return -1;
192 }
193
194 // Requests for information normally stored in the GUI.
195
196 virtual uint8NDArray get_named_icon (const std::string& /*icon_name*/)
197 {
198 return uint8NDArray ();
199 }
200
201 virtual std::string gui_preference (const std::string& /*key*/,
202 const std::string& /*value*/)
203 {
204 return "";
205 }
206
207 // Requests for GUI action that do not require user interaction.
208 // These are different from other notifications in that they are not
209 // associated with changes in the interpreter state (like a change
210 // in the current working directory or command history).
211
212 virtual bool copy_image_to_clipboard (const std::string& /*file*/)
213 {
214 return false;
215 }
216
217 virtual void focus_window (const std::string /*win_name*/)
218 { }
219
220 virtual void
221 execute_command_in_terminal (const std::string& /*command*/) { }
222
223 virtual void register_documentation (const std::string& /*file*/) { }
224
225 virtual void unregister_documentation (const std::string& /*file*/) { }
226
227 virtual void interpreter_output (const std::string& /*msg*/) { }
228
229 virtual void display_exception (const execution_exception& ee, bool beep);
230
231 virtual void gui_status_update (const std::string& /*feature*/,
232 const std::string& /*status*/) { }
233
234 virtual void update_gui_lexer () { }
235
236 // Notifications of events in the interpreter that a GUI will
237 // normally wish to respond to.
238
239 virtual void directory_changed (const std::string& /*dir*/) { }
240
241 virtual void
242 file_remove (const std::string& /*old_nm*/, const std::string& /*new_nm*/)
243 { }
244
245 virtual void file_renamed (bool) { }
246
247 virtual void
248 set_workspace (bool /*top_level*/, bool /*debug*/,
249 const symbol_info_list& /*syminfo*/,
250 bool /*update_variable_editor*/)
251 { }
252
253 virtual void clear_workspace () { }
254
255 virtual void update_prompt (const std::string& /*prompt*/) { }
256
257 virtual void set_history (const string_vector& /*hist*/) { }
258
259 virtual void append_history (const std::string& /*hist_entry*/) { }
260
261 virtual void clear_history () { }
262
263 virtual void pre_input_event () { }
264
265 virtual void post_input_event () { }
266
267 virtual void
268 enter_debugger_event (const std::string& /*fcn_name*/,
269 const std::string& /*fcn_file_name*/,
270 int /*line*/)
271 { }
272
273 virtual void
274 execute_in_debugger_event (const std::string& /*file*/, int /*line*/) { }
275
276 virtual void exit_debugger_event () { }
277
278 virtual void
279 update_breakpoint (bool /*insert*/, const std::string& /*file*/,
280 int /*line*/, const std::string& /*cond*/)
281 { }
282
283 virtual void interpreter_interrupted () { }
284};
285
286//! Provides threadsafe access to octave.
287//!
288//! This class provides thread-safe communication between the
289//! interpreter and a GUI.
290
291class OCTINTERP_API event_manager
292{
293public:
294
295 OCTINTERP_API event_manager (interpreter& interp);
296
297 OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (event_manager)
298
299 virtual ~event_manager ();
300
301 // OBJ should be an object of a class that is derived from the base
302 // class interpreter_events, or nullptr to disconnect and delete the
303 // previous link.
304
305 OCTINTERP_API void
306 connect_link (const std::shared_ptr<interpreter_events>& obj);
307
308 OCTINTERP_API bool enable ();
309
310 bool disable ()
311 {
312 bool retval = m_link_enabled;
313 m_link_enabled = false;
314 return retval;
315 }
316
317 bool enabled () const
318 {
319 return m_link_enabled;
320 }
321
322 // Make the Qt actions available for others. This is a temporary
323 // solution to allow Qt actions like opening the documentation
324 // browser when the primary interpreter_events object is not the one
325 // defined for the Qt GUI.
326 void
327 install_qt_event_handlers (const std::shared_ptr<interpreter_events>& obj)
328 {
329 m_qt_event_handlers = obj;
330 }
331
332 std::shared_ptr<interpreter_events>
333 qt_event_handlers () const { return m_qt_event_handlers; }
334
335 // If disable is TRUE, then no additional events will be processed
336 // other than exit.
337
338 OCTINTERP_API void process_events (bool disable = false);
339
340 OCTINTERP_API void discard_events ();
341
342 // The post_event and post_exception functions provide a thread-safe
343 // way for the GUI to queue interpreter functions for execution.
344 // The queued functions are executed when the interpreter is
345 // otherwise idle.
346
347 void push_event_queue ();
348 void pop_event_queue ();
349
350 OCTINTERP_API void post_event (const fcn_callback& fcn);
351 OCTINTERP_API void post_event (const meth_callback& meth);
352
353 // The following functions correspond to the virtual fuunctions in
354 // the interpreter_events class. They provide a way for the
355 // interpreter to notify the GUI that some event has occurred
356 // (directory or workspace changed, for example) or to request the
357 // GUI to perform some action (display a dialog, for example).
358
359 // Please keep this list of declarations in the same order as the
360 // ones above in the interpreter_events class.
361
362
363 // Note: START_GUI and CLOSE_GUI currently only work with the new
364 // experimental terminal object.
365
366 void start_gui (bool gui_app = false)
367 {
368 if (enabled ())
369 m_instance->start_gui (gui_app);
370 }
371
372 void close_gui ()
373 {
374 if (enabled ())
375 m_instance->close_gui ();
376 }
377
378 // Dialogs
379
380 bool have_dialogs () const
381 {
382 return m_qt_event_handlers && m_qt_event_handlers->have_dialogs ();
383 }
384
385 typedef std::list<std::pair<std::string, std::string>> filter_list;
386
387 std::list<std::string>
388 file_dialog (const filter_list& filter, const std::string& title,
389 const std::string& filename, const std::string& dirname,
390 const std::string& multimode)
391 {
392 return (enabled () && have_dialogs ()
393 ? m_instance->file_dialog (filter, title, filename, dirname,
394 multimode)
395 : std::list<std::string> ());
396 }
397
398 std::list<std::string>
399 input_dialog (const std::list<std::string>& prompt,
400 const std::string& title,
401 const std::list<float>& nr,
402 const std::list<float>& nc,
403 const std::list<std::string>& defaults)
404 {
405 return (enabled () && have_dialogs ()
406 ? m_instance->input_dialog (prompt, title, nr, nc, defaults)
407 : std::list<std::string> ());
408 }
409
410 std::pair<std::list<int>, int>
411 list_dialog (const std::list<std::string>& list,
412 const std::string& mode,
413 int width, int height,
414 const std::list<int>& initial_value,
415 const std::string& name,
416 const std::list<std::string>& prompt,
417 const std::string& ok_string,
418 const std::string& cancel_string)
419 {
420 return (enabled () && have_dialogs ()
421 ? m_instance->list_dialog (list, mode, width, height,
422 initial_value, name, prompt,
423 ok_string, cancel_string)
424 : std::pair<std::list<int>, int> ());
425 }
426
427 std::string
428 question_dialog (const std::string& msg, const std::string& title,
429 const std::string& btn1, const std::string& btn2,
430 const std::string& btn3, const std::string& btndef)
431 {
432 return (enabled () && have_dialogs ()
433 ? m_instance->question_dialog (msg, title, btn1,
434 btn2, btn3, btndef)
435 : "");
436 }
437
439 {
440 if (application::is_gui_running () && enabled ())
441 m_instance->update_path_dialog ();
442 }
443
445 {
446 if (enabled ())
447 {
448 m_instance->show_preferences ();
449 return true;
450 }
451 else
452 return false;
453 }
454
456 {
457 if (enabled ())
458 {
459 m_instance->apply_preferences ();
460 return true;
461 }
462 else
463 return false;
464 }
465
467 {
468 if (enabled ())
469 m_instance->show_terminal_window ();
470 }
471
472 bool show_documentation (const std::string& file)
473 {
474 return enabled () ? m_instance->show_documentation (file) : false;
475 }
476
478 {
479 if (enabled ())
480 m_instance->show_file_browser ();
481 }
482
484 {
485 if (enabled ())
486 m_instance->show_command_history ();
487 }
488
490 {
491 if (enabled ())
492 m_instance->show_workspace ();
493 }
494
495 void show_community_news (int serial = -1)
496 {
497 if (enabled ())
498 m_instance->show_community_news (serial);
499 }
500
502 {
503 if (enabled ())
504 m_instance->show_release_notes ();
505 }
506
507 bool edit_file (const std::string& file)
508 {
509 return enabled () ? m_instance->edit_file (file) : false;
510 }
511
512 bool edit_variable (const std::string& name, const octave_value& val)
513 {
514 if (enabled ())
515 {
516 m_instance->edit_variable (name, val);
517 return true;
518 }
519 else
520 return false;
521 }
522
524 {
525 bool retval = true;
526
527 if (enabled ())
528 retval = m_instance->confirm_shutdown ();
529
530 return retval;
531 }
532
533 bool prompt_new_edit_file (const std::string& file)
534 {
535 return enabled () ? m_instance->prompt_new_edit_file (file) : false;
536 }
537
538 int debug_cd_or_addpath_error (const std::string& file,
539 const std::string& dir, bool addpath_option)
540 {
541 return (enabled ()
542 ? m_instance->debug_cd_or_addpath_error (file, dir,
543 addpath_option)
544 : 0);
545 }
546
547 uint8NDArray get_named_icon (const std::string& icon_name)
548 {
549 return (enabled ()
550 ? m_instance->get_named_icon (icon_name) : uint8NDArray ());
551 }
552
553 std::string gui_preference (const std::string& key,
554 const std::string& value)
555 {
556 return enabled () ? m_instance->gui_preference (key, value) : "";
557 }
558
559 bool copy_image_to_clipboard (const std::string& file)
560 {
561 return enabled () ? m_instance->copy_image_to_clipboard (file) : false;
562 }
563
564 virtual void focus_window (const std::string win_name)
565 {
566 if (enabled ())
567 m_instance->focus_window (win_name);
568 }
569
570 // Preserves pending input.
571 void execute_command_in_terminal (const std::string& command)
572 {
573 if (enabled ())
574 m_instance->execute_command_in_terminal (command);
575 }
576
577 bool register_documentation (const std::string& file)
578 {
579 if (enabled ())
580 {
581 m_instance->register_documentation (file);
582 return true;
583 }
584 else
585 return false;
586 }
587
588 bool unregister_documentation (const std::string& file)
589 {
590 if (enabled ())
591 {
592 m_instance->unregister_documentation (file);
593 return true;
594 }
595 else
596 return false;
597 }
598
599 bool interpreter_output (const std::string& msg)
600 {
601 if (enabled ())
602 {
603 m_instance->interpreter_output (msg);
604 return true;
605 }
606 else
607 return false;
608 }
609
610 bool display_exception (const execution_exception& ee, bool beep = false)
611 {
612 if (enabled ())
613 {
614 m_instance->display_exception (ee, beep);
615 return true;
616 }
617 else
618 return false;
619 }
620
621 bool gui_status_update (const std::string& feature,
622 const std::string& status)
623 {
624 if (enabled ())
625 {
626 m_instance->gui_status_update (feature, status);
627 return true;
628 }
629 else
630 return false;
631 }
632
634 {
635 if (enabled ())
636 {
637 m_instance->update_gui_lexer ();
638 return true;
639 }
640 else
641 return false;
642 }
643
644 void directory_changed (const std::string& dir)
645 {
646 if (enabled ())
647 m_instance->directory_changed (dir);
648 }
649
650 // Methods for removing/renaming files which might be open in editor
651 void file_remove (const std::string& old_name, const std::string& new_name)
652 {
653 if (application::is_gui_running () && enabled ())
654 m_instance->file_remove (old_name, new_name);
655 }
656
657 void file_renamed (bool load_new)
658 {
659 if (application::is_gui_running () && enabled ())
660 m_instance->file_renamed (load_new);
661 }
662
663 OCTINTERP_API void set_workspace ();
664
665 void set_workspace (bool top_level, const symbol_info_list& syminfo,
666 bool update_variable_editor = true)
667 {
668 if (enabled ())
669 m_instance->set_workspace (top_level, m_debugging, syminfo,
670 update_variable_editor);
671 }
672
674 {
675 if (enabled ())
676 m_instance->clear_workspace ();
677 }
678
679 void update_prompt (const std::string& prompt)
680 {
681 if (enabled ())
682 m_instance->update_prompt (prompt);
683 }
684
685 OCTINTERP_API void set_history ();
686
687 void set_history (const string_vector& hist)
688 {
689 if (enabled ())
690 m_instance->set_history (hist);
691 }
692
693 void append_history (const std::string& hist_entry)
694 {
695 if (enabled ())
696 m_instance->append_history (hist_entry);
697 }
698
700 {
701 if (enabled ())
702 m_instance->clear_history ();
703 }
704
706 {
707 if (enabled ())
708 m_instance->pre_input_event ();
709 }
710
712 {
713 if (enabled ())
714 m_instance->post_input_event ();
715 }
716
717 void enter_debugger_event (const std::string& fcn_name,
718 const std::string& fcn_file_name, int line)
719 {
720 if (enabled ())
721 {
722 m_debugging = true;
723
724 m_instance->enter_debugger_event (fcn_name, fcn_file_name, line);
725 }
726 }
727
728 void execute_in_debugger_event (const std::string& file, int line)
729 {
730 if (enabled ())
731 m_instance->execute_in_debugger_event (file, line);
732 }
733
735 {
736 if (enabled () && m_debugging)
737 {
738 m_debugging = false;
739
740 m_instance->exit_debugger_event ();
741 }
742 }
743
744 void update_breakpoint (bool insert, const std::string& file,
745 int line, const std::string& cond = "")
746 {
747 if (enabled ())
748 m_instance->update_breakpoint (insert, file, line, cond);
749 }
750
752 {
753 if (enabled ())
754 m_instance->interpreter_interrupted ();
755 }
756
757protected:
758
759 // Semaphore to lock access to the event queue.
761
762 // Event Queue. We use a stack so that we can handle evaluation in
763 // the debugger when we are executing in server mode. In server
764 // mode, code is evaluated from inside the event queue. So when the
765 // evaluator reaches a breakpoint, the queue is already locked and
766 // executing an event function. We can't just add a new command to the
767 // existing queue, so we need another one that can process new
768 // events generated at the debug prompt. When execution continues
769 // (dbcont or dbstep, for example) we pop the queue and return to
770 // the previous point of execution.
771
772 std::stack<std::shared_ptr <event_queue>> m_gui_event_queue;
773
776
777private:
778
779 interpreter& m_interpreter;
780
781 // Using a shared_ptr to manage the link_events object ensures that it
782 // will be valid until it is no longer needed.
783
784 std::shared_ptr<interpreter_events> m_instance;
785
786 std::shared_ptr<interpreter_events> m_qt_event_handlers;
787
788};
789
790OCTAVE_END_NAMESPACE(octave)
791
792#endif
static bool is_gui_running()
Definition octave.h:333
Provides threadsafe access to octave.
void append_history(const std::string &hist_entry)
bool show_documentation(const std::string &file)
void show_terminal_window()
bool show_preferences()
bool apply_preferences()
bool edit_variable(const std::string &name, const octave_value &val)
void file_renamed(bool load_new)
virtual void focus_window(const std::string win_name)
bool update_gui_lexer()
bool register_documentation(const std::string &file)
void show_command_history()
void show_release_notes()
std::string question_dialog(const std::string &msg, const std::string &title, const std::string &btn1, const std::string &btn2, const std::string &btn3, const std::string &btndef)
void enter_debugger_event(const std::string &fcn_name, const std::string &fcn_file_name, int line)
bool confirm_shutdown()
bool unregister_documentation(const std::string &file)
void install_qt_event_handlers(const std::shared_ptr< interpreter_events > &obj)
void execute_command_in_terminal(const std::string &command)
uint8NDArray get_named_icon(const std::string &icon_name)
void post_input_event()
std::list< std::pair< std::string, std::string > > filter_list
void file_remove(const std::string &old_name, const std::string &new_name)
void update_path_dialog()
void set_history(const string_vector &hist)
std::list< std::string > input_dialog(const std::list< std::string > &prompt, const std::string &title, const std::list< float > &nr, const std::list< float > &nc, const std::list< std::string > &defaults)
bool copy_image_to_clipboard(const std::string &file)
bool prompt_new_edit_file(const std::string &file)
std::shared_ptr< interpreter_events > qt_event_handlers() const
void interpreter_interrupted()
void exit_debugger_event()
void directory_changed(const std::string &dir)
mutex * m_event_queue_mutex
void set_workspace(bool top_level, const symbol_info_list &syminfo, bool update_variable_editor=true)
void start_gui(bool gui_app=false)
bool interpreter_output(const std::string &msg)
bool gui_status_update(const std::string &feature, const std::string &status)
bool display_exception(const execution_exception &ee, bool beep=false)
void pre_input_event()
std::string gui_preference(const std::string &key, const std::string &value)
std::pair< std::list< int >, int > list_dialog(const std::list< std::string > &list, const std::string &mode, int width, int height, const std::list< int > &initial_value, const std::string &name, const std::list< std::string > &prompt, const std::string &ok_string, const std::string &cancel_string)
std::stack< std::shared_ptr< event_queue > > m_gui_event_queue
bool have_dialogs() const
void clear_workspace()
void show_community_news(int serial=-1)
bool enabled() const
void show_file_browser()
int debug_cd_or_addpath_error(const std::string &file, const std::string &dir, bool addpath_option)
bool edit_file(const std::string &file)
void update_breakpoint(bool insert, const std::string &file, int line, const std::string &cond="")
void update_prompt(const std::string &prompt)
void execute_in_debugger_event(const std::string &file, int line)
std::list< std::string > file_dialog(const filter_list &filter, const std::string &title, const std::string &filename, const std::string &dirname, const std::string &multimode)
void show_workspace()
virtual void show_preferences()
interpreter_events()=default
virtual void register_documentation(const std::string &)
virtual std::list< std::string > file_dialog(const filter_list &, const std::string &, const std::string &, const std::string &, const std::string &)
virtual void show_command_history()
std::list< std::pair< std::string, std::string > > filter_list
virtual void close_gui()
virtual void enter_debugger_event(const std::string &, const std::string &, int)
virtual void show_file_browser()
virtual void set_workspace(bool, bool, const symbol_info_list &, bool)
virtual void interpreter_output(const std::string &)
virtual std::string gui_preference(const std::string &, const std::string &)
virtual void update_gui_lexer()
virtual void show_community_news(int)
virtual bool copy_image_to_clipboard(const std::string &)
virtual void append_history(const std::string &)
virtual void directory_changed(const std::string &)
virtual bool edit_file(const std::string &)
interpreter_events(const interpreter_events &)=default
virtual bool prompt_new_edit_file(const std::string &)
virtual int debug_cd_or_addpath_error(const std::string &, const std::string &, bool)
virtual std::pair< std::list< int >, int > list_dialog(const std::list< std::string > &, const std::string &, int, int, const std::list< int > &, const std::string &, const std::list< std::string > &, const std::string &, const std::string &)
virtual ~interpreter_events()=default
virtual void update_breakpoint(bool, const std::string &, int, const std::string &)
virtual void clear_workspace()
virtual void update_path_dialog()
virtual void apply_preferences()
virtual void clear_history()
virtual void execute_command_in_terminal(const std::string &)
virtual uint8NDArray get_named_icon(const std::string &)
virtual void interpreter_interrupted()
virtual void file_remove(const std::string &, const std::string &)
virtual void file_renamed(bool)
virtual void update_prompt(const std::string &)
virtual void show_workspace()
virtual void start_gui(bool=false)
virtual void edit_variable(const std::string &, const octave_value &)
virtual void execute_in_debugger_event(const std::string &, int)
virtual std::string question_dialog(const std::string &, const std::string &, const std::string &, const std::string &, const std::string &, const std::string &)
virtual void show_terminal_window()
virtual bool show_documentation(const std::string &)
virtual void post_input_event()
virtual void exit_debugger_event()
virtual void show_release_notes()
virtual bool confirm_shutdown()
virtual std::list< std::string > input_dialog(const std::list< std::string > &, const std::string &, const std::list< float > &, const std::list< float > &, const std::list< std::string > &)
virtual void pre_input_event()
virtual void gui_status_update(const std::string &, const std::string &)
virtual bool have_dialogs() const
virtual void focus_window(const std::string)
virtual void set_history(const string_vector &)
virtual void unregister_documentation(const std::string &)
string_vector & operator=(const string_vector &)=default
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::function< void(interpreter &)> meth_callback
std::function< void()> fcn_callback
std::string dirname(const std::string &path)
Definition file-ops.cc:369
MArray< T > filter(MArray< T > &b, MArray< T > &a, MArray< T > &x, MArray< T > &si, int dim=0)
Definition filter.cc:48
intNDArray< octave_uint8 > uint8NDArray