GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
file-editor-interface.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2011-2023 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_file_editor_interface_h)
27 #define octave_file_editor_interface_h 1
28 
29 #include <QMenu>
30 #include <QMenuBar>
31 #include <QToolBar>
32 
33 #include "gui-settings.h"
34 #include "octave-dock-widget.h"
35 
37 
38 class base_qobject;
39 
41 {
42  Q_OBJECT
43 
44 public:
45 
47  : octave_dock_widget ("FileEditor", p, oct_qobj)
48  { }
49 
50  virtual ~file_editor_interface (void) = default;
51 
52  virtual QMenu * get_mru_menu (void) = 0;
53  virtual QMenu * debug_menu (void) = 0;
54  virtual QToolBar * toolbar (void) = 0;
55  virtual QMenuBar * menubar (void) = 0;
56 
58  virtual void handle_enter_debug_mode (void) = 0;
59  virtual void handle_exit_debug_mode (void) = 0;
60 
61  virtual void
62  handle_insert_debugger_pointer_request (const QString& file, int line) = 0;
63 
64  virtual void
65  handle_delete_debugger_pointer_request (const QString& file, int line) = 0;
66 
67  virtual void
68  handle_update_breakpoint_marker_request (bool insert, const QString& file,
69  int line, const QString& cond) = 0;
70 
71  virtual void handle_edit_file_request (const QString& file) = 0;
72 
73  virtual bool check_closing (void) = 0;
74 
75  virtual void empty_script (bool, bool) = 0;
76 
77  virtual void restore_session (gui_settings *) = 0;
78 
79  virtual void enable_menu_shortcuts (bool enable) = 0;
80 
81 signals:
82 
83  void interpreter_event (const fcn_callback& fcn);
84  void interpreter_event (const meth_callback& meth);
85 
86 public slots:
87 
88  virtual void toplevel_change (bool) = 0;
89 
90  virtual void handle_file_remove (const QString& o, const QString& n) = 0;
91 
92  virtual void request_new_file (const QString& command = QString ()) = 0;
93 
94  virtual void request_open_file (const QString& openFileName,
95  const QString& encoding = QString (),
96  int line = -1,
97  bool debug_pointer = false,
98  bool breakpoint_marker = false,
99  bool insert = true,
100  const QString& cond = "",
101  int index = -1,
102  const QString& bookmarks = QString ()) = 0;
103 };
104 
106 
107 #endif
OCTAVE_END_NAMESPACE(octave)
Base class for Octave interfaces that use Qt.
virtual bool check_closing(void)=0
void interpreter_event(const fcn_callback &fcn)
virtual ~file_editor_interface(void)=default
file_editor_interface(QWidget *p, base_qobject &oct_qobj)
virtual void handle_enter_debug_mode(void)=0
virtual QMenuBar * menubar(void)=0
virtual void restore_session(gui_settings *)=0
virtual void handle_edit_file_request(const QString &file)=0
virtual QToolBar * toolbar(void)=0
virtual void toplevel_change(bool)=0
virtual void handle_insert_debugger_pointer_request(const QString &file, int line)=0
virtual void handle_delete_debugger_pointer_request(const QString &file, int line)=0
virtual void enable_menu_shortcuts(bool enable)=0
virtual void request_new_file(const QString &command=QString())=0
virtual void request_open_file(const QString &openFileName, const QString &encoding=QString(), int line=-1, bool debug_pointer=false, bool breakpoint_marker=false, bool insert=true, const QString &cond="", int index=-1, const QString &bookmarks=QString())=0
virtual QMenu * debug_menu(void)=0
virtual void handle_exit_debug_mode(void)=0
virtual void insert_global_actions(QList< QAction * >)=0
virtual void empty_script(bool, bool)=0
virtual void handle_file_remove(const QString &o, const QString &n)=0
void interpreter_event(const meth_callback &meth)
virtual void handle_update_breakpoint_marker_request(bool insert, const QString &file, int line, const QString &cond)=0
virtual QMenu * get_mru_menu(void)=0
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::function< void(void)> fcn_callback
Definition: event-manager.h:43
std::function< void(interpreter &)> meth_callback
Definition: event-manager.h:48
octave_idx_type n
Definition: mx-inlines.cc:753