Mercurial > octave
annotate libgui/src/m-editor/octave-qscintilla.h @ 29935:fb0436a0c126
maint: Merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 01 Aug 2021 12:18:43 +0200 |
parents | da9c55b3e9fa 9ec1715a9aae |
children | d4d83344d653 |
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 // |
29358
0a5b15007766
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
28985
diff
changeset
|
3 // Copyright (C) 2013-2021 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 //////////////////////////////////////////////////////////////////////// |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
25 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20277
diff
changeset
|
26 #if ! defined (octave_octave_qscintilla_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17635
diff
changeset
|
27 #define octave_octave_qscintilla_h 1 |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
28 |
24187
ff9bd559799b
pop up tooltip message for changing selected words in editor
John W. Eaton <jwe@octave.org>
parents:
24172
diff
changeset
|
29 #include <QContextMenuEvent> |
ff9bd559799b
pop up tooltip message for changing selected words in editor
John W. Eaton <jwe@octave.org>
parents:
24172
diff
changeset
|
30 #include <QKeyEvent> |
ff9bd559799b
pop up tooltip message for changing selected words in editor
John W. Eaton <jwe@octave.org>
parents:
24172
diff
changeset
|
31 #include <QLabel> |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
32 #include <QMenu> |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
27198
diff
changeset
|
33 #include <Qsci/qsciscintilla.h> |
27842
e79999c5d782
fix Qt4 build errors (bug #57420)
John W. Eaton <jwe@octave.org>
parents:
27629
diff
changeset
|
34 #include <QTemporaryFile> |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
35 |
27611
0495b64288f7
use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
27556
diff
changeset
|
36 #include "gui-settings.h" |
27556
410622ac120f
improve run selection from editor (bug #42705)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27412
diff
changeset
|
37 #include "qt-interpreter-events.h" |
410622ac120f
improve run selection from editor (bug #42705)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27412
diff
changeset
|
38 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
39 namespace octave |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
40 { |
27629
8b6e928e0705
in GUI objects, store reference to base_qobject instead of resource_manager
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
41 class base_qobject; |
27620
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27611
diff
changeset
|
42 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
43 class octave_qscintilla : public QsciScintilla |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
44 { |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
45 Q_OBJECT |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
46 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
47 public: |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
48 |
27629
8b6e928e0705
in GUI objects, store reference to base_qobject instead of resource_manager
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
49 octave_qscintilla (QWidget *p, base_qobject& oct_qobj); |
24020
387be1a6c3dc
style fixes for GUI editor
John W. Eaton <jwe@octave.org>
parents:
23771
diff
changeset
|
50 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
51 ~octave_qscintilla (void) = default; |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
52 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
53 enum |
25103
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
54 { |
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
55 ST_NONE = 0, |
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
56 ST_LINE_COMMENT, |
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
57 ST_BLOCK_COMMENT |
078b795c5219
maint: style check C++ ahead of 4.4 release.
Rik <rik@octave.org>
parents:
25054
diff
changeset
|
58 }; |
23236
4cd5f975d26c
automatically add a comment string when line breaking in line comments
Torsten <mttl@mailbox.org>
parents:
23234
diff
changeset
|
59 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
60 virtual void contextMenuEvent (QContextMenuEvent *e); |
29716
da9c55b3e9fa
fix wring row/col indicator in GUI editor when auto intending (bug #60690)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29535
diff
changeset
|
61 virtual void setCursorPosition (int line, int col); |
20277
48d9001bdee3
Avoid HAVE_ macros in header file.
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
62 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
63 void context_help_doc (bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
64 void context_edit (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
65 void context_run (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
66 void get_global_textcursor_pos (QPoint *global_pos, QPoint *local_pos); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
67 bool get_actual_word (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
68 void clear_selection_markers (void); |
28364
44f2d73df4b3
remove trailing spaces without replacing full editor text (bug #58417)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28281
diff
changeset
|
69 QString eol_string (void); |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
70 void get_current_position (int *pos, int *line, int *col); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
71 QStringList comment_string (bool comment = true); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
72 int get_style (int pos = -1); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
73 int is_style_comment (int pos = -1); |
27198
dffdabfd0213
fix cursor position for editor smart indent after keyword (bug #56533)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27133
diff
changeset
|
74 void smart_indent (bool do_smart_indent, int do_auto_close, |
dffdabfd0213
fix cursor position for editor smart indent after keyword (bug #56533)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27133
diff
changeset
|
75 int line, int ind_char_width); |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
76 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
77 void smart_indent_line_or_selected_text (int lineFrom, int lineTo); |
24232
e0bcd17ac070
smart indentation for selections or current line in code editor
John W. Eaton <jwe@octave.org>
parents:
24190
diff
changeset
|
78 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
79 void set_word_selection (const QString& word = QString ()); |
24172
90903d915625
improve handling of selection markers in editor
John W. Eaton <jwe@octave.org>
parents:
24171
diff
changeset
|
80 |
27133
fbe46901ae62
fix editors search and replace in selection (bug #56405)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
26376
diff
changeset
|
81 void show_selection_markers (int l1, int c1, int l2, int c2); |
24172
90903d915625
improve handling of selection markers in editor
John W. Eaton <jwe@octave.org>
parents:
24171
diff
changeset
|
82 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
83 void set_selection_marker_color (const QColor& c); |
24172
90903d915625
improve handling of selection markers in editor
John W. Eaton <jwe@octave.org>
parents:
24171
diff
changeset
|
84 |
28364
44f2d73df4b3
remove trailing spaces without replacing full editor text (bug #58417)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28281
diff
changeset
|
85 void replace_all (const QString& o_str, const QString& n_str, |
44f2d73df4b3
remove trailing spaces without replacing full editor text (bug #58417)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28281
diff
changeset
|
86 bool re, bool cs, bool wo); |
44f2d73df4b3
remove trailing spaces without replacing full editor text (bug #58417)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28281
diff
changeset
|
87 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
88 signals: |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
89 |
29716
da9c55b3e9fa
fix wring row/col indicator in GUI editor when auto intending (bug #60690)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29535
diff
changeset
|
90 void update_rowcol_indicator_signal (int line, int col); |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
91 void execute_command_in_terminal_signal (const QString&); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
92 void create_context_menu_signal (QMenu*); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
93 void context_menu_edit_signal (const QString&); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
94 void qsci_has_focus_signal (bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
95 void status_update (bool, bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
96 void show_doc_signal (const QString&); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
97 void context_menu_break_condition_signal (int); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
98 void context_menu_break_once (int); |
28985
47107a0979cd
avoid repeating last command when using F9 in debug mode (bug #57634)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28281
diff
changeset
|
99 void ctx_menu_run_finished_signal (bool, int, QTemporaryFile*, |
47107a0979cd
avoid repeating last command when using F9 in debug mode (bug #57634)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28281
diff
changeset
|
100 QTemporaryFile*, bool, bool); |
27556
410622ac120f
improve run selection from editor (bug #42705)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27412
diff
changeset
|
101 void focus_console_after_command_signal (void); |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
102 |
29933
9ec1715a9aae
fix missing interpreter event in octave-scintilla
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29358
diff
changeset
|
103 void interpreter_event (const fcn_callback& fcn); |
9ec1715a9aae
fix missing interpreter event in octave-scintilla
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29358
diff
changeset
|
104 void interpreter_event (const meth_callback& meth); |
9ec1715a9aae
fix missing interpreter event in octave-scintilla
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29358
diff
changeset
|
105 |
28798
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
106 public slots: |
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
107 |
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
108 void handle_enter_debug_mode (void); |
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
109 void handle_exit_debug_mode (void); |
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
110 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
111 private slots: |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
112 |
28985
47107a0979cd
avoid repeating last command when using F9 in debug mode (bug #57634)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28281
diff
changeset
|
113 void ctx_menu_run_finished (bool, int, QTemporaryFile*, QTemporaryFile*, |
47107a0979cd
avoid repeating last command when using F9 in debug mode (bug #57634)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28281
diff
changeset
|
114 bool, bool); |
27556
410622ac120f
improve run selection from editor (bug #42705)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27412
diff
changeset
|
115 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
116 void contextmenu_help (bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
117 void contextmenu_doc (bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
118 void contextmenu_help_doc (bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
119 void contextmenu_edit (bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
120 void contextmenu_run (bool); |
27556
410622ac120f
improve run selection from editor (bug #42705)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27412
diff
changeset
|
121 void contextmenu_run_temp_error (void); |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
122 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
123 void contextmenu_break_condition (bool); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
124 void contextmenu_break_once (const QPoint&); |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
125 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
126 void text_changed (void); |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
127 void cursor_position_changed (int, int); |
21158
65827e9cccb8
Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents:
20986
diff
changeset
|
128 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
129 protected: |
18689
fac35875f6eb
update enabled status of undo/redo actions in the editor
Torsten <ttl@justmail.de>
parents:
18687
diff
changeset
|
130 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
131 void focusInEvent (QFocusEvent *focusEvent); |
18684
86eca5d178a6
disable some global shortcuts when editor gets focus to prevent conflicts
Torsten <ttl@justmail.de>
parents:
18460
diff
changeset
|
132 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
133 void show_replace_action_tooltip (void); |
20986
00835323fb44
prevent shortcut ambiguity between main and editor window
Torsten <ttl@justmail.de>
parents:
20791
diff
changeset
|
134 |
28798
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
135 bool event (QEvent *e); |
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
136 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
137 void keyPressEvent (QKeyEvent *e); |
24190
90fe16a3a5a1
improve selection replacement in editor
John W. Eaton <jwe@octave.org>
parents:
24187
diff
changeset
|
138 |
25796
052a0d5dfd2c
Reenable drag and drop of editor text (Bug #54495)
John Donoghue
parents:
25103
diff
changeset
|
139 void dragEnterEvent (QDragEnterEvent *e); |
052a0d5dfd2c
Reenable drag and drop of editor text (Bug #54495)
John Donoghue
parents:
25103
diff
changeset
|
140 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
141 private: |
24187
ff9bd559799b
pop up tooltip message for changing selected words in editor
John W. Eaton <jwe@octave.org>
parents:
24172
diff
changeset
|
142 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
143 void auto_close (int auto_endif, int l, |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
144 const QString& line, QString& first_word); |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
145 |
27629
8b6e928e0705
in GUI objects, store reference to base_qobject instead of resource_manager
John W. Eaton <jwe@octave.org>
parents:
27620
diff
changeset
|
146 base_qobject& m_octave_qobj; |
27620
45bb5bbaf291
don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents:
27611
diff
changeset
|
147 |
28798
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
148 bool m_debug_mode; |
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
149 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
150 QString m_word_at_cursor; |
24172
90903d915625
improve handling of selection markers in editor
John W. Eaton <jwe@octave.org>
parents:
24171
diff
changeset
|
151 |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
152 QString m_selection; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
153 QString m_selection_replacement; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
154 int m_selection_line; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
155 int m_selection_col; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
156 int m_indicator_id; |
28798
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
157 |
82ccc4e69ba3
show value in editor when hovering over variable in debug mode (bug #56990)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28364
diff
changeset
|
158 QFont m_tooltip_font; |
24716
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
159 }; |
2b3e0b570e77
move GUI file editor classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
160 } |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
161 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
162 #endif |