package require twoHtml
?1.0?
two_html
pathName ?options?
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.
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.
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.
two_html
widget may generate the following virtual events: prev
is possible (On) or impossible (Off). next
is possible (On) or impossible (Off). TwoHtmlTitle
holds the title of the current html page: use it in a status
bar!
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