File 'lib/htmlFormatter.cls' (part of 'AutoDOC')


Home | Packages | Files | Procedures | Classes | Keywords | External packages


Written by
Andreas Kupries
Description
The strategy class for production of HTML formatted output.
Depends on
cgi

Class 'htmlFormatter'

Superclasses
genericFormatter
Membervariables
footer, pages
Methods
RecordPage, ampersand, caption, chapter, clear, closePage, definitionList, defterm, defterm2, enumerate, getAnchor, getString, hrule, htmlFormatter, imgDef, imgRef, item, itemize, link, linkDef, linkRef, markError, newPage, par, parbreak, quote, section, setAnchor, strong, table, table_data, table_head, table_row, write

footer
Contains the HTML commands to generate the footer line.
pages
Array containing the names of all HTML files generated so far.

RecordPage (pagefile)

Internal method used by newPage to keep track of all generated files. Trying to write a file twice causes an exception aborting the engine.
Argument: pagefileThe name of the to write.

ampersand ()

Writes an ampersand (&) into the current page.

caption (args)

Executes the specified script (last argument) in the calling context, captures the produced formatted text and organizes it into a table caption. The arguments before the script are interpreted as 'name=value'-style parameterization.
Argument: argsA list of 'name=value' parameters and a script to evaluate in the calling context (last element).

chapter (title)

Adds a chapter title to the current page.
Argument: titleThe text of the title.

clear ()

Clear internal state, prepare for new scan.

closePage ()

Completes the generation of the current page

definitionList (script)

Executes the specified script in the calling context and captures any generated output in a string, which is then formatted as definition list.
Argument: scriptThe tcl code to execute in the calling context.

defterm (term text)

Generates an item in a definition list.
Argument: termThe name of the thing to explain.
Argument: textThe text explaining the term.

defterm2 (term)

Generates an item in a definition list.
Argument: termThe name of the thing to explain. But without explanation.

enumerate (script)

Executes the specified script in the calling context and captures any generated output in a string, which is then formatted as itemized list.
Argument: scriptThe tcl code to execute in the calling context.

getAnchor (name)

Generates a named anchor and returns the HTML to the caller.
Argument: nameThe name of the generated anchor.
Returns: the HTML string defining the named anchor.

getString (script)

Executes the specified script in the calling context and captures any generated output in a string, which is then returned as the result of the call.
Argument: scriptThe tcl code to execute in the calling context.
Returns: a string containing all output produced by the script

hrule ()

Writes a horizontal rule into the current page.

htmlFormatter ()

Constructor, initializes the file extension.

imgDef (code text geometry imgfile)

Stores an hyperlink to an image under code, allowing later retrieval via imgRef.
Argument: codeThe identifier for storage and retrieval of the image link.
Argument: textAlternative text describing the contents of the picture.
Argument: geometryA list containing the width and height of the image, in this order. Can be empty. Used to insert geometry information into the link, for better display even if the image is not loaded.
Argument: imgfileThe location to point at, i.e. the image file.

imgRef (code)

Argument: codeThe identifier for storage and retrieval of the image link.
Returns: the image link generated by imgDef and then stored under code.

item (text)

Generates an item in an itemized list.
Argument: textThe paragraph to format as item in the list.

itemize (script)

Executes the specified script in the calling context and captures any generated output in a string, which is then formatted as itemized list.
Argument: scriptThe tcl code to execute in the calling context.

link (text url)

Combines its arguments into a hyperlink having the text and pointing to the location specified via url
Argument: textThe string to use as textual part of the hyperlink.
Argument: urlThe location to point at.
Returns: the formatted hyperlink.

linkDef (code text url)

The same as in link, but the result is stored internally instead, using code as reference.
Argument: codeThe identifier for storage and retrieval of the hyperlink.
Argument: textThe string to use as textual part of the hyperlink.
Argument: urlThe location to point at.

linkRef (code)

Argument: codeThe identifier for storage and retrieval of the hyperlink.
Returns: the hyperlink generated by linkDef and then stored under code.

markError (text)

Formats the incoming text as error and returns the modified information.
Argument: textThe text to reformat.
Returns: a string containing the given text formatted as error.

newPage (file title firstheading)

Start a new page, implicitly completes the current page.
Argument: filename of file to contain the generated page
Argument: titlestring to be used as title of the page
Argument: firstheading (= {})string to use in toplevel heading. Defaults to title. Required to allow hyperlinks in toplevel headings without violating HTML syntax in the title.

par (args)

Writes a paragraph into the current page, uses all arguments as one string.
Argument: argsThe text to format and write as paragraph. Actually a list of arguments put together into one string

parbreak ()

Writes a paragraph break into the current page.

quote (string)

Takes the specified string, add protective signs to all character (sequences) having special meaning for the formatter and returns the so enhanced text.
Argument: stringThe string to protect against interpretation by the formatter.
Returns: a string containing no unprotected special character (sequences).

section (title)

Adds a section title to the current page.
Argument: titleThe text of the title.

setAnchor (name)

Generates a named anchor at the current location in the current page.
Dangers: Usable only in conjunction with cgi 0.7, and not cgi 0.4, as for earlier versions of autodoc.
Argument: nameThe name of the generated anchor.

strong (text)

Adds the appropriate formatting to the given text to emphasize it as strong, then returns the result.
Argument: textThe string to mark as strong.
Returns: The emphasized text.

table (args)

Executes the specified script (last argument) in the calling context, captures the produced formatted text and organizes it into a table. The arguments before the scripts are interpreted as 'name=value'-style parameterization.
Argument: argsA list of 'name=value' parameters and a script to evaluate in the calling context (last element).

table_data (args)

Executes the specified script (last argument) in the calling context, captures the produced formatted text and organizes it into a table cell. The arguments before the script are interpreted as 'name=value'-style parameterization.
Argument: argsA list of 'name=value' parameters and a script to evaluate in the calling context (last element).

table_head (args)

Executes the specified script (last argument) in the calling context, captures the produced formatted text and organizes it into a table cell formatted as heading. The arguments before the script are interpreted as 'name=value'-style parameterization.
Argument: argsA list of 'name=value' parameters and a script to evaluate in the calling context (last element).

table_row (args)

Executes the specified script (last argument) in the calling context, captures the produced formatted text and organizes it into a table row. The arguments before the script are interpreted as 'name=value'-style parameterization.
Argument: argsA list of 'name=value' parameters and a script to evaluate in the calling context (last element).

write (text)

Has to write the specified text into the current page.
Argument: textThe string to place into the current page.


Generated by AutoDoc 2.1 at 02/15/1999, invoked by Andreas Kupries