home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / hlpdk30.zip / HELPC.DOC < prev    next >
Text File  |  1993-04-10  |  12KB  |  295 lines

  1.  
  2.  ╔══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                          ║
  4.  ║                                 ISoft D&M                                ║
  5.  ║                                 POB. 5517                                ║
  6.  ║                           Coralville IA 52241                            ║
  7.  ║                                   U.S.A                                  ║
  8.  ║                                                                          ║
  9.  ╚══════════════════════════════════════════════════════════════════════════╝ 
  10.  
  11. *******************************************************************************
  12. * HELPC Help Engine Technical specification and compiler user guide           *
  13. * LAST UPDATE - Apr. 09, 1993. (c) 1992,93 - Loewy Ron.                       *
  14. *******************************************************************************
  15.  
  16. *******************************************************************************
  17. *                              General Overview                               *
  18. *******************************************************************************
  19.  
  20.   The Help Engine database is a combination of text that is read by the user,
  21.  and a Topic and Links database that allows the user to view the topics
  22.  he is interested in, using hyper-text methods.
  23.  
  24.  
  25.   Each help database is built of 4 file components : 
  26.  
  27.  1. Help Data File    - this file contains the raw text data.
  28.  2. Topic Index File  - a database table that contains the topic names, and
  29.                         the references to the topics in the Data File.
  30.  3. Links Index File  - a database table that contains the list of links 
  31.                         defined for each topic, and positional data.
  32.  4. Set Data File     - a database configuration file that contains the
  33.                         names of the 3 components defined above, and some 
  34.                         additional information.
  35.  
  36.   Version 1.x is the bare-bones version that includes only the basic
  37.  operations needed from a hyper-text database, this version is implemented
  38.  using the Paradox Engine V3.0 to manage the Topic and Link index tables.
  39.  
  40.   Version 2.x has a new field in the topic table - the title field, help
  41.  databases that were compiled with V1.x will not be executed by version
  42.  2.x, they will have to be re-compiled!.
  43.  
  44.   Version 3.x fields have different length - the databases have to be 
  45.  re-compiled.
  46.  
  47.   The format of the help database is released to the public domain, if
  48.  you implement a database viewer on this database structure, I would be
  49.  happy to receive a copy ..
  50.  
  51. *******************************************************************************
  52. *                               Compiler Usage                                *
  53. *******************************************************************************
  54.  
  55.   The HELPC help compiler is a dos command line program that receives a 
  56.  help definition file (.HDF) and produce a help database. 
  57.  
  58.   The helpC command line is :
  59.  
  60.  HELPC source.fil [/Htopic-table-name] [/Llink-table-name] [/Ddata-file-name] 
  61.                   [/R-] [/W+] [/W30] [/W31] [TH+] [/QH+] [/TV+] [/PH+]
  62.  
  63.   The output of the compiler is a set data file called source.SET, that
  64.  includes the names of the other help database components. 
  65.  
  66.   Please Notice - if the /W+ /W30 or /W31 switch is defined, the compiler 
  67.  will generate a .HPJ and .RTF files that can be used with the Microsoft 
  68.  HC (v3.00b) or HC31 help compiler, and output a .HLP windows help file!. 
  69.  
  70.   By default the help compiler produces a help cross reference report on the 
  71.  topics/links used in the database, if the /R- switch is set, no cross-ref
  72.  report will be generated, and no database integrity indicators will be
  73.  given.
  74.  
  75.  
  76.   IMPORTANT - Scan the output cross reference report for links defined, that
  77.  are not defined as topics!
  78.  
  79.   Notice - An additional switch is available that instructs the help compiler
  80.  to indicate it's parse and code generation progress. Use the /EP+ switch to
  81.  see that the helpC compiler is active. Please understand that the compile
  82.  process can take a long time, on complex help databases. This switch does
  83.  nothing more that ensure to you that the help compiler is alive. 
  84.  
  85. *******************************************************************************
  86. *                           Help Definition Format                            *
  87. *******************************************************************************
  88.  
  89.   The help definition file format is as follows :
  90.  
  91. remarks ...
  92. remarks ...
  93.  
  94. .ENTRY topic-name
  95. [.TITLE optional title for topic]
  96. topic text and link reference .. 
  97. topic text and link reference .. 
  98. topic text and link reference .. 
  99. topic text and link reference .. 
  100. .END-ENTRY 
  101.  
  102. remarks ...
  103.  
  104.  
  105. .ENTRY topic2-name
  106. topic2 text ...
  107. .END-ENTRY 
  108.  
  109.  
  110.   As can be seen - lines between the .ENTRY and .END-ENTRY keywords are
  111.  the lines processed by the help compiler, to create the help database, 
  112.  every other line is considered a remark, and is not parsed or evaluated by
  113.  the help compiler.
  114.  
  115.   The topic text and link reference lines are simple text lines, with
  116.  special link marks.
  117.  
  118.   A sample will provide the details :
  119.  
  120. This is a text help line that includes one ~link~link-topic-name~ in it.
  121.  
  122.   This line will be displayed in the help engine program as :
  123.  
  124. This is a text help line that includes one link in it.
  125.  
  126.   The word "link" will be in a different color then the rest of the line, 
  127.  to indicate that this is a link. If the user hi-lights the link, and
  128.  presses Enter (or points the mouse cursor and clicks), the help engine will
  129.  look for a topic called "link-topic-name", and display it.
  130.  
  131.   Browse the HELPDEMO.HDF file for a demo of a help database definition file.
  132.  
  133.  Notes :
  134.  
  135.  1. The keywords .TOPIC and .END-TOPIC can be used instead of .ENTRY and
  136.     .END-ENTRY respectivly.
  137.  
  138.  2. Keywords are NOT case sensitive. (.topic = .TOPIC = .eNTry)
  139.  
  140.  3. The .TITLE keyword is optional. If no title is defined, the topic name
  141.     is used as a title. (just like in v1.x). 
  142.  
  143.  4. If you want the ~ sign to appear in your help database, use ~~ in your
  144.     help source file. (e.g. "This is a ~~" will be "This is a ~" in the final
  145.     help database.).
  146.  
  147. Additional commands include :
  148.  
  149. .LINKCOLOR and .LINKHIGH - VGA colors of links in normal and high (selected)
  150. states in the native help format.
  151.  
  152. The syntax of these commands is :
  153.  
  154. .LINKCOLOR x
  155.  
  156. or
  157.  
  158. .LINKHIGH y
  159.  
  160. Where x and y are the color of the link, which is a combination of the color
  161. of the foreground with the color of the background multiplied by 16.
  162.  
  163. The colors that can be used for both fore and background are :
  164.  
  165.   Black     = 0
  166.   Blue      = 1
  167.   Green     = 2
  168.   Cyan      = 3
  169.   Red       = 4
  170.   Magenta   = 5
  171.   Brown     = 6
  172.   LightGray = 7
  173.  
  174. The colors that can be used only for the foreground are :
  175.  
  176.   DarkGray     = 8
  177.   LightBlue    = 9
  178.   LightGreen   = 10
  179.   LightCyan    = 11
  180.   LightRed     = 12
  181.   LightMagenta = 13
  182.   Yellow       = 14
  183.   White        = 15
  184.  
  185. For example : to set the normal color of a link to light green on blue, use
  186.  
  187. .LINKCOLOR 26
  188.  
  189. where 26 = 10 + 16 * 1. (10 = light green, 1 = blue).
  190.  
  191. Creating Multiple Source Projects :
  192.  
  193. Use the .INCLUDE commands in the source of your .HDF file, to include an
  194. additional source file.
  195.  
  196. For Example :
  197.  
  198.  .. some stuff 
  199.  
  200. .include 2ndfile.hdf
  201.  
  202.  .. additional stuff
  203.  
  204. will process 2NDFILE.HDF in the middle of our source file.
  205.  
  206. Please notice - .INCLUDE commands can be nested in your source file,
  207. it is however not recommended to nest them too deep, helpC does not
  208. close the input file when a .INCLUDEd file is processed, in order to
  209. minimize help generation time - there is however, a limit on the number
  210. of open files that can be used by a program - this is a limit set by dos.
  211.  
  212. GUI Font based targets :
  213.  
  214. The .FIXEDFONT command is used to define a non proportional font as the 
  215. default font of the help database. Currently the only targets affected
  216. by this command are windows winHelp v3.x. If you find that your help 
  217. databases are not aligned after they are converted to winHelp format, use 
  218. this command and re-compile. This command has no effect on targets that are 
  219. different from the targets mentioned before.
  220.  
  221.  
  222. *******************************************************************************
  223. *                             Topic Index Format                              *
  224. *******************************************************************************
  225.  
  226.   The topic index table format is as follows :
  227.  
  228.   TOPIC     - 40 charcters string key - this is the topic "name".
  229.   FILENAME  - 38 characters string field - includes the name of the
  230.               help raw data file. (Notice - V1.0 ignores the value of this 
  231.               field, it is here for future expansion).
  232.   START     - longint (long) field that contains the offset from the data file
  233.               start, to the start of the topics text data, in bytes.
  234.   LEN       - integer (int) field that contains the length (in bytes) of the 
  235.               text data of the topic.
  236.   TITLE     - 50 characters string key - the title of the topic.
  237.  
  238. *******************************************************************************
  239. *                             Links Index Format                              *
  240. *******************************************************************************
  241.  
  242.   The links index table format is as follows :
  243.  
  244.   TOPIC     - 40 characters string key - the name of the topic that 
  245.               has the link.
  246.   SEQ       - integer (int) key - contains the sequential number of 
  247.               the link in the topic. (This way you can assign the links
  248.               order in the topic).
  249.   LINK      - 40 characters string key - the name of the link topic to
  250.               display if the link is chosen.
  251.   LINE      - integer (int) field - the line (from the start of the topic) 
  252.               this link is displayed on.
  253.   COL       - integer (int) field - the column this link is displayed on.
  254.   TXT       - 60 characters string field - the text to display on the line.
  255.  
  256. *******************************************************************************
  257. *                               Set-File-Format                               *
  258. *******************************************************************************
  259.  
  260.   The set file is a text file that contains one entry in each line, using
  261.  the following format :
  262.  
  263. topic-index-table name
  264. links-index-table name
  265. help-raw-data-file name
  266. number-of-topics
  267. length-of-file
  268. version-of-generating-compiler
  269. link-normal-color
  270. link-high-color
  271.  
  272. *******************************************************************************
  273. *                               Implementation                                *
  274. *******************************************************************************
  275.  
  276.   Notice - The Paradox tables (Topic, Links) include one additional field
  277.  (wtGeneration) for future expansion purpose only.
  278.  
  279. *******************************************************************************
  280. *                                Distribution                                 *
  281. *******************************************************************************
  282.  
  283.   To distribute a database of your creation, compile the help definition
  284.  file, and include the HELPENG.EXE file with the .DB, .PX files, and the
  285.  .HDT file created by the compiler. 
  286.  
  287.   If you generated the Windows (/W30, /W31) help file, you can complile the 
  288.  .HPJ and .RTF generated file, and distribute the resulting .HLP .
  289.  
  290.   If you generate QH, THELP, POPHELP or TVHC use these packages compilers to
  291.  compile you sources into native binary codes. (helpMake, HL, makeHelp and TVHC)
  292.  
  293.   For examples on these compiler's command lines please refer to the quick
  294.  start section of HLPDK.DOC, or to your compiler's documentation.
  295.