comparison libgui/src/m-editor/octave-qscintilla.h @ 24232:e0bcd17ac070

smart indentation for selections or current line in code editor * file-editor.h, file-editor.cc (file_editor::fetab_smart_indent_line_or_selected_text): New signal. (file_editor::request_smart_indent_line_or_selected_text): New slot. (file_editor::m_smart_indent_line_or_selection_action): New menu action. (file_editor::construct): Create action. (file_editor::check_actions): Enable it. (file_editor::set_shortcuts): Define a shortcut for it. (file_editor::add_file_editor_tab): Connect fetab_smart_indent_line_or_selected_text signal to smart_indent_line_or_selected_text slot. * file-editor-tab.h, file-editor-tab.cc (file_editor_tab::smart_indent_line_or_selected_text): New slot. (file_editor_tab::do_smart_indent_line_or_selected_text): New function. * octave-qscintilla.h, octave-qscintilla.cc (octave_qscintilla::smart_indent_line_or_selected_text): New function.
author John W. Eaton <jwe@octave.org>
date Tue, 14 Nov 2017 16:52:42 -0500
parents 90fe16a3a5a1
children 8cb985e362f3
comparison
equal deleted inserted replaced
24231:6bd7d2eb6434 24232:e0bcd17ac070
61 QString comment_string (void); 61 QString comment_string (void);
62 int get_style (int pos = -1); 62 int get_style (int pos = -1);
63 int is_style_comment (int pos = -1); 63 int is_style_comment (int pos = -1);
64 void smart_indent (bool do_smart_indent, int do_auto_close, int line); 64 void smart_indent (bool do_smart_indent, int do_auto_close, int line);
65 65
66 void smart_indent_line_or_selected_text (int lineFrom, int lineTo);
67
66 void set_word_selection (const QString& word = QString ()); 68 void set_word_selection (const QString& word = QString ());
67 69
68 void show_selection_markers (int line, int col, int len); 70 void show_selection_markers (int line, int col, int len);
69 71
70 void set_selection_marker_color (const QColor& c); 72 void set_selection_marker_color (const QColor& c);