ReadHelp

Synopsis

This modules reads in a plain text help file and formats it to a given width.

Input Ports

Name Type Description

active int Shows or hides the help dialog
filename string contains the name of the help file
width int width of the output text

Output Ports

Name Type Description

rows int Number of lines
cols int Number of characters in the longest line
text string Text generated by the ReadHelp module

Description

The ReadHelp project reads in a plain text help file and outputs it into a Help Dialog. The text is reformated to a given number of characters in a line. This reformatting changes the line breaks in the given text. in order to keep paragraphs the text file should contain blank lines to separate paragraphs.

Input Ports

active

This toggle decides if the Help Dialog Box is shown.

filename

This string contains the filename of the plain text Help file.

width

This integer specifies the maximum number of characters per line. The ReadHelp module reads in this number to put a line break at the space before this character. If there is no space before this character, the ReadHelpmodule breaks the line at the next available space.

Output Ports

text

This string contains the reformatted text generated by the ReadHelp Module.

rows

This integer contains the number of lines read in.

cols

This integer contains the number of characters in the longest line of the text.

Utility Macros

The ReadHelp User Macro combines the User Inerface Macro ReadHelpUI,the Functional Macro ReadHelpFunc, and a Parameter Block.

Example

An Example Application ReadHelpEg is proivided, which demonstrates how the the ReadHelp Project reads in the help.txt help file.

Files

iac_proj/rd_help/rd_help.v creates the IAC_PROJ.ReadHelp library.

iac_proj/rd_help/rdhmods.v creates the ReadHelpMods library which consists of the Parameter Block ReadHelpParams, and the low-level Module ReadHelpCore.

iac_proj/rd_help/rdhmacs.v creates the ReadHelpMacs library which consists of the User Interface Macro ReadHelpUI, the Functional Macro ReadHelpFunc and the User Macro ReadHelp.

iac_proj/rd_help/rdhapps.v creates the ReadHelpApps library which consists of the Example Application ReadHelpEg.

Other Notes

The low-level ReadHelpMods library containing the ReadHelpCore Module does not specify a process. The "express" process will be used by default.

Author

anonymous

Modifications

Alburr Al-Hameed
Manchester Visualisation Centre

Tobias Schiebeck
Manchester Visualisation Centre

Contact

International AVS Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL