Constructs related to ::tycho::HTML


Related class: ::tycho::HTML Contents: Procs

Procs

HMcurrent_tags {win}
extract set of current text tags tags starting with T map directly to text tags, all others are handled specially. There is an application callback, HMset_font to allow the application to do font error handling. Modified by EAL for greater efficiency. Avoid calls that set fonts or get fonts if they've occurred before.
HMextract_param {param key {val ""}}
HMgoto {win where {callback HMwent_to}}
Modify Uhler's implementation to support names with spaces and to make it more robust.

The application should call here with the fragment name to cause the display to go to this spot. If the target exists, go there (and do the callback), otherwise schedule the goto to happen when we see the reference.

HMinit_state {win}
initialize the window's state array Parameters beginning with S_ are NOT reset adjust_size: global font size adjuster unknown: character to use for unknown entities tab: tab stop (in cm) stop: enabled to stop processing update: how many tags between update calls tags: number of tags processed so far symbols: Symbols to use on un-ordered lists bgcolor: The background color. fgcolor: The foreground color.
HMlink_callback {win href}
Override the HTML library definition for the hyperlink callback function. This does not at this time support HTTP, but does support files and names within a file. If the window lies within an HTML widget, and the link is to another HTML file, then we reuse the same window to display the referenced file. Otherwise, we open a new window.
HMrender {win tag not param text}
HMrender gets called for every html tag win: The name of the text widget to render into tag: The html tag (in arbitrary case) not: a "/" or the empty string param: The un-interpreted parameter list text: The plain text until the next html tag If the tag has an entry in the HMtag_map, then that entry is used to change the state (font, size, etc.). If there is a procedure called HMtag_$tag, then that procedure is invoked.
HMset_image {win handle src}
An image callback function, called by the HTML library when it encounters and image. Read in an image if we don't already have one and call back to library for display.
HMstack {win push list}
Push or pop tags to/from stack. Each orthogonal text property has its own stack, stored as a list. The current (most recent) tag is the last item on the list. Push is {} for pushing and {/} for popping. Fixed by EAL to not fail on poping empty stack.
HMtag_body {win param text}
This code is modified from "surfit". HTML 3.2 introduces various attributes for the BODY tag. BACKGROUND (Tk 4.1 cannot support this), BGCOLOR, TEXT, LINK, VLINK, ALINK.
HMtag_color {win param text}
This proc is directly from Stephen Uhler's sample, with only slight modifications. A new HTML tag, inserted just for fun. Change the color of the text. Use HTML tags of the form: ... The color has lower priority than all other tags. NOTE: This is not standard HTML. Use instead.
HMtag_/color {win param text}
HMtag_dt {win param text}
Modify the original to permanently remove the indent introduced by tag_dl. NOTE: This assumes well-structured definition lists. I'm not sure what will happen with badly constructed HTML.
HMtag_dd {win param text}
Modify the original to reinsert the indent removed by tag_dt. This indent will be removed later by tag_/dd. NOTE: This assumes well-structured definition lists. I'm not sure what will happen with badly constructed HTML.
HMtag_font {win param text}
The following is modified from surfit.
HMtag_/font {win param text}
HMtag_menu {win param text}
Use a simple "-" rather than "->".
HMtag_tcl {win param text}
HMtag_/tcl {win param text}
HMx_font {family size weight style {adjust_size 0}}
Generate an X font name using the FontManager class in Tycho. Also, cache font requests locally for additional efficiency (this yields about an 18% speed improvement in rendering).
HMtag_hmstart {win param text}
Modify to not depend on being in the HMtag_map array.
HMtag_hr {win param text}
Improve the horizontal rule a bit.
HMtag_sub {win param text}
Subscripts.
HMtag_/sub {win param text}
HMtag_sup {win param text}
Superscripts.
HMtag_/sup {win param text}
HMwent_to {win where {count 0} {color {}}}
Override the library function to put the start of the named region at the top of the window and to temporarily change the background color.
HMtag_/td {win param text}
For a table item, if the text does not end in a period, add a period.

Index of classes