annotate Doc/mac/libmacui.tex @ 21467:4e35fa5d5708 legacy-trunk

Add documentation for the help() built-in; contributed by Ka-Ping Yee. This is part of SF patch #494622.
author Fred Drake <fdrake@acm.org>
date Tue, 18 Dec 2001 16:31:08 +0000
parents 486a31d8a3b3
children a0b352e76862 4c0ab5d6a63c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8915
552c6b3aba3d New style section headers.
Fred Drake <fdrake@acm.org>
parents: 8715
diff changeset
1 \section{\module{EasyDialogs} ---
10334
61224459bb09 Added \platform annotations.
Fred Drake <fdrake@acm.org>
parents: 8915
diff changeset
2 Basic Macintosh dialogs}
61224459bb09 Added \platform annotations.
Fred Drake <fdrake@acm.org>
parents: 8915
diff changeset
3
8715
c750c7a21e03 Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents: 7866
diff changeset
4 \declaremodule{standard}{EasyDialogs}
10334
61224459bb09 Added \platform annotations.
Fred Drake <fdrake@acm.org>
parents: 8915
diff changeset
5 \platform{Mac}
8715
c750c7a21e03 Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents: 7866
diff changeset
6 \modulesynopsis{Basic Macintosh dialogs.}
c750c7a21e03 Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents: 7866
diff changeset
7
3194
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
8
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7712
diff changeset
9 The \module{EasyDialogs} module contains some simple dialogs for
14263
363851cccf2a Remove the reference to stdwin. The comment was still true, but no
Fred Drake <fdrake@acm.org>
parents: 10334
diff changeset
10 the Macintosh. All routines have an optional parameter \var{id} with
363851cccf2a Remove the reference to stdwin. The comment was still true, but no
Fred Drake <fdrake@acm.org>
parents: 10334
diff changeset
11 which you can override the DLOG resource used for the dialog, as long
363851cccf2a Remove the reference to stdwin. The comment was still true, but no
Fred Drake <fdrake@acm.org>
parents: 10334
diff changeset
12 as the item numbers correspond. See the source for details.
363851cccf2a Remove the reference to stdwin. The comment was still true, but no
Fred Drake <fdrake@acm.org>
parents: 10334
diff changeset
13
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7712
diff changeset
14 The \module{EasyDialogs} module defines the following functions:
3194
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
15
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
16
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
17 \begin{funcdesc}{Message}{str}
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
18 A modal dialog with the message text \var{str}, which should be at
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
19 most 255 characters long, is displayed. Control is returned when the
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20 user clicks ``OK''.
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
21 \end{funcdesc}
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
22
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
23 \begin{funcdesc}{AskString}{prompt\optional{, default}}
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7712
diff changeset
24 Ask the user to input a string value, in a modal dialog. \var{prompt}
15225
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
25 is the prompt message, the optional \var{default} arg is the initial
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
26 value for the string. All strings can be at most 255 bytes
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
27 long. \function{AskString()} returns the string entered or \code{None}
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
28 in case the user cancelled.
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
29 \end{funcdesc}
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
30
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
31 \begin{funcdesc}{AskPassword}{prompt\optional{, default}}
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
32 Ask the user to input a string value, in a modal dialog. Like
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
33 \method{AskString}, but with the text shown as bullets. \var{prompt}
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
34 is the prompt message, the optional \var{default} arg is the initial
3194
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
35 value for the string. All strings can be at most 255 bytes
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7712
diff changeset
36 long. \function{AskString()} returns the string entered or \code{None}
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7712
diff changeset
37 in case the user cancelled.
3194
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
38 \end{funcdesc}
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
39
7712
0cbc9df882b6 Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents: 7372
diff changeset
40 \begin{funcdesc}{AskYesNoCancel}{question\optional{, default}}
3194
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
41 Present a dialog with text \var{question} and three buttons labelled
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
42 ``yes'', ``no'' and ``cancel''. Return \code{1} for yes, \code{0} for
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
43 no and \code{-1} for cancel. The default return value chosen by
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
44 hitting return is \code{0}. This can be changed with the optional
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
45 \var{default} argument.
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
46 \end{funcdesc}
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
47
15225
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
48 \begin{funcdesc}{ProgressBar}{\optional{title \optional{, maxval\optional{,label}}}}
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
49 Display a modeless progress dialog with a thermometer bar. \var{title}
7866
b69fa9d142ca Logical markup.
Fred Drake <fdrake@acm.org>
parents: 7712
diff changeset
50 is the text string displayed (default ``Working...''), \var{maxval} is
15225
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
51 the value at which progress is complete (default
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
52 \code{100}). \var{label} is the text that is displayed over the progress
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
53 bar itself. The returned object has two methods,
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
54 \code{set(\var{value})}, which sets the value of the progress bar, and
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
55 \code{label(\var{text})}, which sets the text of the label. The bar
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
56 remains visible until the object returned is discarded.
3258
6e48fab6990f Documented ProgressBar and idle()
Jack Jansen <jack.jansen@cwi.nl>
parents: 3194
diff changeset
57
15225
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
58 The progress bar has a ``cancel'' button. [NOTE: how does the cancel
486a31d8a3b3 Chris Barker <cbarker@jps.net>:
Fred Drake <fdrake@acm.org>
parents: 14263
diff changeset
59 button behave?]
3258
6e48fab6990f Documented ProgressBar and idle()
Jack Jansen <jack.jansen@cwi.nl>
parents: 3194
diff changeset
60 \end{funcdesc}