comparison libgui/src/m-editor/octave-qscintilla.cc @ 31646:c6d54dd31a7e stable

maint: Use macros to begin/end C++ namespaces. * BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h, ButtonGroup.cc, ButtonGroup.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, Object.cc, Object.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, Table.cc, Table.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, annotation-dialog.cc, annotation-dialog.h, gl-select.cc, gl-select.h, qopengl-functions.h, qt-graphics-toolkit.cc, qt-graphics-toolkit.h, QTerminal.h, color-picker.cc, color-picker.h, command-widget.cc, command-widget.h, community-news.cc, community-news.h, dialog.cc, dialog.h, documentation-bookmarks.cc, documentation-bookmarks.h, documentation-dock-widget.cc, documentation-dock-widget.h, documentation.cc, documentation.h, dw-main-window.cc, dw-main-window.h, external-editor-interface.cc, external-editor-interface.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, graphics-init.cc, graphics-init.h, gui-settings.cc, gui-settings.h, gui-utils.cc, gui-utils.h, history-dock-widget.cc, history-dock-widget.h, interpreter-qobject.cc, interpreter-qobject.h, led-indicator.cc, led-indicator.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, marker.cc, marker.h, octave-qscintilla.cc, octave-qscintilla.h, octave-txt-lexer.cc, octave-txt-lexer.h, main-window.cc, main-window.h, news-reader.cc, news-reader.h, octave-dock-widget.cc, octave-dock-widget.h, octave-qobject.cc, octave-qobject.h, qt-application.cc, qt-application.h, qt-interpreter-events.cc, qt-interpreter-events.h, qt-utils.h, release-notes.cc, release-notes.h, resource-manager.cc, resource-manager.h, set-path-dialog.cc, set-path-dialog.h, set-path-model.cc, set-path-model.h, settings-dialog.cc, settings-dialog.h, shortcut-manager.cc, shortcut-manager.h, tab-bar.cc, tab-bar.h, terminal-dock-widget.cc, terminal-dock-widget.h, variable-editor-model.cc, variable-editor-model.h, variable-editor.cc, variable-editor.h, welcome-wizard.cc, welcome-wizard.h, workspace-model.cc, workspace-model.h, workspace-view.cc, workspace-view.h: Use new macros to begin/end C++ namespaces.
author John W. Eaton <jwe@octave.org>
date Tue, 06 Dec 2022 14:37:51 -0500
parents 38b954c0c0c1
children 431f80aba37a 29d734430e5f
comparison
equal deleted inserted replaced
31644:9089bd969b37 31646:c6d54dd31a7e
69 // Return true if CANDIDATE is a "closing" that matches OPENING, 69 // Return true if CANDIDATE is a "closing" that matches OPENING,
70 // such as "end" or "endif" for "if", or "catch" for "try". 70 // such as "end" or "endif" for "if", or "catch" for "try".
71 // Used for testing the last word of an "if" etc. line, 71 // Used for testing the last word of an "if" etc. line,
72 // or the first word of the following line. 72 // or the first word of the following line.
73 73
74 namespace octave 74 OCTAVE_BEGIN_NAMESPACE(octave)
75 { 75
76 static bool 76 static bool
77 is_end (const QString& candidate, const QString& opening) 77 is_end (const QString& candidate, const QString& opening)
78 { 78 {
79 bool retval = false; 79 bool retval = false;
80 80
479 } 479 }
480 480
481 return QStringList ("%"); // should never happen 481 return QStringList ("%"); // should never happen
482 } 482 }
483 483
484
485 // provide the style at a specific position 484 // provide the style at a specific position
486 int octave_qscintilla::get_style (int pos) 485 int octave_qscintilla::get_style (int pos)
487 { 486 {
488 int position; 487 int position;
489 if (pos < 0) 488 if (pos < 0)
744 indent_column -= indent_increment; 743 indent_column -= indent_increment;
745 in_switch = true; 744 in_switch = true;
746 } 745 }
747 746
748 setIndentation (line, indent_column); 747 setIndentation (line, indent_column);
749
750 748
751 int bpos = begin_block_regexp.indexIn (line_text); 749 int bpos = begin_block_regexp.indexIn (line_text);
752 if (bpos > -1) 750 if (bpos > -1)
753 { 751 {
754 // Check for existing end statement in the same line 752 // Check for existing end statement in the same line
1047 if (dbg) 1045 if (dbg)
1048 Fauto_repeat_debug_command (interp, ovl (auto_repeat)); 1046 Fauto_repeat_debug_command (interp, ovl (auto_repeat));
1049 }); 1047 });
1050 } 1048 }
1051 1049
1052
1053 // wrappers for dbstop related context menu items 1050 // wrappers for dbstop related context menu items
1054 1051
1055 // FIXME: Why can't the data be sent as the argument to the function??? 1052 // FIXME: Why can't the data be sent as the argument to the function???
1056 void octave_qscintilla::contextmenu_break_condition (bool) 1053 void octave_qscintilla::contextmenu_break_condition (bool)
1057 { 1054 {
1363 void octave_qscintilla::handle_exit_debug_mode (void) 1360 void octave_qscintilla::handle_exit_debug_mode (void)
1364 { 1361 {
1365 m_debug_mode = false; 1362 m_debug_mode = false;
1366 } 1363 }
1367 1364
1368 } 1365 OCTAVE_END_NAMESPACE(octave)
1369 1366
1370 #endif 1367 #endif