home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / tools / help / pvhc / setup.txt < prev   
Encoding:
Text File  |  1994-04-19  |  16.4 KB  |  412 lines

  1. Welcome and Thanks
  2.  
  3. Thank you for taking the time to try out the PolyVision Help
  4. Compiler for DOS version 1.0. It is a unique and easily
  5. integrated programming tool that allows you to create, compile
  6. and incorporate customized context-sensitive, cross-referenced
  7. help into you DOS text mode applications.
  8.  
  9. Working with your favorite word processor and saving your
  10. document in WordPerfect 4.2 format, you use the compiler to
  11. reformat the document into a form the help function understands.
  12.  
  13. Then using three standard C functions in your program, you then
  14. (1)initialize the system, (2)request help text pages at different
  15. times throughout the run of the program and then (3)close it down
  16. when the program terminates.
  17.  
  18. No separate TSR. At the slim cost of 5-6K, the system is hard
  19. coded to your program. We're sure you'll find it simple,
  20. practical and most of all useful. 
  21.  
  22. ================================================================
  23.  
  24. The PVHC.ZIP file comes with 10 files:
  25.  
  26.     phc.exe - the PolyVision Help Compiler
  27.     phctest.exe - a program to test your help files
  28.     printdoc.bat - prints setup file to printer
  29.     read1st.txt - features and requirements
  30.     pvhcl.lib - Large model library file for linking
  31.                  functions (Borland C++ 3.1 version)
  32.     pvhcl4.lib - Large model library file for linking
  33.                  functions (Borland C++ 4.0 Chicago version)
  34.     pvhc.h - include header file for C functions
  35.     setup.txt - this file in standard text format  
  36.     setup.hlp - this file in help format for demo
  37.                 purposes (see Testing Your Help File
  38.                 below to find out how to view this
  39.                 file using phctest.exe)
  40.     pvhctry.c - c file to demo a simple test
  41.  
  42. The following should allow you to beginning using this program in
  43. a matter of minutes. Please note that [ENTER] refers to hitting
  44. the enter key on your keyboard.
  45.  
  46. (1) Technical Notes
  47. (2) Creating the WordPerfect File
  48. (3) Page Procedure
  49. (4) Extended Characters
  50. (5) Compiling the Help File
  51. (6) Testing Your Help File 
  52. (7) Features
  53. (8) Placing Help in Your Program
  54.  
  55.  
  56. LICENSING AGREEMENT
  57.  
  58. (C) 1994 PolyVision SoftWare
  59. All Rights Reserved.
  60. All trademarks and registered trademarks are property of their
  61. respective owners.
  62.  
  63. Please note that this is a shareware program. Please register
  64. with check or money order of $25 per copy in U.S. funds made
  65. out to:  Rigo Muniz
  66.  
  67. Mail to:    
  68.     PolyVision SoftWare
  69.     P.O. Box 16074
  70.     West Palm Beach, FL  33416-6074
  71.  
  72. The registration fee is $25 per programmer's copy. Thank you for
  73. your honesty! No guarantee is made or implied. The program is
  74. provide "as is". 
  75.  
  76. Once you have registered, you may incorporate the functions
  77. provided in the pvhcl.lib in your programs in executable 
  78. form only - ROYALTY FREE. You may not distribute the support
  79. programs phc.exe, phctest.exe as stand alone parts of your
  80. program, but you may distribute copies of the achieved pvhc
  81. files for shareware distribution.
  82.  
  83. We have done our best to ensure that the programs and code here
  84. are error free. Still, PolyVision SoftWare and its agents
  85. disclaim all warranties, expressed or implied, including but not
  86. limited to any implied warranty as to the merchantability or
  87. fitness for a particular purpose. In no event will PolyVision or
  88. its agents be liable for any damages resulting from the use
  89. of this software. The end user agrees to accept all risk by using
  90. this software.
  91.  
  92. Thanks,
  93.  
  94. PolyVision SoftWare
  95.  
  96.  
  97. TECHNICAL NOTE:
  98.  
  99. Maximum number of characters 20,000 per page
  100. Maximum number of help pages 2,001
  101.  
  102.  
  103. CREATING THE WordPerfect FILE
  104.  
  105. Once you've opened WordPerfect, set your margins to 1" in from the left
  106. and your right margin to 6.5" so you have a total of 5.5" for text.
  107. Use a fixed width font such as courier at 12 point or 10 cpi.
  108.  
  109. At the start of the file you should give the entire file a name of up
  110. to 24 characters of your choosing. To do this type a backslash immediately
  111. followed by a dollar sign then type your title and end the line with a hard
  112. return (press [ENTER]). 
  113.   
  114.   Example:
  115.        \$MyProg V2.0 Help File[ENTER]
  116.  
  117. This should only be done ONCE at the beginning of the file. It will come
  118. in handy if anyone should (at the DOS prompt) enter the command:
  119.  
  120.        TYPE MyProg.hlp
  121.  
  122. Only your first line will be printed to the screen and then returned to the
  123. prompt.
  124.  
  125.  
  126. PAGE PROCEDURE:
  127.  
  128. Begin with the first page - page 0 (zero). Type a backslash immediately
  129. followed by a pound sign. Type your title of up to 30 characters. End the
  130. line with a hard return (press ENTER). Be careful of beginning and ending
  131. spaces as this may generate matching errors.
  132.   
  133.   Example       
  134.       \#File Menu[ENTER]
  135.  
  136. Proceed to type your text. Allow WordPerfect to wrap your text as it
  137. normally does. Use hard returns for ending paragraphs and spacing. If
  138. you need to indent, do NOT use tabs. Instead use spaces. Any time there
  139. are more than two spaces in a row, the PolyVision Help Compiler will
  140. automatically insert a compression code for whatever the number of spaces.
  141. This will help compact the final help file. It will not slow down the final
  142. performance.  
  143.  
  144. Page 0 is the page the user will get if F1 is pressed during a help
  145. session. You will probably want to use this page for help on help.
  146.  
  147. EXTENDED CHARACTERS:
  148.  
  149. The WordPerfect 4.2 format uses the complete ASCII character set.
  150. Therefore, you can use all characters from 1 through 254. To use
  151. the extended characters (1 thru 32 and 127 thru 254) in versions
  152. of WordPerfect 5.0 and above, you must find them in the WordPerfect
  153. character sets (1 through 8). The PolyVision Help Compiler will accept
  154. these as though they were single characters (not counting the code).
  155. You may also use them in or as your titles. This will allow you to
  156. draw boxes, arrows, symbols and other characters you may require.
  157.  
  158. When you come to the end of the WordPerfect page (but not the end of
  159. your help page), allow WordPerfect to insert a soft-page return. There
  160. are five color codes for your text. (See PLACING HELP IN YOUR PROGRAM
  161. for more on setting colors.)
  162.  
  163.         HelpWindClr - text window color
  164.         HelpBordClr - border color
  165.         HelpRefClr  - reference color
  166.         HelpGlosClr - glossary color
  167.         HelpBoldClr - bold text color
  168.  
  169. While creating the help file you will not have to do anything to use the
  170. HelpWindClr or the HelpBordClr these are used as the default text and
  171. border colors. Your page title will become part of your border. For text
  172. you wish to color in a "bold" color (i.e. a different color to separate it
  173. apart from the regular text) select the text in WordPerfect and make it
  174. bold.
  175.  
  176. To REFERENCE another page, type that page's title exactly as you named it
  177. then select that text and make it underlined in WordPerfect. This will
  178. later show up in the help file using the HelpRefClr you've selected. When
  179. the user clicks on the text with the mouse or uses the arrow keys to move
  180. the cursor to it and presses enter - it will automatically go to the page
  181. it references. PHC matches the page name to the reference the page. No
  182. other action is required on your part. Be careful with spaces before and
  183. after titles.
  184.  
  185. For GLOSSARY references, use the same procedure as for REFERENCE except
  186. after selecting the text use strikeout instead of underline in WordPerfect.
  187. The only difference here is that it will use the HelpGlosClr and these
  188. may be shorter than a full reference page - that is up to you.
  189.  
  190. When you finally reach the end of your help page, insert a hard-page return
  191. (Control-Enter). The next page will be page 1 and so on. Repeat the page
  192. procedure. Pages may be as long or a short as you need them to be.
  193.  
  194. Once you have finished the help file, simply save it as a WordPerfect 4.2
  195. file. Exit WordPerfect and prepare to compile the file.
  196.  
  197. NOTE: Please avoid using any other codes than the ones explained above.
  198.       Although the PolyVision Help Compiler will usually ignore and discard
  199.       these, it is safer not to fit too many codes into your text file.
  200.     
  201.  
  202. COMPILING THE HELP FILE:
  203.  
  204. Syntax: PHC [option] [input_file] [output_file]
  205.  
  206. option     : -h  make C header type file
  207. input file : complete name
  208. output file: if not specified uses input file's prefix tagging
  209.              on an .hlp suffix 
  210.  
  211. The compiler does NOT destroy the form of the original file. It merely
  212. uses the WordPerfect file as a reference and creates a new file in the
  213. PolyVision Help File format. This way you can create the help file in
  214. increments and also use the text for a printed manual.
  215.  
  216. First be sure that the help file is in the same path as the PolyVision Help
  217. Compiler (PHC.EXE).  On the command line you can use the -h switch which
  218. will use your page names to create #defines that refer to your pages. For
  219. instance if you named page 3 File Menu. A header file using your output
  220. file name (such as MyProg.h) would have a reference such as
  221.  
  222.         #define FILE_MENU  3
  223.  
  224. and so on. Notice that the name has been declared with all caps and the
  225. space has been replaced the an underbar ( _ ). This is helpful, especially
  226. if you're shifting your pages around as you create the help file. If you do
  227. not wish to include this option, go directly to the input_file name.
  228.  
  229. The input file name is the only argument that MUST be on the command line.
  230. You must type the complete file name such as  MyProg.wp4 - both prefix and
  231. suffix.
  232.  
  233. The output file can be specified if you wish, otherwise a .hlp suffix will
  234. be appended to the original file's name. 
  235.  
  236. NOTE: PHC automatically deletes a file of the same name as the help file
  237.       being created if it's on the path and replaces it with the new one.
  238.       Please be aware of this. Don't name the WordPerfect file with an
  239.       .hlp suffix.    
  240.    
  241.  
  242.  
  243. TESTING YOUR HELP FILE:
  244.  
  245. Syntax: PHCTEST [help_file]
  246.  
  247. The compiled help file should be on the same path as phctest.exe or you
  248. must provide the name in full
  249.  
  250.     EXAMPLE:
  251.       same path
  252.          phctest MyProg.hlp[ENTER]       
  253.  
  254.       different directory
  255.          phctest c:\borland\MyProg.hlp[ENTER]
  256.  
  257. The program phctest.exe is provided so you can test your help file without
  258. loading it into a program. The color attributes are preset as follows.
  259.  
  260.        HelpWindClr = BLUECYAN     - cyan background    blue text
  261.        HelpBoldClr = HIWHITECYAN  - cyan background    white text
  262.        HelpBordClr = REDWHITE     - gray background    red text
  263.        HelpGlosClr = BLACKCYAN    - cyan background    black text
  264.        HelpRefClr  = YELLOWCYAN   - cyan background    yellow text
  265.  
  266. FEATURES:
  267.  
  268. The features are the same as are provided when within your program. Press
  269. F1 to start the help session.
  270.  
  271.     KEYBOARD:
  272.     arrow keys - scroll cursor up, down, left, right
  273.     page up - scrolls text up one window's worth 
  274.     page down - scrolls text page down one window's worth
  275.     end - goes to end of current line
  276.     home - goes to beginning of current line
  277.     control page up - scrolls forward to next help page (i.e. pg1 to pg2)
  278.     control page down - scrolls back one help page (i.e. pg2 to pg1)
  279.     F1 - goes to page zero
  280.     alternate+F1 - goes to previous help page (i.e. pg3 to pg7)
  281.     enter - cursor over a reference or glossary note; goes to that page
  282.     escape - ends help session
  283.  
  284.     MOUSE: 
  285.     left button - cursor over reference or glossary note; goes to that page
  286.                   over ALT+F1 instruction at the bottom of the screen will
  287.                    perform that function
  288.                 RIGHT SIDE OF HELP SCREEN:
  289.                    over up triangle will move up one line
  290.                    over up arrow will page up 
  291.                    over down arrow will page down
  292.                    over down triangle will move down one line
  293.    
  294.     right button - escape
  295.  
  296. Using PHCTEST.EXE you can make sure everything is working properly.
  297. Pressing the F10 function key will exit you from the phctest program.
  298.  
  299.  
  300. PLACING HELP IN YOUR PROGRAM:
  301.  
  302. To use the help functions in your programs requires only a few simple
  303. steps. In the Borland IDE (Integrated Development Environment -  the
  304. editor part) go to Option|Directories and be sure that there is a clear
  305. reference to where you placed the  pvhc.lib  file in the libraries section
  306. and the  pvhc.h  file in the include section. You should also go to
  307. Options|Make and include Check auto-dependencies. On ALL modules that
  308. refer to any of the functions or colors of the PolyVision Help system
  309. be sure to include the line 
  310.  
  311.         #include "pvhc.h"
  312.  
  313. Within your main function you should set or call a function that first sets
  314. the Help Window Colors such as follows:
  315.  
  316.        HelpWindClr = 0x31;      /* cyan background  blue text   */
  317.        HelpBoldClr = 0x3F;      /* cyan background  white text  */ 
  318.        HelpBordClr = 0x74;      /* gray background  red text    */
  319.        HelpGlosClr = 0x30;      /* cyan background  black text  */
  320.        HelpRefClr  = 0x3E;      /* cyan background  yellow text */
  321.   
  322. This is an 8-bit (one unsigned char) reference to the colors used. You
  323. might consult your Borland C++ Library Reference manual under textattr
  324. for further information on how to set these color schemes. You may change
  325. these colors anytime during the run of your program. That way if your user
  326. wishes to go to a color mode or a black and white mode - you can change
  327. these colors to their needs and taste.
  328.  
  329. Next, before you call any other functions you have to call the initPVHelp
  330. function. It requires a string with the full name of the help file. You may
  331. also include the directory location also.
  332.  
  333.    EXAMPLES:
  334.        initPVHelp("MyProg.hlp");
  335.     
  336.     also
  337.        initPVHelp("C:\MyDir\MyProg.hlp");
  338.  
  339. This prepares the help function by opening and maintaining the help file,
  340. and opens a buffer using farcalloc for the maximum size page in your file
  341. (not the entire file). If for some reason this cannot happen initPVHelp
  342. will return the following:
  343.  
  344.         -1 - Could not open help file.
  345.         -2 - Help file not PVHC type.
  346.         -3 - Could not allocate help buffers.
  347.  
  348. otherwise it returns a 1 (one). You may wish to call it like this:
  349.  
  350.     EXAMPLE:       
  351.         if(initPVHelp("MyProg.hlp") != 1)
  352.            MessageWindow("Could not initiate help file.");
  353.  
  354. Once initPVHelp has been established you may call to your pages one at a
  355. time from anywhere in you program. getHelpPage takes the argument of your
  356. requested page number. For instance if in the File Menu part of your
  357. program your user pressed F1 and you have help page 3 set for it you could
  358. use a switch argument like this:
  359.  
  360.     EXAMPLE:
  361.         int key;  /* keyboard or mouse number */
  362.         :
  363.         switch(key)
  364.         :
  365.         case F1_KEY: getHelpPage(3); /* shows page 3 in the help file */
  366.                      break;
  367.         :  
  368.  
  369. That's all there is to it. getHelpPage retrieves that page from you help
  370. file opens the help window and performs the same way as demonstrated above
  371. in the PHCTEST.EXE section. When the user presses escape, he returns to
  372. your program. If for some reason initPVHelp did not activate, getHelpPage
  373. will simple return without doing anything. In other words if the user
  374. pressed F1 in the example above, nothing would happen. On ALL modules that
  375. refer to any of the functions or colors of the PolyVision Help system
  376. be sure to include the line #include "pvhc.h". 
  377.  
  378. When the help window closes, it defaults to hiding the cursor and
  379. mouse cursor. If you wish to make the cursor visible just add a call
  380. to showcursor(). This will return your cursor to its original size
  381. and position. The showcursor and hidecursor routine is part of the
  382. pvhcl.lib and is used by getHelpPage(). 
  383.  
  384.  EXAMPLE:
  385.      case F1_KEY: getHelpPage(3); /* shows page 3 in the help file */
  386.                   showcursor();
  387.                   break;
  388.     
  389.  
  390. Before your program exits you must make one final call which is to
  391. DestroyPVHelp. It takes no arguments but safely closes the opened help
  392. file and frees the allocated memory. If initPVHelp was not activated this
  393. function does nothing.
  394.  
  395.         EXAMPLE:
  396.            DestroyPVHelp();   /* closes down PVHelp system */
  397.  
  398. That's all there is to it! On ALL modules that refer to any of the
  399. functions or colors of the PolyVision Help system be sure to include
  400. the line #include "pvhc.h". You should also go to Options|Make and
  401. include Check auto-dependencies. Be sure you are using the LARGE model.
  402.  
  403. GOOD PROGRAMMING!
  404.  
  405. PolyVision SoftWare
  406.  
  407. (C)1994 PolyVision SoftWare
  408. All Rights Reserved.
  409.  
  410.  
  411.  
  412.