home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / OOPTUT34.ZIP / HELPCOMP.TXT < prev    next >
Text File  |  1993-06-12  |  6KB  |  170 lines

  1.              Turbo Vision help file compiler (TVHC.EXE).
  2.              ===========================================
  3.  
  4.     Refer to OOPHELP.TXT for an example of a help source file.
  5.  
  6.     This program takes a help script and produces a help file (.HLP)
  7.     and a help context file (.PAS).  The format for the help file is
  8.     very simple.  Each context is given a symbolic name (i.e FileOpen)
  9.     which is then put in the context file (i.e. hcFileOpen).  The text
  10.     following the topic line is put into the help file.  Since the
  11.     help file can be resized, some of the text will need to be wrapped
  12.     to fit into the window.  If a line of text is flush left with
  13.     no preceding white space, the line will be wrapped.  All adjacent
  14.     wrappable lines are wrapped as a paragraph.  If a line begins with
  15.     a space it will not be wrapped. For example, the following is a
  16.     help topic for a File|Open menu item.
  17.  
  18.        |.topic FileOpen
  19.        |  File|Open
  20.        |  ---------
  21.        |This menu item will bring up a dialog...
  22.  
  23.     The "File|Open" will not be wrapped with the "----" line since
  24.     they both begin with a space, but the "This menu..." line will
  25.     be wrapped.
  26.       The syntax for a ".topic" line is:
  27.  
  28.         .topic symbol[=number][, symbol[=number][...]]
  29.  
  30.     Note a topic can have multiple symbols that define it so that one
  31.     topic can be used by multiple contexts.  The number is optional
  32.     and will be the value of the hcXXX context in the context file
  33.     Once a number is assigned all following topic symbols will be
  34.     assigned numbers in sequence.  For example,
  35.  
  36.        .topic FileOpen=3, OpenFile, FFileOpen
  37.  
  38.     will produce the following help context number definitions,
  39.  
  40.         hcFileOpen  = 3;
  41.         hcOpenFile  = 4;
  42.         hcFFileOpen = 5;
  43.  
  44.     Cross references can be imbedded in the text of a help topic which
  45.     allows the user to quickly access related topics.  The format for
  46.     a cross reference is as follows,
  47.  
  48.         {text[:alias]}
  49.  
  50.     The text in the brackets is highlighted by the help viewer.  This
  51.     text can be selected by the user and will take the user to the
  52.     topic by the name of the text.  Sometimes the text will not be
  53.     the same as a topic symbol.  In this case you can use the optional
  54.     alias syntax.  The symbol you wish to use is placed after the text
  55.     after a ':'. The following is a paragraph of text using cross
  56.     references,
  57.  
  58.       |The {file open dialog:FileOpen} allows you specify which
  59.       |file you wish to view.  If it also allow you to navigate
  60.       |directories.  To change to a given directory use the
  61.       |{change directory dialog:ChDir}.
  62.  
  63.     The user can tab or use the mouse to select more information about
  64.     the "file open dialog" or the "change directory dialog". The help
  65.     compiler handles forward references so a topic need not be defined
  66.     before it is referenced.  If a topic is referenced but not
  67.     defined, the compiler will give a warning but will still create a
  68.     usable help file.  If the undefined reference is used, a message
  69.     ("No help available...") will appear in the help window.
  70.  
  71.     The help file is created by typing the information using any word
  72.     processor and conveniently in the IDE of Turbo Pascal itself.
  73.     The extended ASCII characters such as ▀ and ▄ are entered by holding
  74.     down the Alt key and entering the ASCII values such as 223 and 220
  75.     using the Numeric Keypad to the right of the keyboard, releasing the
  76.     Alt key after each numeric entry.
  77.  
  78.   =======================================================================
  79.  
  80. Header for program TVHC.PAS  ->  .EXE
  81.  
  82. program TVHC;
  83.  
  84. {$S-}
  85.  
  86. {$M 8192,8192,655360}
  87.  
  88. uses Drivers, Objects, Dos, HelpFile;
  89.  
  90. .
  91. .
  92. .
  93.  
  94.   =======================================================================
  95.  
  96.          Syntax for use of the help file compiler TVHC.EXE
  97.   =======================================================================
  98.  
  99.  
  100.   Syntax:  TVHC <Help text>[.TXT] [<Help file>[.HLP] [<Symbol file>[.PAS]]
  101.      Help text   = Help file source
  102.      Help file   = Compiled help file
  103.      Symbol file = A Pascal file containing all the screen names as CONST's
  104.  
  105.  
  106.   e.g.  TVHC OOPHELP.TXT OOPHELP.HLP OOPHELP.PAS
  107.  
  108.  
  109.   The [<Symbol file>[.PAS]] is created as a Unit and must then be compiled
  110.   by the normal Turbo Pascal Compiler to produce [<Symbol file>.TPU].
  111.   <Symbol file> must be declared in the USES statement at the start of the
  112.   Turbo Vision program for which the help file has been created.
  113.   Thus for the Turbo Vision program OOPTUTOR.PAS, the Uses statement
  114.   includes OOPHELP, as shown below:
  115.  
  116. program OOPTutor;
  117.  
  118. {$X+,S-}
  119. {$M 16384,8192,655360}
  120. .
  121. .
  122. .
  123. uses
  124.   Dos, Objects, Drivers, Memory, Views, Menus, Dialogs, StdDlg, MsgBox, App,
  125.   DemoCmds, Gadgets, FViewer, HelpFile, OOPHELP, ColorSel, MouseDlg, Hexa,
  126.   Crt;                                  ========
  127.  
  128.  
  129.   =======================================================================
  130.  
  131.               Extract from the help file OOPHELP.TXT
  132.   =======================================================================
  133.  
  134.  
  135.   .topic NoContext=0
  136.  Turbo Pascal OOP Tutor and Examples ▄
  137.   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  138. Welcome to Turbo Pascal OOP Tutor.  This program allows notes on Turbo
  139. Pascal OOP to be viewed in a scrollable window, whilst the source code
  140. for a number of examples can also be inspected. These example programs
  141. can be run as executable files (.EXE) from the tutor screen.
  142. The ≡ menu is accessed by pressing Alt-Space.  All the other menus are
  143. accessed by pressing Alt-Z, where Z is the first letter of the menu.
  144. For example, the "Notes" menu is pulled down by Alt-N.
  145.  
  146. Press ESC to put this help screen away.
  147.  
  148. .topic Viewer=2
  149.  File viewer ▄
  150.   ▀▀▀▀▀▀▀▀▀▀▀▀
  151. A file viewer views the contents of a text file. You can use the
  152. arrow keys to move about in the file. A file is loaded via the
  153. {File│Open:FOpen} menu item.
  154. .
  155. .
  156. .
  157. .topic RightOOP
  158.  RightOOP ▄
  159.   ▀▀▀▀▀▀▀▀▀
  160. This program can be run by selection using the arrow keys and
  161. pressing ENTER, or else by pressing the highlighted key i.
  162.  
  163. This is an example of object-oriented programming using virtual
  164. methods.
  165. .
  166. .
  167. .
  168.  
  169.  
  170.