two_html(n) manual page

Back to the Index
Table of Contents

Name

two_html - Simple html widget

Synopsis

package require twoHtml ?1.0?
two_html pathName ?options?

Description

two_html is a simple html widget. It uses a subset of HTML 2.0 language. It implements hyperlinks (with keyboard navigation) and a page history.

Commands

The two_html widget command takes all of the text widget commands and additinally the following:
pathName show URL
Show the html page which is accessed through the URL.
pathName home
Show home page (which can be defined by pathName configure -home).
pathName current
Returns the index of the currently viewed page within the history of visited html pages.
pathName goto pos
Go to index pos within history of visited html pages.
pathName prev ?step?
Go to prevoius html page in the list of visited pages.
pathName next
Go to the next html page in the list of visited pages.
pathName prevState
Return true if widgetPath prev is possible.
pathName nextState
Return true if widgetPath next is possible.
pathName add URL html
Add html to the widget, available as URL. This page will then be used whenever the URL is accessed.
pathName append URL html
Append the html to the html text which has been added as URL.
pathName refresh
Repaint current page.

Options

The two_html command takes all options of the TK text widget plus to following options:
-home URL
Sets the home page of the html browser to URL. Defaults to home.
-linkcolor color
Sets the color of hyperlinks. Defaults to blue2.
-alinkcolor color
Sets the color of active links (while mouse down). Defaults to red.
-vlinkcolor color
Sets the background color of already visited links. Defaults to purple4.

Virtual Events

The
two_html widget may generate the following virtual events:
<<PrevOn>> and <<PrefOff>>
widgetPath prev is possible (On) or impossible (Off).
<<NextOn>> and <<NextOff>>
widgetPath next is possible (On) or impossible (Off).

Global Variable

The global variable TwoHtmlTitle holds the title of the current html page: use it in a status bar!

Elements

The two_html widget is a TK text widget. It additinally binds the tag TwoHtml (using bindtags). Fonts used (and created if non-existant) by the html widget are:

twoHtmlH1 twoHtmlH2 twoHtmlH3 twoHtmlP twoHtmlPB twoHtmlPI twoHtmlPBI twoHtmlPC twoHtmlPBC twoHtmlPIC twoHtmlPBIC twoHtmlS

Author

Frank J. Leitner
frank@fjl.de

See Also

text(n) .


Table of Contents


Back to the Index