summaryrefslogtreecommitdiffstats
path: root/tkhtml1/doc/spec.html
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-10-17 15:25:29 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-10-17 15:25:29 (GMT)
commita62a72569befa24bccfc2ef198be80f3cb1e94e9 (patch)
tree5b80188ca040ec1942d235792ffc4905cd2ecf27 /tkhtml1/doc/spec.html
parent9967eb08e8dd098ffec7e70fa72549e5f7dc1e42 (diff)
parent333069975324629e46636ca439dc7edb838449a3 (diff)
downloadblt-a62a72569befa24bccfc2ef198be80f3cb1e94e9.zip
blt-a62a72569befa24bccfc2ef198be80f3cb1e94e9.tar.gz
blt-a62a72569befa24bccfc2ef198be80f3cb1e94e9.tar.bz2
Merge commit '333069975324629e46636ca439dc7edb838449a3' as 'tkhtml1'
Diffstat (limited to 'tkhtml1/doc/spec.html')
-rw-r--r--tkhtml1/doc/spec.html677
1 files changed, 677 insertions, 0 deletions
diff --git a/tkhtml1/doc/spec.html b/tkhtml1/doc/spec.html
new file mode 100644
index 0000000..cc88b52
--- /dev/null
+++ b/tkhtml1/doc/spec.html
@@ -0,0 +1,677 @@
+<html>
+<!--
+ Specifications for the Tk HTML Widget
+ $Revision$
+ Copyright (C) 1997, 1998, 1999 D. Richard Hipp
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ Author Contact Information:
+ drh@acm.org
+ http://www.hwaci.com/drh/
+
+ @(#) $Id$
+-->
+<head>
+<title>Interface Specification For The HTML Widget</title>
+</head>
+<body bgcolor=white>
+<h1>Interface Specification For The HTML Widget</h1>
+
+<p>This is a draft interface specification for the Tk HTML
+widget currently under development.
+Since it is still a draft, it is subject to change.
+Eventually, the interface will stabilize and this interface
+specification will morph into a manual page.</p>
+
+<h2>Configuration Options</h2>
+
+<table cellspacing=10>
+<tr><td valign=top><tt>-appletcommand</tt></td>
+<td>
+ <p>This option specifies the name of the Tcl procedure to invoke when the
+ <tt>&lt;applet&gt;...&lt;/applet&gt;</tt> tag sequence is seen. The html
+ widget will append two arguments to the procedure before calling it.
+ The first argument is the name of a widget that the callback should
+ create to hold the applet.
+ The second argument is
+ a list of name/value pairs which are the arguments to
+ the <tt>&lt;applet&gt;</tt> tag.</p>
+
+ <p>The text between <tt>&lt;applet&gt</tt> and <tt>&lt;/applet&gt;</tt>
+ is normally suppressed.
+ However, if the <tt>-appletcommand</tt> option is set to the empty string,
+ the <tt>&lt;applet&gt</tt> tag is ignored and all text between
+ <tt>&lt;applet&gt;</tt> and <tt>&lt;/applet&gt;</tt> is displayed
+ normally.</p>
+
+ <p>"&lt;embed&gt;" is treated as an alias for
+ "&lt;applet&gt;&lt;/applet&gt".</p>
+</td></tr>
+
+<tr><td valign=top><tt>-background</tt></td>
+<td>
+ <p>The background color for the widget.</p>
+
+ <p>Note that the <tt>&lt;body bgcolor=...&gt;</tt> HTML tag does not
+ automatically cause the widget to change its background color. If
+ you want the background color to change in response to this HTML tag,
+ then your Tcl script should intercept
+ the <tt>&lt;body&gt;</tt> tag using the
+ ``<tt>token handler</tt>'' widget command (described below) and
+ change the background color manually.</p>
+</td></tr>
+
+<tr><td valign=top><tt>-base</tt></td>
+<td>
+ <p>The base URI for the current document. This should be set to
+ the URI that was used to retrieve the document before parsing
+ begins.</p>
+</td></tr>
+
+<tr><td valign=top><tt>-bd</tt><td>An alias for <tt>-borderwidth</tt>
+
+<tr><td valign=top><tt>-bg</tt><td>An alias for <tt>-background</tt>
+
+<tr><td valign=top><tt>-borderwidth</tt></td>
+<td>
+ <p>The width of the 3-D border drawn around the parameter of the widget, in
+ pixels.</p>
+</td></tr>
+
+<tr><td valign=top><tt>-cursor</tt></td>
+<td>
+ <p>The cursor displayed when the pointer is positioned over the HTML widget.
+ If {}, the cursor reverts to its default shape.</p>
+</td></tr>
+
+<tr><td valign=top><tt>-exportselection</tt></td>
+</tr>
+
+<tr><td valign=top><tt>-fontcommand</tt></td>
+<td>
+ <p>The name of a TCL procedure that is used to convert HTML font names
+ into TCL font names. A default built-in procedure is used if the value
+ of this option is {}.</p>
+
+ <p>When the HTML widget needs a new font, it calls this procedure with
+ two arguments. This first argument is the font size expressed as an
+ integer between 1 and 7. The standard size is 4. The second argument
+ is a set of between 0 and 3 keywords drawn from the following set:
+ "bold", "italic", and "fixed". If the "bold" keyword is present in
+ the second argument, the font returned should be bold. If the "italic"
+ keyword is present, the font should be italic. If the "fixed" keyword
+ is present, the font should be fixed-width. The TCL procedure should
+ return the name of the TCL font that the HTML widget will use to render
+ the given HTML font. If the TCL procedure returns an empty string,
+ then the built-in default procedure is used to determine the font.</p>
+
+ <p>Examples: This is {4 {}}. <tt>This is {4 fixed}</tt>.
+ <small>This is {3 {}}</small>. <large><tt><bold>This is {5 {fixed bold}}
+ </bold></tt></large></p>
+</td></tr>
+
+
+<tr><td valign=top><tt>-fg</tt></td>
+<td>An alias for <tt>-foreground</tt>.</td>
+</tr>
+
+<tr><td valign=top><tt>-foreground</tt></td>
+<td>
+ The default foreground color in which HTML text is rendered.
+ The HTML can override this using the <tt>color=...</tt> attribute
+ on various HTML tags.
+</td></tr>
+
+<tr><td valign=top>
+<code>-formcommand <var>string</var></code>
+</td><td>
+Declares a handler for everything to do with forms within a document.
+Arguments will be appended to <var>string</var> and the result evaluated
+during parsing (for form creation) and when the widget is cleared (for
+form cleanup). The first argument is a token for
+identifying a form. The second argument selects the action to perform.
+The remaining arguments depend on the action, as follows.
+
+<dl><dt><code><var>string token</var> form <var>URL method attrs</var></code>
+<dd>The handler should begin taking notes for form <var>token</var>,
+especially the (resolved) <var>URL</var> of the action and the
+<var>method</var> to be applied. The raw attributes of the FORM element
+are in the pairlist <var>attrs</var>.
+
+<dt><code><var>string token</var> flush</code>
+<dd>When the document is cleared, the widget will destroy all the windows
+it requested. This handler should clean up anything else
+it created for that form.
+
+<dt><code><var>string token</var> input <var>path attrs</var></code>
+<dd>The handler should create a window named <var>path</var>
+appropriate for the element described by the <var>attrs</var>.
+The widget will map the window into its rendering appropriately.
+<p>It is not an error for the handler to return without creating such a window
+(it's natural in the case of type=hidden); the widget simply
+ignores the element in that case.
+The attributes are the raw values in the HTML, with one exception;
+a <code>src</code> will be resolved before the handler is called.
+
+<dt><code><var>string token</var> textarea <var>path attrs initial</var></code>
+<dd>The handler should create a window (a single Text, or a Frame with Text
+and Scrollbars, or whatever) appropriate for a &lt;textarea&gt; and
+initialise it to the <var>initial</var> string.
+
+<dt><code><var>string token</var> select <var>path attrs choices initial</var></code>
+<dd><em>&lt;select&gt is quite a complicated case...</em>
+The handler should create a window
+appropriate for a &lt;select&gt; of the given attributes and
+present the list of <var>choices</var>. Each choice is a pair, the
+value and its label. <var>initial</var> is a list of values initially
+selected. <em>This approach is somewhat questionable but should do
+most of the time.</em>
+</dl>
+
+Caution: Be very careful to avoid confusing HTML variables with TCL
+variables. It may be tempting to use the <code>name</code> attribute
+fairly directly to link
+together related widgets, but it will likely cause incorrect
+behaviours. Also be careful to observe the order in which the elements are
+created; this determines the order in which they must be submitted.
+A default form handler with the correct bahaviour written in TCL will be
+bundled with the widget.
+<p>The attribute names will be downcased within <var>attrs</var>.
+</td></tr>
+
+<tr><td valign=top><tt>-framecommand</tt><td>
+The script specified by this option is invoked when the HTML parser
+encounters a <tt>&lt;frameset&gt;...&lt;/frameset&gt;</tt> tag sequence.
+The arguments to the script are TBD.
+If the value of the option is the empty string, then the text within
+the <tt>&lt;noframe&gt...&lt;/noframe&gt;</tt> tag sequence is displayed.
+
+<tr><td valign=top><tt>-height</tt><td>
+Specifies the height of the area into which HTML is rendered.
+This value plus twice the <tt>-padx</tt>, <tt>-borderwidth</tt> and
+<tt>-highlightthickness</tt> values is the total height of the widget.
+
+<tr><td valign=top><tt>-highlightbackground</tt><td>
+
+<tr><td valign=top><tt>-highlightcolor</tt><td>
+
+<tr><td valign=top><tt>-highlightthickness</tt><td>
+
+<tr><td valign=top><tt>-hyperlinkcommand</tt></td>
+<td>
+ The script specified by this option is invoked whenever the user
+ clicks on a hyperlink on the HTML page. Before invoking this
+ script, the URI for the hyperlink is appended.
+</td></tr>
+
+<tr><td valign=top><tt>-imagecommand</tt></td>
+<td>
+ When a ``<tt>&lt;img src=...&gt;</tt>'' tag is encountered, the
+ HTML widget invokes the script specified by this option in order to
+ get the name of a Tk image object to display the HTML image.
+ Before invoking the script, the following arguments are appended:
+ <ol>
+ <li>The value of the <tt>src=...</tt> parameter after have been
+ processed by the resolver.
+ <li>The value of the <tt>width=...</tt> parameter.
+ <li>The value of the <tt>height=...</tt> parameter.
+ <li>A list containing the names and values of all parameters.
+ </ol>
+ If the name returned by this script is the empty string, or if the
+ script is an empty string, then the HTML widget displays the
+ <tt>alt=...</tt> text of the <tt>&lt;img&gt</tt> tag instead of
+ an image.
+</td></tr>
+
+<tr><td valign=top><tt>-isvisitedcommand</tt><td>
+When the HTML widget encounters a hyperlink
+(``<tt>&lt;a href=...&gt;</tt>'') it invokes the script specified
+by this option in order to determine whether or not the hyperlink
+has been visited.
+This information is needed to determine what color to use to display
+the hyperlink.
+
+<tr><td valign=top><tt>-padx</tt><td>
+The amount of extra space to insert between the 3-D border and the
+left and right sides of the document text.
+
+<tr><td valign=top><tt>-pady</tt><td>
+The amount of extra space to insert between the 3-D border and the top
+and bottom of the document text.
+
+<tr><td valign=top><tt>-relief</tt><td>
+The relief used to draw the 3-D border.
+
+<tr><td valign=top><tt>-resolvercommand</tt></td>
+<td>
+ <p>The name of a TCL command used to resolve URIs. If blank, a built-in
+ resolver is used. If a TCL command is specified but it returns
+ an empty string, the built-in resolver is used then too.
+ The build-in resolver is based on the algorithm
+ in section 5.2 of RFC 2396. </p>
+
+ <p>Multiple URIs are appended to the TCL command before it is executed.
+ The first URI is the BASE URI of the document (the URL that specified
+ by the -base configuration option and updated according to any prior
+ &lt;BASE&gt; markup). Zero or more additional URIs are
+ appended to this base. The result of the script should be the resolution
+ of the whole series or URIs.</p>
+</td></tr>
+
+<tr><td valign=top><tt>-rulerelief</tt></td>
+<td>
+ <p>Determines the appearance of the Horizontal Rule (&lt;HR&gt) markup.
+ The default is "sunken". This can also be "raised" or "flat". If
+ "flat", then the &lt;HR&gt; is drawn using a solid line in the current
+ foreground color. "groove" and "ridge" are the same as "flat".</p>
+</td></tr>
+
+<tr><td valign=top><tt>-scriptcommand</tt></td>
+<td>
+ <p>Whenever &lt;SCRIPT&gt;...&lt;/SCRIPT&gt; markup is encountered in
+ the input HTML, the attributes of the &lt;SCRIPT&gt; markup and
+ the body of the script are appended to this string and the result
+ is executed as a TCL command. If this options is the empty string,
+ then the script is ignored.
+</td></tr>
+
+<tr><td valign=top><tt>-selectioncolor</tt><td>
+The background color used when drawing the selection. The
+foreground color for the selection is the same as the regular
+foreground color.
+
+<tr><td valign=top><tt>-tablerelief</tt></td>
+<td>
+ <p>Determines the appearance of the borders around tables.
+ The default is "raised". This can also be "sunken" or "flat". If
+ "flat", then the borders is drawn using solid lines in the current
+ foreground color. "groove" and "ridge" are the same as "flat".</p>
+</td></tr>
+
+<tr><td valign=top><tt>-takefocus</tt><td>
+
+<tr><td valign=top><tt>-unvisitedcolor</tt><td>
+The foreground color used to draw hyperlinks that have not been visited.
+
+<tr><td valign=top><tt>-underlinehyperlinks</tt><td>
+Set to TRUE to cause hyperlinks to be drawn using an underlined font.
+
+<tr><td valign=top><tt>-visitedcolor</tt><td>
+The foreground color used to draw hyperlinks that have been visited.
+
+<tr><td valign=top><tt>-width</tt><td>
+The width of the document text.
+This value does not include space allocated for
+<tt>-highlightthickness</tt>, <tt>-borderwiddth</tt> or
+<tt>-padx</tt>.
+
+<tr><td valign=top><tt>-xscrollcommand</tt><td>
+
+<tr><td valign=top><tt>-yscrollcommand</tt><td>
+
+</table>
+
+<h2>Indices</h2>
+
+Internally, the HTML widget stores the HTML document as a list of
+tokens.
+Each token is either
+<ul>
+<li>a contiguous sequence of non-space characters (Text),
+<li>a contiguous sequence of spaces, tabs or newlines (Space),
+<li>or an HTML markup tag (such as ``<tt>&lt;em&gt;</tt>''.)
+</ul>
+Tokens are identified by number.
+The first token is ``1'', the second is ``2'' and so forth.
+So in its simplest form, an index is just an integer greater than 0.
+<p>
+Within a single Text or Space token, individual characters are
+also identified by number, though the counting starts with 0 instead
+of 1.
+The character number is connected to the token number by a period.
+So, for example, the 4th character in the 9th token would be
+``9.3''.
+<p>
+Two integers separated by a dot is called the <em>connonical</em> form
+of an index.
+Other index forms are available, including:
+
+<table cellspacing=10>
+<tr><td valign=top>end<td>
+The keyword ``end'' means one character past
+the last character of the last token.
+<tr><td valign=top>@X,Y<td>
+The character located at screen coordinates X,Y.
+<tr><td valign=top>*.last<td>
+The second integer can be replaced by the keyword ``last'' to mean the
+last character in the token.
+<tr><td valign=top>sel.first<td>
+This is the first character that is part of the selection.
+<tr><td valign=top>sel.last<td>
+This is the last character that is part of the selection.
+<tr><td valign=top>ins<td>
+The character immediately following the insertion cursor.
+</table>
+
+<h2>Commands</h2>
+
+<dl>
+<dt><b>html</b> <i>window</i> ?<i>options ...</i>?</dt><p>
+<dd>
+ Create a new HTML widget instance named <i>windows</i>
+</dd>
+<p>
+<dt><b>html</b> <b>reformat</b> <i>from to text</i><p>
+<dd>
+Convert text from one encoding to another. The text is given
+in the <i>text</i> argument. The current encoding of the text
+is specified by the <i>from</i> argument. This command returns
+the same text in the <i>to</i> encoding.
+<p>
+<i>From</i> and <i>to</i> may be any of the following values:
+<p>
+<table cellspacing=10>
+<tr><td valign=top>plain</td>
+<td>
+ Ordinary text with no characters escaped.
+</td></tr>
+<tr><td valign=top>http</td>
+<td>
+ The text is encoded in a form suitable for use with the HTTP
+ protocol. Spaces are converted to "+". Special characters
+ and escaped as "%aa" where "a" is a hexadecimal digit. A special
+ character is anything other than an alphanumeric or one of these:
+ ".", "$", "-", or "_".
+</td></tr>
+<tr><td valign=top>url</td>
+<td>
+ The text is encoded in a form suitable for use as a URI.
+ Spaces are converted to "+". Special characters
+ and escaped as "%aa" where "a" is a hexadecimal digit. A special
+ character is anything other than an alphanumeric or one of these:
+ ".", "$", "-", "_", or "/".
+</td></tr>
+<tr><td valign=top>html</td>
+<td>
+ The text is encoded in a form suitable for use within HTML.
+ "&amp;" is encoded as "&amp;amp;", "&lt;" is encoded as "&amp;lt;" and so
+ forth.
+</td></tr>
+</table>
+<p>
+This command is intended to be useful to the TCL procedures that implement
+callbacks for the HTML widget.
+</dd>
+<p>
+<dt><b>html</b> <b>uri join</b> <i>scheme authority path query fragment</i><p>
+<dd>
+This command takes the five main components of a URI and joins them together
+into a complete URI. Special characters in any component are escaped.
+</dd>
+<p>
+<dt><b>html</b> <b>uri split</b> <i>uri</i><p>
+<dd>
+This command takes a single URI and splits it into its five major
+components: scheme, authorithy, path, query and fragement. The command
+returns a list where each component is an element of the list.
+Components missing from the URI are represented as empty elements in
+the list.
+</dd>
+
+</dl>
+
+<h2>Widget Commands</h2>
+
+<dl>
+
+<dt><i>WIDGET</i>&nbsp <tt>cget</tt> <i>config-option</i><p>
+<dd>
+Return the value of a configuration option. Works just like any
+other Tk widget.
+<p>
+
+<dt><i>WIDGET</i>&nbsp <tt>clear</tt><p>
+<dd>
+Remove all tokens and text from the HTML widget.
+The parser is reset to its initial state.
+This routine should be called to changes pages.
+<p>
+
+<dt><i>WIDGET</i>&nbsp <tt>configure</tt> ?<i>args...</i>?<p>
+<dd>
+The standard Tk configuration command.
+<p>
+
+<dt><i>WIDGET</i>&nbsp <tt>href</tt>&nbsp <i>X&nbsp Y</i><p>
+<dd>If the coordinates <i>X Y</i> define a point above a hyperlink,
+then this command will return the target URL for that hyperlink.
+The URL will be resolved using the -resolvercommand before it
+is returned.
+<p>
+
+<dt><i>WIDGET</i>&nbsp <tt>index</tt>&nbsp <i>INDEX&nbsp ?COUNT&nbsp UNITS?</i></p>
+<dd>
+Translates <i>INDEX</i> into its connonical form.
+The connonical form of an index is two integers separated by a period.
+<p>
+The optional 3rd and 4th arguments specify a displacement from <i>INDEX</i>
+to the value of the index returned.
+<i>COUNT</i> can be any integer value, including a negative number.
+<i>UNITS</i> must be either ``<tt>char</tt>'' or ``<tt>line</tt>''.
+<p>
+
+<dt><i>WIDGET</i>&nbsp <tt>insert</tt>&nbsp <i>INDEX</i><p>
+<dd>
+Causes the insertion cursor (a flashing vertical bar) to be positioned
+immediately before the character specified by <i>INDEX</i>.
+<p>
+
+<dt><i>WIDGET</i>&nbsp <tt>names</tt><p>
+<dd>
+This command causes the widget to scan the entire text of the document
+looking for tags of the form ``<tt>&lt;a name=...&gt;</tt>''.
+It returns a list of values of the <tt>name=...</tt> fields.
+<p>
+The vertical position of the document can be moved to any of these names
+using the ``<i>WIDGET</i> <tt>yview</tt> <i>NAME</i>'' command described
+below.
+<p>
+
+<dt><i>WIDGET</i>&nbsp <tt>parse</tt>&nbsp <i>HTML-TEXT</i><p>
+<dd>Adds the given HTML text to the end of any text previously received
+through the <tt>parse</tt> command and parses as much of the text as
+possible into tokens.
+Afterwards, the display is updated to show the new tokens, if they are
+visible.<p>
+
+<dt><i>WIDGET</i>&nbsp; <tt>resolver</tt>&nbsp; ?<i>uri ...</i>?<p>
+<dd>The resolver specified by the -resolvercommand option
+ is called with the
+ base URI of the document followed
+ by the remaining arguments to this commant. The result of this
+ command is the result of the -resolvercommand script.<p>
+
+<dt><i>WIDGET</i>&nbsp <tt>selection</tt>&nbsp <i>subcommand args...</i><p>
+<dd>The selection widget command is used to control the selection.<p>
+ <dl>
+ <dt><i>WIDGET</i>&nbsp <tt>selection clear</tt><p>
+ <dd>Clear the current selection. No text will be selected after this
+ command executes.<p>
+
+ <dt><i>WIDGET</i>&nbsp <tt>selection set</tt>&nbsp <i>START&nbsp END</i><p>
+ <dd>Change the selection to be all text contained within the given
+ indices.<p>
+ </dl>
+ <p>
+
+<dt><i>WIDGET</i>&nbsp <tt>text</tt>&nbsp <i>subcommand args...</i><p>
+<dd>There are several token commands. They all have the common
+property that they directly manipulate the text that is displayed.
+These commands (none of which are currently implemented) can be used
+to build an WYSIWYG editor for HTML.<p>
+ <dl>
+ <dt><i>WIDGET</i>&nbsp; <tt>text ascii</tt>&nbsp <i>INDEX-1&nbsp INDEX-2</i><p>
+ <dd><p>
+ Returns plain ASCII text that represents all characters between
+ <i>INDEX-1</i> and <i>INDEX-2</i>. Formatting tags are omitted.
+ The <i>INDEX-1</i> character is included by <i>INDEX-2</i> is omitted.
+ <p>
+
+ <dt><i>WIDGET</i>&nbsp; <tt>text delete</tt>&nbsp <i>INDEX-1&nbsp INDEX-2</i><p>
+ <dd><p>
+ All text from <i>INDEX-1</i> up to, but not including <i>INDEX-2</i> is
+ removed and the display is updated accordingly.
+ <p>
+
+ <dt><i>WIDGET</i>&nbsp; <tt>text html</tt>&nbsp <i>INDEX-1&nbsp INDEX-2</i><p>
+ <dd><p>
+ Returns HTML text that represents all characters and formatting tags
+ between <i>INDEX-1</i> and <i>INDEX-2</i>.
+ The <i>INDEX-1</i> character is included by <i>INDEX-2</i> is omitted.
+ <p>
+
+ <dt><i>WIDGET</i>&nbsp; <tt>text insert</tt>&nbsp <i>INDEX&nbsp TEXT</i><p>
+ <dd><p>
+ Inserts one or more characters immediately before the character whose
+ index is given.
+ <p>
+ </dl>
+
+
+<dt><i>WIDGET</i>&nbsp <tt>token</tt>&nbsp <i>subcommand args...</i><p>
+<dd>There are several token commands. They all have the common
+ property that they involve the list of tokens into which the
+ HTML is parsed.<p>
+ Some of the following subcommands make use of indices. The
+ character number of these indices is ignored since these commands
+ deal only with whole tokens.
+ <p>
+ <dl>
+ <dt><i>WIDGET</i>&nbsp; <tt>token append</tt>&nbsp;
+ <i>TAG&nbsp; ARGUMENTS</i><p>
+ <dd>
+ The command causes a token to be appended to the current list of
+ tokens in the HTML widget. This command is typically used within
+ a token handler.
+ <p>
+
+
+ <dt><i>WIDGET</i>&nbsp; <tt>token delete</tt>&nbsp;
+ <i>INDEX&nbsp ?INDEX-2?</i><p>
+ <dd>
+ Deletes the single token indentified by the index. If a second index is
+ given, the range of tokens from the first to the second index inclusive
+ is deleted.
+ <p>
+
+ <dt><i>WIDGET</i>&nbsp; <tt>token find</tt>&nbsp;
+ <i>TAG</i><p>
+ <dd>
+ Locates all tokens with the given <i>TAG</i> and returns them all
+ as a list.
+ Each element of the returned list is a sublist containing the index
+ for the token and the arguments for the token.
+ <p>
+
+ <dt><i>WIDGET</i>&nbsp; <tt>token get</tt>&nbsp;
+ <i>INDEX&nbsp ?INDEX-2?</i><p>
+ <dd>
+ Returns a list of tokens in the range of <i>INDEX</i> through
+ <i>INDEX-2</i>.
+ Each element of the list consists of the token tag followed by
+ the token arguments.
+ <p>
+
+ <dt><i>WIDGET</i>&nbsp; <tt>token handler</tt>&nbsp;
+ <i>TAG&nbsp; ?SCRIPT?</i><p>
+ <dd>
+ This command allows special processing to occur for selected tokens
+ in the HTML input stream.
+ The <i>TAG</i> argument is either ``Text'' or ``Space'' or the name
+ of an HTML tag (ex: ``H3'' or ``/A'').
+ If a non-empty script is specified for a particular tag, then when
+ instances of that tag are encountered by the parser, the parser calls the
+ corresponding script instead of appending the token to the end of the
+ token list. Before calling the script, three arguments are appended:
+ <ol>
+ <li>The token number.
+ <li>The tag. (ex: <tt>H3</tt>)
+ <li>A list of name/value pairs describing all arguments to the tag.
+ </ol>
+ An empty handler script causes the default processing to occur for
+ the tag. If the script argument is omitted all together, then
+ the current value of the token handler for the given tag is returned.
+ <p>
+ Only one handler may be defined for each token type. If a new
+ handler is specified for a token type that previously had a different
+ handler defined, then the old handler is overwritten by the new.
+ <p>
+
+ <dt><i>WIDGET</i>&nbsp; <tt>token insert</tt>&nbsp;
+ <i>INDEX&nbsp TAG&nbsp ARGUMENTS</i><p>
+ <dd>
+ Inserts a single token given by <i>TAG</i> and <i>ARGUMENTS</i> into
+ the token list immediately before <i>INDEX</i>.
+ <p>
+ </dl>
+
+<p>
+
+<dt><i>WIDGET</i>&nbsp; <tt>xview</tt>&nbsp; <i>args...</i><p>
+<dd>Used to control horizontal scrolling.<p>
+ <dl>
+ <dt><i>WIDGET</i>&nbsp <tt>xview</tt><p>
+ <dd>Returns a list containing two elements. The elements are a fractions
+ between 0.0 and 1.0 that define the position of the left and right
+ edges of
+ the visible part of the document as a fraction of the whole.<p>
+ <dt><i>WIDGET</i>&nbsp <tt>xview moveto</tt>&nbsp <i>FRACTION</i><p>
+ <dd>Adjusts the horizontal position of the document so that
+ <i>FRACTION</i> of the horizontal span of the document is off-screen
+ to the left.<p>
+ <dt><i>WIDGET</i>&nbsp <tt>xview scroll</i>&nbsp <i>NUMBER&nbsp WHAT</i><p>
+ <dd>
+ Shifts the view in the window left or right according to
+ <i>NUMBER</i> and <i>WHAT</i>.&nbsp&nbsp <i>NUMBER</i> is an integer
+ and <i>WHAT</i> is either <tt>units</tt> or <tt>pages</tt>.<p>
+ </dl>
+
+<dt><i>WIDGET</i>&nbsp <tt>yview</tt>&nbsp; <i>args...</i><p>
+<dd>Used to control the vertical position of the document.<p>
+ <dl>
+ <dt><i>WIDGET</i>&nbsp <tt>yview</tt><p>
+ <dd>Returns a list containing two elements. The elements are a fractions
+ between 0.0 and 1.0 that define the position of the top and bottom
+ edges of
+ the visible part of the document as a fraction of the whole.<p>
+ <dt><i>WIDGET</i>&nbsp <tt>yview</tt>&nbsp <i>NAME</i><p>
+ <dd>Adjusts the vertical position of the document so that the tag
+ ``<tt>&lt;a name=</tt><i>NAME</i><tt>&gt;</tt>'' is on screen,
+ and preferably near the top of the screen.<p>
+ <dt><i>WIDGET</i>&nbsp <tt>yview moveto</tt>&nbsp <i>FRACTION</i><p>
+ <dd>Adjusts the horizontal position of the document so that
+ <i>FRACTION</i> of the vertical span of the document is off-screen
+ above the visible region.<p>
+ <dt><i>WIDGET</i>&nbsp <tt>xview scroll</i>&nbsp; <i>NUMBER&nbsp; WHAT</i><p>
+ <dd>
+ Shifts the view in the window up or down according to
+ <i>NUMBER</i> and <i>WHAT</i>.&nbsp&nbsp <i>NUMBER</i> is an integer
+ and <i>WHAT</i> is either <tt>units</tt> or <tt>pages</tt>.<p>
+ </dl>
+
+</dl>
+</body>
+</html>