\c{
The $hypertext$ widget
Both the Tk canvas and text widget allow the binding of
actions to particular items
and hence defining dynamically what we may call
hyperstructures.
A different, in a way more static, approach is offered
by the hypertext widget originally developed by
George Howlett. %%george.howlett@att.com.
}
.so sli-help
\c{
The hypertext widget may be used to display text
files containing embedded Tcl code.
The Tcl code must be placed between
escapes, that take the form of {\tt %%}
for both the start and end of the code.
A screen shot of a fragment of the online help
for drawtool is given in slide [hyper].
Notice that the online help provides a
replica of the drawtool application, surrounded
by text.
When looking at (again a fragment of) the hypertext
file specifying the contents of the online help,
given in slide [help-text],
you see that the drawtool command defined
in section [new]
is employed to create the embedded widget.
}
\c{
When specifying the hypertext file,
widgets may be
given a pathname relative to the pathname of the
hypertext widget by using the variable this.
In addition, the hypertext widget offers the variables
thisline and thisfile to identify the
current line number and current file name.
}
\c{
Any of the widgets and commands offered by Tcl/Tk or supported
by hush may be included in a hypertext file,
including the ones defined by the program
itself.
}