# HG changeset patch # User Rik # Date 1322357105 28800 # Node ID 5820f8ce683e71f1b4726d55848376c004128f97 # Parent d672edef956e0a9df2b294c0fb71475aa37e1dc1 doc: Add undocumented functions to manual for 3.6.0 release * gui.txi: New manual chapter for GUI-related functions * Makefile.am: Add new gui.txi to build * aspell-octave.en.pws: Add new words to spellcheck dictionary * io.txi: Move file I/O dialogs to gui.txi * octave.texi: Add new GUI chapter to manual * strings.txi: Add is_dq_string and is_sq_string to manual * system.txi: Add usejava to manual * guidata.m: Fix incorrect use of @deftypefn * uicontrol.m: Fix incorrect use of @deftypefn * uiresume.m: Fix incorrect use of @deftypefn * uiwait.m: Fix incorrect use of @deftypefn * addpref.m, getpref.m, ispref.m, rmpref.m, setpref.m: Adjust seealso links diff --git a/doc/interpreter/Makefile.am b/doc/interpreter/Makefile.am --- a/doc/interpreter/Makefile.am +++ b/doc/interpreter/Makefile.am @@ -118,6 +118,7 @@ fn-idx.texi \ func.texi \ geometry.texi \ + gui.texi \ gpl.texi \ grammar.texi \ image.texi \ diff --git a/doc/interpreter/doccheck/aspell-octave.en.pws b/doc/interpreter/doccheck/aspell-octave.en.pws --- a/doc/interpreter/doccheck/aspell-octave.en.pws +++ b/doc/interpreter/doccheck/aspell-octave.en.pws @@ -360,6 +360,7 @@ Hankel Hanning hardcode +hardcoding Hauberg HDF hdf @@ -725,6 +726,7 @@ Readline readline recursing +reentrant regex regressor reimported diff --git a/doc/interpreter/gui.txi b/doc/interpreter/gui.txi new file mode 100644 --- /dev/null +++ b/doc/interpreter/gui.txi @@ -0,0 +1,93 @@ +@c Copyright (C) 2011 Rik Wehbring +@c +@c This file is part of Octave. +@c +@c Octave is free software; you can redistribute it and/or modify it +@c under the terms of the GNU General Public License as published by the +@c Free Software Foundation; either version 3 of the License, or (at +@c your option) any later version. +@c +@c Octave is distributed in the hope that it will be useful, but WITHOUT +@c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +@c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +@c for more details. +@c +@c You should have received a copy of the GNU General Public License +@c along with Octave; see the file COPYING. If not, see +@c . + +@node GUI Development +@chapter GUI Development + +Octave is principally a batch or command-line language. However, it does +offer some limited features for constructing graphical interfaces for +interacting with users. + +The GUI elements available are I/O dialogs and a progress bar. For example, +rather than hardcoding a filename for output results a script can open a dialog +box and allow the user to choose a file. Similarly, if a calculation is +expected to take a long time a script can display a progress bar. + +Several utility functions make it possible to store private data for use with +a GUI which will not pollute the user's variable space. + +Finally, a program written in Octave might want to have long term storage of +preferences or state variables. This can be done with user-defined +preferences. + +@menu +* I/O Dialogs:: +* Progress Bar:: +* GUI Utility Functions:: +* User-Defined Preferences:: +@end menu + +@node I/O Dialogs +@section I/O Dialogs + +Simple dialog menus are available for choosing directories or files. They +return a string variable which can then be used with any command requiring +a file name. + +@DOCSTRING(uigetdir) + +@DOCSTRING(uigetfile) + +@DOCSTRING(uiputfile) + +@node Progress Bar +@section Progress Bar +@cindex Progress Bar + +@DOCSTRING(waitbar) + +@node GUI Utility Functions +@section GUI Utility Functions + +These functions do not implement a GUI element but are useful when developing +programs that do. @strong{Warning:} The functions @code{uiwait}, +@code{uiresume}, and @code{waitfor} are only available for the FLTK tooolkit. + +@DOCSTRING(guidata) + +@DOCSTRING(guihandles) + +@DOCSTRING(uiwait) + +@DOCSTRING(uiresume) + +@DOCSTRING(waitfor) + +@node User-Defined Preferences +@section User-Defined Preferences + +@DOCSTRING(addpref) + +@DOCSTRING(getpref) + +@DOCSTRING(ispref) + +@DOCSTRING(rmpref) + +@DOCSTRING(setpref) + diff --git a/doc/interpreter/io.txi b/doc/interpreter/io.txi --- a/doc/interpreter/io.txi +++ b/doc/interpreter/io.txi @@ -28,7 +28,6 @@ @menu * Basic Input and Output:: * C-Style I/O Functions:: -* GUI Dialogs for I/O:: @end menu @node Basic Input and Output @@ -1065,16 +1064,3 @@ @end group @end example -@node GUI Dialogs for I/O -@section GUI Dialogs for I/O - -Simple dialog menus are available for choosing directories or files. They -return a string variable which can then be used when calling any command -requiring a file name. - -@DOCSTRING(uigetdir) - -@DOCSTRING(uigetfile) - -@DOCSTRING(uiputfile) - diff --git a/doc/interpreter/octave.texi b/doc/interpreter/octave.texi --- a/doc/interpreter/octave.texi +++ b/doc/interpreter/octave.texi @@ -213,6 +213,7 @@ * Image Processing:: * Audio Processing:: * Object Oriented Programming:: +* GUI Development:: * System Utilities:: * Packages:: * Dynamically Linked Functions:: @@ -476,7 +477,6 @@ * Basic Input and Output:: * C-Style I/O Functions:: -* GUI Dialogs for I/O:: Basic Input and Output @@ -754,6 +754,13 @@ * Operator Overloading:: * Precedence of Objects:: +GUI Development + +* I/O Dialogs:: +* Progress Bar:: +* GUI Utility Functions:: +* User-Defined Preferences:: + System Utilities * Timing Utilities:: @@ -855,7 +862,7 @@ Reporting Bugs * Bug Criteria:: -* Bug Tracker::ff Where to submit your bug report. +* Bug Tracker:: Where to submit your bug report. * Bug Reporting:: How to report a bug effectively. * Sending Patches:: How to send a patch for Octave. @@ -914,6 +921,7 @@ @include image.texi @include audio.texi @include oop.texi +@include gui.texi @include system.texi @include package.texi diff --git a/doc/interpreter/strings.txi b/doc/interpreter/strings.txi --- a/doc/interpreter/strings.txi +++ b/doc/interpreter/strings.txi @@ -147,6 +147,12 @@ @end group @end example +In scripts the two different string types can be distinguished if necessary +by using @code{is_dq_string} and @code{is_sq_string}. + +@DOCSTRING(is_dq_string) + +@DOCSTRING(is_sq_string) @node Character Arrays @section Character Arrays diff --git a/doc/interpreter/system.txi b/doc/interpreter/system.txi --- a/doc/interpreter/system.txi +++ b/doc/interpreter/system.txi @@ -503,6 +503,8 @@ @DOCSTRING(octave_config_info) +@DOCSTRING(usejava) + @DOCSTRING(getrusage) @node Hashing Functions diff --git a/scripts/plot/guidata.m b/scripts/plot/guidata.m --- a/scripts/plot/guidata.m +++ b/scripts/plot/guidata.m @@ -18,7 +18,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{data} =} guidata (@var{handle}) -## @deftypefnx {Function File} guidata (@var{handle}, @var{data}) +## @deftypefnx {Function File} {} guidata (@var{handle}, @var{data}) ## @end deftypefn ## Author: goffioul diff --git a/scripts/plot/uicontrol.m b/scripts/plot/uicontrol.m --- a/scripts/plot/uicontrol.m +++ b/scripts/plot/uicontrol.m @@ -19,7 +19,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{handle} =} uicontrol ('Name', value, @dots{}) ## @deftypefnx {Function File} {@var{handle} =} uicontrol (@var{parent}, 'Name', value, @dots{}) -## @deftypefnx {Function File} uicontrol (@var{handle}) +## @deftypefnx {Function File} {} uicontrol (@var{handle}) ## @end deftypefn ## Author: goffioul diff --git a/scripts/plot/uiresume.m b/scripts/plot/uiresume.m --- a/scripts/plot/uiresume.m +++ b/scripts/plot/uiresume.m @@ -17,7 +17,7 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} uiresume (@var{h}) +## @deftypefn {Function File} {} uiresume (@var{h}) ## Resume program execution suspended with @code{uiwait}. The handle @var{h} ## must be the same as the on specified in @code{uiwait}. If the handle ## is invalid or there is no @code{uiwait} call pending for the figure diff --git a/scripts/plot/uiwait.m b/scripts/plot/uiwait.m --- a/scripts/plot/uiwait.m +++ b/scripts/plot/uiwait.m @@ -17,9 +17,9 @@ ## . ## -*- texinfo -*- -## @deftypefn {Function File} uiwait -## @deftypefnx {Function File} uiwait (@var{h}) -## @deftypefnx {Function File} uiwait (@var{h}, @var{timeout}) +## @deftypefn {Function File} {} uiwait +## @deftypefnx {Function File} {} uiwait (@var{h}) +## @deftypefnx {Function File} {} uiwait (@var{h}, @var{timeout}) ## Suspend program execution until the figure with handle @var{h} is ## deleted or @code{uiresume} is called. When no figure handle is specified, ## this function uses the current figure. diff --git a/scripts/prefs/addpref.m b/scripts/prefs/addpref.m --- a/scripts/prefs/addpref.m +++ b/scripts/prefs/addpref.m @@ -27,7 +27,7 @@ ## of character strings. The corresponding value @var{val} may be any ## value, or, if @var{pref} is a cell array of strings, @var{val} ## must be a cell array of values with the same size as @var{pref}. -## @seealso{pref, getpref, ispref, rmpref, setpref} +## @seealso{setpref, getpref, ispref, rmpref} ## @end deftypefn ## Author: jwe diff --git a/scripts/prefs/getpref.m b/scripts/prefs/getpref.m --- a/scripts/prefs/getpref.m +++ b/scripts/prefs/getpref.m @@ -37,7 +37,7 @@ ## ## If no arguments are specified, return a structure containing all ## groups of preferences and their values. -## @seealso{addpref, ispref, rmpref, setpref} +## @seealso{addpref, setpref, ispref, rmpref} ## @end deftypefn ## Author: jwe diff --git a/scripts/prefs/ispref.m b/scripts/prefs/ispref.m --- a/scripts/prefs/ispref.m +++ b/scripts/prefs/ispref.m @@ -28,7 +28,7 @@ ## ## If @var{pref} is not specified, return true if the preference ## group @var{group} exists. -## @seealso{addpref, getpref, rmpref, setpref} +## @seealso{getpref, addpref, setpref, rmpref} ## @end deftypefn ## Author: jwe diff --git a/scripts/prefs/rmpref.m b/scripts/prefs/rmpref.m --- a/scripts/prefs/rmpref.m +++ b/scripts/prefs/rmpref.m @@ -30,7 +30,7 @@ ## @var{group}. ## ## It is an error to remove a nonexistent preference or group. -## @seealso{addpref, getpref, rmpref, setpref} +## @seealso{addpref, ispref, setpref, getpref} ## @end deftypefn ## Author: jwe diff --git a/scripts/prefs/setpref.m b/scripts/prefs/setpref.m --- a/scripts/prefs/setpref.m +++ b/scripts/prefs/setpref.m @@ -29,7 +29,7 @@ ## must be a cell array of values with the same size as @var{pref}. ## ## If the named preference or group does not exist, it is added. -## @seealso{pref, getpref, ispref, rmpref, setpref} +## @seealso{addpref, getpref, ispref, rmpref} ## @end deftypefn ## Author: jwe