changeset 27688:7e6836784575

doc: Move commandwind() function and friends to new section of manual (bug #57213). * gui.txi: Create new section "Octave Workspace Windows". Document what these functions are for. Move DOCSTRING entries for commandhistory, commandwindow, filebrowser, workspace to new section. * octave.texi: Add new section "Octave Workspace Windows" to GUI @menu. * event-manager.cc (Fcommandhistory, Fcommandwindow, Ffilebrowser, Fworkspace): Add @seealso links between the various functions. Alphabetize their appearance in the code for clarity.
author Rik <rik@octave.org>
date Thu, 14 Nov 2019 11:14:25 -0800
parents 2e988d51e401
children 4f32af6abd4b
files doc/interpreter/gui.txi doc/interpreter/octave.texi libinterp/corefcn/event-manager.cc
diffstat 3 files changed, 51 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/gui.txi	Wed Nov 13 22:56:33 2019 +0100
+++ b/doc/interpreter/gui.txi	Thu Nov 14 11:14:25 2019 -0800
@@ -44,6 +44,7 @@
 * UI Elements::
 * GUI Utility Functions::
 * User-Defined Preferences::
+* Octave Workspace Windows::
 @end menu
 
 @node I/O Dialogs
@@ -142,15 +143,6 @@
 
 @DOCSTRING(movegui)
 
-@c Not sure where this should go...
-@DOCSTRING(commandhistory)
-
-@DOCSTRING(commandwindow)
-
-@DOCSTRING(filebrowser)
-
-@DOCSTRING(workspace)
-
 @DOCSTRING(openvar)
 
 @DOCSTRING(uiwait)
@@ -175,3 +167,20 @@
 @DOCSTRING(prefdir)
 
 @DOCSTRING(preferences)
+
+@node Octave Workspace Windows
+@section Octave Workspace Windows
+
+The functions below make windows that are a part of Octave's own GUI interface
+visible, and move the keyboard focus to the selected window.  Their utility
+lies in the ability to call these functions from a script and highlight a
+window without using a mouse for selection.
+
+@DOCSTRING(commandhistory)
+
+@DOCSTRING(commandwindow)
+
+@DOCSTRING(filebrowser)
+
+@DOCSTRING(workspace)
+
--- a/doc/interpreter/octave.texi	Wed Nov 13 22:56:33 2019 +0100
+++ b/doc/interpreter/octave.texi	Thu Nov 14 11:14:25 2019 -0800
@@ -809,6 +809,7 @@
 * UI Elements::
 * GUI Utility Functions::
 * User-Defined Preferences::
+* Octave Workspace Windows::
 
 System Utilities
 
--- a/libinterp/corefcn/event-manager.cc	Wed Nov 13 22:56:33 2019 +0100
+++ b/libinterp/corefcn/event-manager.cc	Thu Nov 14 11:14:25 2019 -0800
@@ -592,24 +592,11 @@
   return ovl ();
 }
 
-DEFMETHOD (commandwindow, interp, args, ,
-           doc: /* -*- texinfo -*-
-@deftypefn {} {} commandwindow ()
-Show the GUI command window and give it the keyboard focus.
-@end deftypefn */)
-{
-  if (args.length () != 0)
-    print_usage ();
-
-  octave::event_manager& evmgr = interp.get_event_manager ();
-  evmgr.focus_window ("command");
-  return ovl ();
-}
-
 DEFMETHOD (commandhistory, interp, args, ,
            doc: /* -*- texinfo -*-
 @deftypefn {} {} commandhistory ()
 Show the GUI command history window and give it the keyboard focus.
+@seealso{commandwindow, filebrowser, workspace} 
 @end deftypefn */)
 {
   if (args.length () != 0)
@@ -620,10 +607,41 @@
   return ovl ();
 }
 
+DEFMETHOD (commandwindow, interp, args, ,
+           doc: /* -*- texinfo -*-
+@deftypefn {} {} commandwindow ()
+Show the GUI command window and give it the keyboard focus.
+@seealso{commandhistory, filebrowser, workspace} 
+@end deftypefn */)
+{
+  if (args.length () != 0)
+    print_usage ();
+
+  octave::event_manager& evmgr = interp.get_event_manager ();
+  evmgr.focus_window ("command");
+  return ovl ();
+}
+
+DEFMETHOD (filebrowser, interp, args, ,
+           doc: /* -*- texinfo -*-
+@deftypefn {} {} filebrowser ()
+Show the GUI file browser window and give it the keyboard focus.
+@seealso{commandwindow, commandhistory, workspace} 
+@end deftypefn */)
+{
+  if (args.length () != 0)
+    print_usage ();
+
+  octave::event_manager& evmgr = interp.get_event_manager ();
+  evmgr.focus_window ("filebrowser");
+  return ovl ();
+}
+
 DEFMETHOD (workspace, interp, args, ,
            doc: /* -*- texinfo -*-
 @deftypefn {} {} workspace ()
 Show the GUI workspace window and give it the keyboard focus.
+@seealso{commandwindow, commandhistory, filebrowser} 
 @end deftypefn */)
 {
   if (args.length () != 0)
@@ -633,17 +651,3 @@
   evmgr.focus_window ("workspace");
   return ovl ();
 }
-
-DEFMETHOD (filebrowser, interp, args, ,
-           doc: /* -*- texinfo -*-
-@deftypefn {} {} filebrowser ()
-Show the GUI file browser window and give it the keyboard focus.
-@end deftypefn */)
-{
-  if (args.length () != 0)
-    print_usage ();
-
-  octave::event_manager& evmgr = interp.get_event_manager ();
-  evmgr.focus_window ("filebrowser");
-  return ovl ();
-}