home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / help / a285_1 / !ReadMe next >
Text File  |  1993-06-02  |  11KB  |  217 lines

  1. Application Help Program
  2. Documentation for version 1.00
  3.  
  4. (C) Tony Patterson, 1993
  5.  
  6. THE HELP PROGRAM IS FREEWARE. IT CAN BE FREELY DISTRIBUTED AS LONG AS THE
  7. !APPHELP DIRECTORY AND ALL THE FILES IN IT, AND NO OTHERS ARE INCLUDED.
  8. FUTURE VERSIONS CAN BE DISTRIBUTED AS PART OF ANY VIRUS-FREE SOFTWARE
  9. WHETHER IT IS FREEWARE, SHAREWARE OR COMMERCIAL SOFTWARE, AS LONG AS
  10. !APPHELP IS LOCATED IN THE ROOT DIRECTORY OF THE DISK OR ARCHIVE THAT IS
  11. BEING DISTRIBUTED. IT MUST NOT BE PRESENT INSIDE ANY OTHER DIRECTORY OR
  12. APPLICATION DIRECTORY. FILES GENERATED BY MAKEHELP MAY BE INCLUDED WITH
  13. SOFTWARE RELEASES, AS LONG AS !APPHELP IS ALSO DISTRIBUTED AS DETAILED
  14. ABOVE. SUCH FILES MAY BE LOCATED IN SUBDIRECTORIES AND IN APPLICATION
  15. DIRECTORIES. NO CHARGE MUST BE MADE FOR THE !APPHELP SOFTWARE OR THE MAKEHELP
  16. COMPILER EXCEPT FOR REASONABLE DISTRIBUTION COSTS.
  17.  
  18. ANY QUERIES OR COMMENTS MAY BE ADDRESSED TO anthonyp@central.susx.ac.uk. BUG
  19. REPORTS ARE WELCOME.
  20.  
  21. THIS VERSION IS NOT COMPLETE, BUT MAY BE DISTRIBUTED ACCORDING TO THE ABOVE
  22. TERMS. PLEASE REPLACE ANY OLD COPIES OF APPHELP WITH THIS NEW VERSION AS IT
  23. NOW HAS OFFICIAL FILE TYPE AND MESSAGE NUMBERS. YOU SHOULD SETTYPE ANY OLD
  24. APPHELP FILES TO TYPE &3F6.
  25.  
  26. IF YOU WISH TO USE THE HELP APPLICATION IN A SOFTWARE RELEASE OF YOUR OWN,
  27. PLEASE MAIL ME SO THAT I CAN LET YOU KNOW OF UPDATES TO THE SOFTWARE WHEN THEY
  28. BECOME AVAILABLE SO THAT YOU CAN ALWAYS USE THE MOST UP TO DATE VERSION.
  29. IF YOU CANNOT MAIL ME THEN WRITE TO ME AT
  30.  
  31.   57 LONGWAY AVE.
  32.   CHARLTON KINGS,
  33.   CHELTENHAM
  34.   GL53 9JH
  35.  
  36. The Application Help program is designed to be the last word in Help
  37. Applications. To try it out, double click on the !AppHelp icon. This will
  38. load the Help on Help file. From there on the program should document
  39. itself. The purpose of this document is to describe how to write help files
  40. for your own applications. This is done with the MakeHelp program supplied.
  41.  
  42. makehelp [-e][-s][-v] <in_file> <out_file>
  43.  
  44.     -e export, include table of page and section names so they can be
  45.        passed to the help displayer instead of section or page numbers
  46.        THE -e OPTION IS NOT CURRENTLY SUPPORTED
  47.     -s spelling, check spelling against file named in environmental
  48.        variable Dictionary$File, and list words with questionable
  49.        spelling on standard output
  50.     -v verbose, print list of section and page names
  51.  
  52. MakeHelp is run from the command line, which allows it to be placed in
  53. makefiles such as those used by amu. If you wanted to compile a help file
  54. from the file HelpSource in the current directory, with spelling check, you
  55. would use the commands:
  56.  
  57. Set Dictionary$File <Insert the filename of the dictionary here>
  58. makehelp -s HelpSource !Help
  59.  
  60. The input file is a text file with certain special sequences. It is
  61. recommended that you refer to the HelpSource file to help you understand the
  62. following description. These are either escapes or commands. The most
  63. important types of sequence are commands. Commands are sited on lines of
  64. their own, there must be no other characters following a command unless it
  65. has parameters, this means no trailing spaces. Commands all begin with a
  66. full stop and are written in capital letters. The following commands are
  67. used:
  68.  
  69. .END
  70. .PAGE <page_name>
  71. .SEARCH
  72. .SECTION <section_name>
  73.  
  74. Escapes occur at any place in the text and are used to apply special effects
  75. to the output text. They begin with a bar character (|), and are followed by
  76. a single capital letter. Sometimes escapes have parameters, these occur
  77. within a pair of curly brackets, and consist of a list of parameters
  78. separated by commas. The space character should not occur anywhere within an
  79. escape. The following escapes are provided.
  80.  
  81.  ||                          Print the bar character (|).
  82. *|B                          Print a bullet character.
  83.  |E{Effect}                  Text Effect (Used to change to the font).
  84. *|G{section_name,page_name}  Link to glossary entry on given page.
  85.  |J{section_name,page_name}  Jump to given page.
  86. *|R                          Rule off (useful for tables).
  87.  |S{sprite_name}             Plot named sprite.
  88.  |T                          Tab character (Can accept real tabs too).
  89.  |H                          Half tab.
  90.  |F{filename}                File to run when button pressed
  91.                              - must have full path.
  92.  
  93. The escapes marked by an asterisk are currently not implemented by both
  94. MakeHelp and !AppHelp. Parameters to escapes and commands consist of at
  95. least one, and not more than 29 alphanumeric characters and the underline
  96. character, (A-Z, a-z, 0-9, _). Case is significant. The rest of the text is
  97. just plain text, but it must fit into a structure given by commands:
  98.  
  99. <Title of Help File>
  100. .SECTION <sect1>
  101. .PAGE <page1>
  102. <Text goes here>
  103. .SEARCH
  104. <Search window suggestions go here>
  105. .END
  106.  
  107. The title of the file must go on the very first line, and should not run on
  108. to the second. The .SECTION and the .PAGE must occupy the next two lines, it
  109. is not possible to include text before the first section of a file, or
  110. before the first page of a section. This also means that a .SECTION command
  111. must always be immediately followed by a .PAGE. The text following this will
  112. go on the very first page and it is recommended that this is a page of
  113. contents. The file is split in to sections, which are like chapters, and are
  114. themselves divided in to pages. A new page or section is begun with the
  115. .PAGE or .SECTION command. It is important that all sections have unique
  116. names, and that all pages within a section have unique names, it is also
  117. important to use meaningful names, so they can be easily remembered. The
  118. !AppHelp browse buttons are able to browse the pages in a section, but
  119. cannot jump between pages. To do this, page to page links are required, like
  120. those that are activated by clicking on a word when the hand-shaped pointer
  121. is visible. These are made by including the J escape in the text. The
  122. parameters it uses are the names that you give to the section and page that
  123. you wish to jump to. A new page or section is begun with the .PAGE or
  124. .SECTION command. If the phrase that is used by the J escape ends before the
  125. end of the line another escape (E, F, J or G) must be used to mark the end
  126. of the phrase. Sprites can be placed in the area affected by the J escape.
  127. The G escape is similar to the J escape, but instead of jumping to another
  128. page, it uses the text on the destination page as a glossary entry which is
  129. displayed in a pop-up window. Glossary pages should not be accessible from
  130. other pages. The F escape runs the named file when its corresponding button
  131. is pressed. The filename given must have a full pathname, which can be
  132. obtained from system variables if necessary. The named file can be an
  133. application, a runnable file or even another help file. The E escape takes a
  134. parameter which describes the sort of text that it produces:
  135.  
  136. NORMAL    The standard text used, use to switch off other effects
  137.           caused by E, J or G escapes.
  138. TITLE     Main title for the page.
  139. BOLD      Used to highlight key words such as menu entries and
  140.           button names.
  141. SMALL     Used to make observations about the preceeding text.
  142. ITALIC    Used to emphasise things.
  143. SUBTITLE  Sub Heading.
  144.  
  145. The MakeHelp program provides reasonably helpful error messages which should
  146. help you correct any errors reasonably quickly. 
  147.  
  148. The location of the help file must be carefully considered because the Help
  149. Application uses other files in the directory where it finds the help file.
  150. These are:
  151.  
  152. HelpSpr    - Low resolution colour sprites
  153. HelpSpr22  - High resolution colour sprites
  154. HelpSpr23  - High resolution monochrome sprites
  155. HelpExtra  - File containing details of bookmarks and annotations
  156.  
  157. It is obviously important to hide these files somewhere where they won't be
  158. overwritten. Usually it is fine to put them in an application directory, but
  159. sometimes it is necessary for a help file to appear alone, for instance to
  160. document a command in the library, or to give help to novice users about
  161. built in features of the machine. In these cases, it is usually best to make
  162. a small application containing the help file and a !Run file of type Obey
  163. with the following line in it:
  164.  
  165. <Obey$Dir>.!Help
  166.  
  167. and a sprite file with a sprite !<Application name> and possibly a small
  168. version of the sprite too.
  169.  
  170. The dictionary file, <Dictionary$File> must contain alphabetically sorted
  171. words, one to a line, and the output of MakeHelp should be saved either by a
  172. redirection command, or with a task window, and run through a better spell
  173. checker from a proprietary word processor, since the supplied dictionary
  174. does not have many words.
  175.  
  176. When a task handle is given, the help window will be shut when the calling
  177. task terminates. In the unlikely event that you want the window to stay
  178. open, pass a task handle of 0.
  179.  
  180. Programs can call the help application up to display a particular page of
  181. help using the following command:
  182.  
  183. *ShowHelp <HelpFile> <Section number> <Page number> <Task handle>
  184.  
  185. In future versions, message number &82601 (Message_AHSendHelp) will be a
  186. possible alternative way to send help using a message block of the following
  187. format:
  188.  
  189.    R1+20  Section number
  190.    R1+24  Page number
  191.    R1+28  Task handle
  192.    R1+32  Help file, null terminated
  193.  
  194. This should be sent as a broadcast message of type 17 (Not recorded).
  195.  
  196. The 'Hot key' help function is supported by message &82600
  197. (Message_AHRequestHelp). When your task receives this, it should endeavour
  198. to send help to the AppHelp program either using the ShowHelp command or
  199. Message_AHSendHelp. It must acknowledge the message (this will be done
  200. automatically if you use Message_AHSendHelp provided you copy the my_ref
  201. field of the original message into the your_ref field of the reply. If you
  202. use ShowHelp to reply, you should explicitly acknowledge the message by
  203. sending a message type 19, after copying my_ref into your_ref. If you can,
  204. use the window and icon handles given to provide help specifically for those
  205. objects. You should not acknowledge the message if you do not provide any
  206. help, in which case the AppHelp support code will beep to indicate failure
  207. to find any help. The format of Message_AHRequestHelp is:
  208.  
  209.    R1+20  Window handle
  210.    R1+24  Icon handle
  211.  
  212. Thank-you to Dean Murphy of Acorn for discovering that
  213. <AppHelp$Dir>.SendToHelp could be mistaken for the Icon virus by !VKiller,
  214. (This software has been checked by !VKiller 1.400 and it found no viruses)
  215. and for suggesting a configurable size type face. (Check the !Run file to
  216. try out the experimental large text version).
  217.