The HTML Class

The HTML class, derived from File, is a top-level window that renders HTML in a text widget. It uses the HTML library written by Stephen Uhler of Sun Microsystems, which supports all the features of HTML 2.0.

The HTML browser (and in fact, all Tycho file references) supports HTTP hyperlink references, so you can read documents directly on the internet from within Tycho.

A sample document illustrates the HTML tags that are supported.

The HTML class is used for all Tycho documentation. It supports an extension of HTML with embedded Tcl scripts. If the user double clicks on a script, the Tcl script is executed in the global namespace.

You may create an instance of the HTML class as follows:

::tycho::view HTML -file $TYCHO/doc/introduction.html
There are many public methods associated with this class. See the class documentation for details.

HTML has a number of options. For example:

set h [::tycho::view HTML \
	-textwidth 60 \
	-toolbar 1 \
	-scrollbar 0 \
	-textheight 20]
$h insertData "<h1>Initial header in the HTML widget</h1>"

Tycho Home Page


Copyright © 1996-1998, The Regents of the University of California. All rights reserved.
Last updated: 03/14/98, comments to: eal@eecs.berkeley.edu