annotate libgui/src/m-editor/file-editor-tab.h @ 21203:710e700cdd7f

maint: Clean up naming and indentation of #ifdef blocks in libgui Rename guard #ifdef names to use octave_ namespace prefix and file name. Indent #ifdef blocks. * Backend.cc, Backend.h, BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.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, KeyMap.h, ListBoxControl.cc, ListBoxControl.h, Logger.cc, Logger.h, Menu.cc, Menu.h, MenuContainer.h, MouseModeActionGroup.cc, MouseModeActionGroup.h, Object.cc, Object.h, ObjectFactory.cc, ObjectFactory.h, ObjectProxy.cc, ObjectProxy.h, Panel.cc, Panel.h, PopupMenuControl.cc, PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h, PushTool.cc, PushTool.h, QtHandlesUtils.cc, QtHandlesUtils.h, RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc, SliderControl.h, TextControl.cc, TextControl.h, TextEdit.cc, TextEdit.h, ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h, ToolBar.cc, ToolBar.h, ToolBarButton.cc, ToolBarButton.h, __init_qt__.cc, __init_qt__.h, annotation-dialog.cc, annotation-dialog.h, gl-select.cc, gl-select.h, color-picker.cc, color-picker.h, dialog.cc, documentation-dock-widget.cc, documentation-dock-widget.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, history-dock-widget.cc, history-dock-widget.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, octave-qscintilla.cc, octave-txt-lexer.cc, main-window.cc, octave-cmd.cc, octave-dock-widget.cc, octave-gui.cc, octave-interpreter.cc, octave-interpreter.h, octave-qt-link.cc, octave-qt-link.h, parser.cc, webinfo.cc, resource-manager.cc, resource-manager.h, settings-dialog.cc, settings-dialog.h, shortcut-manager.cc, shortcut-manager.h, terminal-dock-widget.cc, terminal-dock-widget.h, thread-manager.cc, welcome-wizard.cc, welcome-wizard.h, workspace-model.cc, workspace-view.cc: Clean up naming and indentation of #ifdef blocks in libgui.
author Rik <rik@octave.org>
date Sat, 06 Feb 2016 07:32:37 -0800
parents 65827e9cccb8
children 40de9f8f23a6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15204
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
1 /*
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
2
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19629
diff changeset
3 Copyright (C) 2011-2015 Jacob Dawid
15204
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
4
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
5 This file is part of Octave.
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
6
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
8 under the terms of the GNU General Public License as published by the
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
10 option) any later version.
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
11
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
15 for more details.
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
16
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
17 You should have received a copy of the GNU General Public License
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
18 along with Octave; see the file COPYING. If not, see
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
19 <http://www.gnu.org/licenses/>.
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
20
359098ad343e update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents: 15196
diff changeset
21 */
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
22
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 20783
diff changeset
23 #if ! defined (octave_file_editor_tab_h)
17822
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17790
diff changeset
24 #define octave_file_editor_tab_h 1
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
25
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
26 #include <QWidget>
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
27 #include <QCloseEvent>
14690
ca733a66be7a Fixed bug with not opening the editor when clicking a file from the file browser. Implemented watching the file on disk.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 14680
diff changeset
28 #include <QFileSystemWatcher>
16413
28136851099a remove _terminal pointer from main_window, it is contained by other Qt object
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 16395
diff changeset
29 #include <QSettings>
16635
25e418d23a4b fix running files from file browser's context menu
Torsten <ttl@justmail.de>
parents: 16570
diff changeset
30 #include <QFileInfo>
16704
e38a0fa08368 fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents: 16638
diff changeset
31 #include <Qsci/qsciapis.h>
17962
4a53bcc1a4ae GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents: 17822
diff changeset
32 #include <QStatusBar>
4a53bcc1a4ae GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents: 17822
diff changeset
33 #include <QLabel>
19249
d10c711a08d8 add a drop down menu with the eol mode in the save-file-as-dialog
Torsten <ttl@justmail.de>
parents: 19247
diff changeset
34 #include <QComboBox>
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
35
21066
258c787cd9ce maint: Use "FIXME:" consistently in code base.
Rik <rik@octave.org>
parents: 21058
diff changeset
36 // FIXME: We should not be including config.h in header files.
21007
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
37 // Only needed for octave_value_list type.
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
38 #ifdef HAVE_CONFIG_H
21203
710e700cdd7f maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents: 21158
diff changeset
39 # include <config.h>
710e700cdd7f maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents: 21158
diff changeset
40 # include "ovl.h"
21007
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
41 #endif
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
42
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
43 #include "find-dialog.h"
16731
01d523d5f796 add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents: 16719
diff changeset
44 #include "octave-qscintilla.h"
18833
6504a1932637 auto completion offers builtins and file functions for octave (bug #41371)
Torsten <ttl@justmail.de>
parents: 18767
diff changeset
45 #include "builtin-defun-decls.h"
21148
e8c3590da9ff update directory in gui after add-path/change-dir dialog
Torsten <ttl@justmail.de>
parents: 21085
diff changeset
46 #include "main-window.h"
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
47
21007
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
48 #include "marker.h" /* Only needed for typedef of "QIntList", which may be
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
49 typedefed elsewhere. Could use common location. */
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
50
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
51
14709
f50591409306 Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 14707
diff changeset
52 class file_editor;
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
53
15402
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
54 class file_editor_tab : public QWidget
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
55 {
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
56 Q_OBJECT
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
57
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
58 public:
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
59
21148
e8c3590da9ff update directory in gui after add-path/change-dir dialog
Torsten <ttl@justmail.de>
parents: 21085
diff changeset
60 file_editor_tab (octave_dock_widget *editor, const QString& directory = "");
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
61
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
62 ~file_editor_tab (void);
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
63
18689
fac35875f6eb update enabled status of undo/redo actions in the editor
Torsten <ttl@justmail.de>
parents: 18687
diff changeset
64 octave_qscintilla *qsci_edit_area () { return _edit_area; }
fac35875f6eb update enabled status of undo/redo actions in the editor
Torsten <ttl@justmail.de>
parents: 18687
diff changeset
65
19411
ed0df431631b allow to cancel exiting if editor tabs are modified and exit is requested in gui
Torsten <ttl@justmail.de>
parents: 19256
diff changeset
66 // Will initiate close if associated with the identifier tag.
19714
21015ca26566 Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 19697
diff changeset
67 bool conditional_close (void);
19411
ed0df431631b allow to cancel exiting if editor tabs are modified and exit is requested in gui
Torsten <ttl@justmail.de>
parents: 19256
diff changeset
68
19714
21015ca26566 Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 19697
diff changeset
69 static void reset_cancel (void) {_cancelled = false;}
21015ca26566 Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 19697
diff changeset
70 static bool was_cancelled (void) {return _cancelled;}
19411
ed0df431631b allow to cancel exiting if editor tabs are modified and exit is requested in gui
Torsten <ttl@justmail.de>
parents: 19256
diff changeset
71
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
72 public slots:
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
73
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
74 void update_window_title (bool modified);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
75 void handle_copy_available (bool enableCopy);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
76 void handle_margin_clicked (int line, int margin,
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
77 Qt::KeyboardModifiers state);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
78
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
79 // Tells the editor tab to react on changed settings.
19770
35a8e1beac8d fix some oddities updating lexer and api-files for auto completion
Torsten <ttl@justmail.de>
parents: 19714
diff changeset
80 void notice_settings (const QSettings *settings, bool init = false);
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
81
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
82 // Change to a different editor tab by identifier tag.
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
83 void change_editor_state (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
84
20713
2469d78a1d8b Consistently use 'filename' rather than 'file name' throughout code base.
Rik <rik@octave.org>
parents: 20414
diff changeset
85 // Simply transmit filename.
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
86 void file_name_query (const QWidget *ID);
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
87
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
88 void set_focus (const QWidget *ID);
19803
415864f5b85f communicating actual working directory to the editor (#44298)
Torsten <ttl@justmail.de>
parents: 19770
diff changeset
89 void set_current_directory (const QString& dir);
17627
811019b9ef57 Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents: 16731
diff changeset
90 void context_help (const QWidget *ID, bool);
17628
99ffa521ecec Add possibility to edit the function related to the actual keyword in editor
Torsten <ttl@justmail.de>
parents: 17627
diff changeset
91 void context_edit (const QWidget *ID);
19714
21015ca26566 Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 19697
diff changeset
92 void check_modified_file (void);
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
93 void save_file (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
94 void save_file (const QWidget *ID, const QString& fileName,
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
95 bool remove_on_success);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
96 void save_file_as (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
97 void print_file (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
98 void run_file (const QWidget *ID);
17635
7945344506ae Add possibility to run selected text of the editor in the terminal
Torsten <ttl@justmail.de>
parents: 17628
diff changeset
99 void context_run (const QWidget *ID);
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
100 void toggle_bookmark (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
101 void next_bookmark (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
102 void previous_bookmark (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
103 void remove_bookmark (const QWidget *ID);
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
104
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
105 void toggle_breakpoint (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
106 void next_breakpoint (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
107 void previous_breakpoint (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
108 void remove_all_breakpoints (const QWidget *ID);
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
109
18656
1b289f45187f add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents: 18560
diff changeset
110 void scintilla_command (const QWidget *, unsigned int);
1b289f45187f add some qscintilla actions to the menu and to the shortcut manager
Torsten <ttl@justmail.de>
parents: 18560
diff changeset
111
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
112 void comment_selected_text (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
113 void uncomment_selected_text (const QWidget *ID);
18303
106da7544504 gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents: 18275
diff changeset
114
106da7544504 gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents: 18275
diff changeset
115 void indent_selected_text (const QWidget *ID);
106da7544504 gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents: 18275
diff changeset
116 void unindent_selected_text (const QWidget *ID);
19247
9582fad68730 add actions for converting the eol characters of the editor file
Torsten <ttl@justmail.de>
parents: 19240
diff changeset
117 void convert_eol (const QWidget *ID, QsciScintilla::EolMode);
18303
106da7544504 gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents: 18275
diff changeset
118
18560
26d15a57f45b add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents: 18555
diff changeset
119 void zoom_in (const QWidget *ID);
26d15a57f45b add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents: 18555
diff changeset
120 void zoom_out (const QWidget *ID);
26d15a57f45b add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents: 18555
diff changeset
121 void zoom_normal (const QWidget *ID);
26d15a57f45b add menu entries and shortcuts for zoom functions in the editor (bug #41516)
Torsten <ttl@justmail.de>
parents: 18555
diff changeset
122
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
123 void find (const QWidget *ID);
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
124 void goto_line (const QWidget *ID, int line = -1);
19629
8ef79bc61d8a add actions for moving/selecting to matching brace
Torsten <ttl@justmail.de>
parents: 19608
diff changeset
125 void move_match_brace (const QWidget *ID, bool select);
18482
3a509de8e791 automatic completion list as user preference (bug #41469)
Torsten <ttl@justmail.de>
parents: 18460
diff changeset
126 void show_auto_completion (const QWidget *ID);
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
127
16395
fc491da603f6 also provide a hook for exiting debugger
John W. Eaton <jwe@octave.org>
parents: 16389
diff changeset
128 void insert_debugger_pointer (const QWidget *ID, int line = -1);
fc491da603f6 also provide a hook for exiting debugger
John W. Eaton <jwe@octave.org>
parents: 16389
diff changeset
129 void delete_debugger_pointer (const QWidget *ID, int line = -1);
fc491da603f6 also provide a hook for exiting debugger
John W. Eaton <jwe@octave.org>
parents: 16389
diff changeset
130
21158
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
131 void do_breakpoint_marker (bool insert, const QWidget *ID, int line = -1,
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
132 const QString& cond = "");
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
133
21054
221847e5f488 fix issues when restoring breakpoints and closing tabs or whole application
Torsten <ttl@justmail.de>
parents: 21045
diff changeset
134 void recover_from_exit (void);
14709
f50591409306 Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 14707
diff changeset
135 void set_modified (bool modified = true);
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
136
20793
f7b0572fff6e allow to select an encoding when opening a file
Torsten <ttl@justmail.de>
parents: 20791
diff changeset
137 void set_encoding (const QString& new_encoding);
f7b0572fff6e allow to select an encoding when opening a file
Torsten <ttl@justmail.de>
parents: 20791
diff changeset
138
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
139 QString load_file (const QString& fileName);
20793
f7b0572fff6e allow to select an encoding when opening a file
Torsten <ttl@justmail.de>
parents: 20791
diff changeset
140
16452
744ff2fe11ce add create script context menu to history window
John Donoghue <john.donoghue@ieee.org>
parents: 16443
diff changeset
141 void new_file (const QString& commands = QString ());
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
142
15300
fd27e10b9b05 pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents: 15204
diff changeset
143 void file_has_changed (const QString& fileName);
14690
ca733a66be7a Fixed bug with not opening the editor when clicking a file from the file browser. Implemented watching the file on disk.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 14680
diff changeset
144
19004
e87e65bc71ae improved finding a function file for editing in gui (bug #41509)
Torsten <ttl@justmail.de>
parents: 18946
diff changeset
145 void handle_context_menu_edit (const QString&);
21158
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
146 void handle_context_menu_break_condition (int linenr);
16731
01d523d5f796 add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents: 16719
diff changeset
147
21158
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
148 void handle_request_add_breakpoint (int line, const QString& cond);
21007
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
149 void handle_request_remove_breakpoint (int line);
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
150
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
151 void handle_octave_result (QObject *requester, QString& command, octave_value_list &result);
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
152
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
153 signals:
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
154
15984
1eb3c67139f6 Add full-length-name tool tip to editor file tab when name is not full length.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15980
diff changeset
155 void file_name_changed (const QString& fileName, const QString& toolTip);
19803
415864f5b85f communicating actual working directory to the editor (#44298)
Torsten <ttl@justmail.de>
parents: 19770
diff changeset
156 void editor_state_changed (bool copy_available, bool is_octave_file);
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
157 void tab_remove_request ();
20796
ed770c16a3e8 also store encoding and tab index with last editor session (bugs #46588, #45688)
Torsten <ttl@justmail.de>
parents: 20793
diff changeset
158 void add_filename_to_list (const QString&, const QString&, QWidget *);
20814
2da4058d65c7 store the encoding of recent editor files in the mru list
Torsten <ttl@justmail.de>
parents: 20796
diff changeset
159 void mru_add_file (const QString& file_name, const QString& encoding);
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
160 void editor_check_conflict_save (const QString& saveFileName,
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
161 bool remove_on_success);
16635
25e418d23a4b fix running files from file browser's context menu
Torsten <ttl@justmail.de>
parents: 16570
diff changeset
162 void run_file_signal (const QFileInfo& info);
19605
d258070914ef open file directly without edit command when editing a function from editor
Torsten <ttl@justmail.de>
parents: 19426
diff changeset
163 void request_open_file (const QString&);
20995
aab7a3c7168e edit a file from an error message in the terminal (bug #35619)
Torsten <ttl@justmail.de>
parents: 20986
diff changeset
164 void edit_mfile_request (const QString&, const QString&,
aab7a3c7168e edit a file from an error message in the terminal (bug #35619)
Torsten <ttl@justmail.de>
parents: 20986
diff changeset
165 const QString&, int);
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
166
21007
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
167 void remove_breakpoint_via_debugger_linenr (int debugger_linenr);
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
168 void request_remove_breakpoint_via_editor_linenr (int editor_linenr);
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
169 void remove_all_breakpoints (void);
21158
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
170 void find_translated_line_number (int original_linenr, int& translated_linenr, marker*&);
21007
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
171 void find_linenr_just_before (int linenr, int& original_linenr, int& editor_linenr);
21158
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
172 void report_marker_linenr (QIntList& lines, QStringList& conditions);
21007
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
173 void remove_position_via_debugger_linenr (int debugger_linenr);
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
174 void remove_all_positions (void);
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
175 // TODO: The following is similar to "process_octave_code" signal. However,
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
176 // currently that signal is connected to something that simply focuses a
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
177 // window and not actually communicate with Octave.
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
178 // void evaluate_octave_command (const QString& command);
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
179
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
180 protected:
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
181
14680
628eeaf879f7 Copy/Paste buttons get greyed out in the editor correctly again. Removed margin in editor tabs and status bar.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 14676
diff changeset
182 void closeEvent (QCloseEvent *event);
15300
fd27e10b9b05 pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents: 15204
diff changeset
183 void set_file_name (const QString& fileName);
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
184
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
185 private slots:
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
186
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
187 // When user closes message box for reload question.
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
188 void handle_file_reload_answer (int decision);
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
189
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
190 // When user closes message box for resave question.
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
191 void handle_file_resave_answer (int decision);
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
192
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
193 // When user closes message box for modified question.
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
194 void handle_file_modified_answer (int decision);
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
195
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
196 // When user closes find_dialog box.
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
197 void handle_find_dialog_finished (int decision);
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
198
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
199 // When user closes QFileDialog box.
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
200 void handle_save_file_as_answer (const QString& fileName);
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
201 void handle_save_file_as_answer_close (const QString& fileName);
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
202 void handle_save_file_as_answer_cancel ();
19256
ce9bd5ed44d2 usage of default suffix depending on filter in save as dialog (bug #43335)
Torsten <ttl@justmail.de>
parents: 19249
diff changeset
203 void handle_save_as_filter_selected (const QString& filter);
19249
d10c711a08d8 add a drop down menu with the eol mode in the save-file-as-dialog
Torsten <ttl@justmail.de>
parents: 19247
diff changeset
204 void handle_combo_eol_current_index (int index);
20774
5c5e085a1ae6 allow selecting an encoding when saving a file (bug #45688)
Torsten <ttl@justmail.de>
parents: 20713
diff changeset
205 void handle_combo_enc_current_index (QString text);
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
206
16704
e38a0fa08368 fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents: 16638
diff changeset
207 // When apis preparation has finished and is ready to save
e38a0fa08368 fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents: 16638
diff changeset
208 void save_apis_info ();
e38a0fa08368 fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents: 16638
diff changeset
209
16716
23b5dde25367 make octave lexer the default and dynamically set margin width for line numbers
Torsten <ttl@justmail.de>
parents: 16715
diff changeset
210 // When the numer of lines changes -> adapt width of margin
23b5dde25367 make octave lexer the default and dynamically set margin width for line numbers
Torsten <ttl@justmail.de>
parents: 16715
diff changeset
211 void auto_margin_width ();
23b5dde25367 make octave lexer the default and dynamically set margin width for line numbers
Torsten <ttl@justmail.de>
parents: 16715
diff changeset
212
17962
4a53bcc1a4ae GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents: 17822
diff changeset
213 void handle_cursor_moved (int line, int col);
20414
046904b54dc4 editor with smart indentation for octave files (bug #41554)
Torsten <ttl@justmail.de>
parents: 19803
diff changeset
214 void handle_lines_changed (void);
17962
4a53bcc1a4ae GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents: 17822
diff changeset
215
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
216 private:
15402
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
217
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
218 struct bp_info
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
219 {
21158
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
220 bp_info (const QString& fname, int l = 0, const QString& cond = "");
15402
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
221
18237
f26d527c1a71 allow the gui editor to set breakpoints in class methods (bug #41126)
John W. Eaton <jwe@octave.org>
parents: 18082
diff changeset
222 int line;
16547
3cd80afc3509 improve debugging with the GUI
John W. Eaton <jwe@octave.org>
parents: 16452
diff changeset
223 std::string file;
16568
477bfd5d95f5 use dir, not path, to refer to directory name
John W. Eaton <jwe@octave.org>
parents: 16558
diff changeset
224 std::string dir;
15402
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
225 std::string function_name;
21158
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
226 std::string condition;
15402
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
227 };
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
228
17979
a761ba02a52f some code cleanup in file_editor_tab
Torsten <ttl@justmail.de>
parents: 17973
diff changeset
229 bool valid_file_name (const QString& file=QString ());
21054
221847e5f488 fix issues when restoring breakpoints and closing tabs or whole application
Torsten <ttl@justmail.de>
parents: 21045
diff changeset
230 void save_file (const QString& saveFileName, bool remove_on_success = false,
221847e5f488 fix issues when restoring breakpoints and closing tabs or whole application
Torsten <ttl@justmail.de>
parents: 21045
diff changeset
231 bool restore_breakpoints = true);
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
232 void save_file_as (bool remove_on_success = false);
18318
770c525a1a2b Warn when saving/running a script whose name is not a valid identifier.
Julien Bect <julien.bect@supelec.fr>
parents: 18303
diff changeset
233 bool check_valid_identifier (QString file_name);
20783
b6091735f3f5 warning when saving editor file with a codec not suited for current contents
Torsten <ttl@justmail.de>
parents: 20774
diff changeset
234 bool check_valid_codec (QTextCodec *codec);
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
235
21058
759fcdf3666d Test GUI marker flags correctly, and omit unnecessary test finding next marker
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21054
diff changeset
236 bool unchanged_or_saved (void);
21007
0a09c3cae800 New marker class for modified file breakpoint and position maintenance.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 20995
diff changeset
237
14869
db3c84d38345 Now supporting c/cc/cpp syntax highlighting.
Jacob Dawid <jacob.dawid@gmail.com>
parents: 14829
diff changeset
238 void update_lexer ();
14827
6b90737f69cc Very basic breakpoint setting and removing in the editor works.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 14825
diff changeset
239
19714
21015ca26566 Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 19697
diff changeset
240 void show_dialog (QDialog *dlg, bool modal);
16018
e0df71fbe39b gui: clearer message box with cancel button when closing an unsaved editor file
Torsten <ttl@justmail.de>
parents: 15984
diff changeset
241 int check_file_modified ();
14709
f50591409306 Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 14707
diff changeset
242 void do_comment_selected_text (bool comment);
16719
0f6f14e3ac6a commenting selected lines in the editor uses comment string depending on lexer
Torsten <ttl@justmail.de>
parents: 16716
diff changeset
243 QString comment_string (const QString&);
18303
106da7544504 gui: Add indent/unindent edit menu to editor (Bug #41223)
John Donoghue <john.donoghue@ieee.org>
parents: 18275
diff changeset
244 void do_indent_selected_text (bool indent);
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
245
15402
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
246 void add_breakpoint_callback (const bp_info& info);
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
247 void remove_breakpoint_callback (const bp_info& info);
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
248 void remove_all_breakpoints_callback (const bp_info& info);
21054
221847e5f488 fix issues when restoring breakpoints and closing tabs or whole application
Torsten <ttl@justmail.de>
parents: 21045
diff changeset
249 void check_restore_breakpoints (void);
21044
e2fdbdd00ef9 center line when setting a breakpoint only if line is at top or at bottom
Torsten <ttl@justmail.de>
parents: 21007
diff changeset
250 void center_current_line (bool always=true);
15402
7f423c6111c6 refactor GUI event handling to use new event_queue class
John W. Eaton <jwe@octave.org>
parents: 15388
diff changeset
251
18833
6504a1932637 auto completion offers builtins and file functions for octave (bug #41371)
Torsten <ttl@justmail.de>
parents: 18767
diff changeset
252 void add_octave_apis (octave_value_list key_ovl);
18834
0e6f7b5f6556 propose function name as file name when saving a new file (bug #42568)
Torsten <ttl@justmail.de>
parents: 18833
diff changeset
253 QString get_function_name ();
18833
6504a1932637 auto completion offers builtins and file functions for octave (bug #41371)
Torsten <ttl@justmail.de>
parents: 18767
diff changeset
254
20414
046904b54dc4 editor with smart indentation for octave files (bug #41554)
Torsten <ttl@justmail.de>
parents: 19803
diff changeset
255 void do_smart_indent (void);
046904b54dc4 editor with smart indentation for octave files (bug #41554)
Torsten <ttl@justmail.de>
parents: 19803
diff changeset
256
19237
c766a1f63c40 detect eol mode when opening a file in the editor of the gui (#bug 43334)
Torsten <ttl@justmail.de>
parents: 18237
diff changeset
257 QsciScintilla::EolMode detect_eol_mode ();
c766a1f63c40 detect eol mode when opening a file in the editor of the gui (#bug 43334)
Torsten <ttl@justmail.de>
parents: 18237
diff changeset
258 void update_eol_indicator ();
c766a1f63c40 detect eol mode when opening a file in the editor of the gui (#bug 43334)
Torsten <ttl@justmail.de>
parents: 18237
diff changeset
259
16731
01d523d5f796 add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents: 16719
diff changeset
260 octave_qscintilla *_edit_area;
21148
e8c3590da9ff update directory in gui after add-path/change-dir dialog
Torsten <ttl@justmail.de>
parents: 21085
diff changeset
261 main_window *_main_win;
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
262
17962
4a53bcc1a4ae GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents: 17822
diff changeset
263 QStatusBar *_status_bar;
4a53bcc1a4ae GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents: 17822
diff changeset
264 QLabel *_row_indicator;
4a53bcc1a4ae GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents: 17822
diff changeset
265 QLabel *_col_indicator;
19237
c766a1f63c40 detect eol mode when opening a file in the editor of the gui (#bug 43334)
Torsten <ttl@justmail.de>
parents: 18237
diff changeset
266 QLabel *_eol_indicator;
20774
5c5e085a1ae6 allow selecting an encoding when saving a file (bug #45688)
Torsten <ttl@justmail.de>
parents: 20713
diff changeset
267 QLabel *_enc_indicator;
17962
4a53bcc1a4ae GUI: Add statusbar with line/col indicator to editor window (Bug #40626)
John Donoghue <john.donoghue@ieee.org>
parents: 17822
diff changeset
268
19249
d10c711a08d8 add a drop down menu with the eol mode in the save-file-as-dialog
Torsten <ttl@justmail.de>
parents: 19247
diff changeset
269 QsciScintilla::EolMode _save_as_desired_eol;
d10c711a08d8 add a drop down menu with the eol mode in the save-file-as-dialog
Torsten <ttl@justmail.de>
parents: 19247
diff changeset
270
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
271 QString _file_name;
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
272 QString _file_name_short;
19803
415864f5b85f communicating actual working directory to the editor (#44298)
Torsten <ttl@justmail.de>
parents: 19770
diff changeset
273 QString _ced;
20774
5c5e085a1ae6 allow selecting an encoding when saving a file (bug #45688)
Torsten <ttl@justmail.de>
parents: 20713
diff changeset
274 QString _encoding;
5c5e085a1ae6 allow selecting an encoding when saving a file (bug #45688)
Torsten <ttl@justmail.de>
parents: 20713
diff changeset
275 QString _new_encoding;
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
276
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
277 bool _long_title;
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
278 bool _copy_available;
18767
095fdef3d67c use editors run selection action for the context menu
Torsten <ttl@justmail.de>
parents: 18689
diff changeset
279 bool _is_octave_file;
18946
0be65bd7f369 add an user preference for loading changed files without a prompt (bug #42678)
Torsten <ttl@justmail.de>
parents: 18837
diff changeset
280 bool _always_reload_changed_files;
20414
046904b54dc4 editor with smart indentation for octave files (bug #41554)
Torsten <ttl@justmail.de>
parents: 19803
diff changeset
281 bool _smart_indent;
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
282
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
283 QFileSystemWatcher _file_system_watcher;
15848
424edeca3c66 Redo portions of file editor to use more signals/slots rather than casting.
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 15425
diff changeset
284
21158
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
285 QIntList _bp_lines;
65827e9cccb8 Gui support for enhancement of dbstop.
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21148
diff changeset
286 QStringList _bp_conditions;
21054
221847e5f488 fix issues when restoring breakpoints and closing tabs or whole application
Torsten <ttl@justmail.de>
parents: 21045
diff changeset
287
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
288 find_dialog *_find_dialog;
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
289 bool _find_dialog_is_visible;
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
290 QRect _find_dialog_geometry;
16704
e38a0fa08368 fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents: 16638
diff changeset
291
e38a0fa08368 fix restoring editor files from previous session and speedup lexer preparation
Torsten <ttl@justmail.de>
parents: 16638
diff changeset
292 QsciAPIs *_lexer_apis;
16715
96ed7ab44e2e save prepared apis info for qscintilla into a path depending on octave version
Torsten <ttl@justmail.de>
parents: 16704
diff changeset
293 QString _prep_apis_file;
19714
21015ca26566 Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 19697
diff changeset
294
21015ca26566 Restructure shutdown flow and behavior for improved robustness
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 19697
diff changeset
295 static bool _cancelled;
20414
046904b54dc4 editor with smart indentation for octave files (bug #41554)
Torsten <ttl@justmail.de>
parents: 19803
diff changeset
296
046904b54dc4 editor with smart indentation for octave files (bug #41554)
Torsten <ttl@justmail.de>
parents: 19803
diff changeset
297 int _line;
046904b54dc4 editor with smart indentation for octave files (bug #41554)
Torsten <ttl@justmail.de>
parents: 19803
diff changeset
298 int _col;
046904b54dc4 editor with smart indentation for octave files (bug #41554)
Torsten <ttl@justmail.de>
parents: 19803
diff changeset
299 bool _lines_changed;
14676
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
300 };
35512b788af2 Editor can now handle multiple files in tabs.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
301
16558
5fc1ce2947bd style fixes
John W. Eaton <jwe@octave.org>
parents: 16547
diff changeset
302 #endif