home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / CLIPB52.ZIP / MENU.ZIP / READ.ME < prev    next >
Encoding:
Text File  |  1990-05-15  |  4.0 KB  |  97 lines

  1. May 14, 1990
  2.  
  3. Welcome to Ogg's Menuing Module.
  4.  
  5. This is a module that will eventually define a complete SAA compatible
  6. menuing system (though it will not be limited to SAA compatibility).  It
  7. is being included here at the conference as an example of Clipper 5.0
  8. code that makes use of many of the new features and that follows modular
  9. programming techniques.  The final version will be distributed with 
  10. Clipper 5.0 as one of the example programs.
  11.  
  12.  
  13. SAMPLE1.PRG is an example of proper usage of the menu system.  Please note
  14. that it keeps a real-time clock going without the use of interrupts.
  15.  
  16.  
  17. Instructions for use:
  18.  
  19.    You must "hash include" OMENU.CH before attempting to use the commands.
  20.  
  21.    The commands are:
  22.  
  23.    DEFINE MENU
  24.      
  25.       This must proceed any menu definition.
  26.  
  27.    PROMPT <prompt> [COLOR <color>] [DO <do>] [INACTIVE]
  28.  
  29.       There should be one prompt command for every menu option.  
  30.  
  31.       <prompt> - the actual text for the prompt in quotes
  32.       <color>  - the color string for this prompt in this order:
  33.                     <Norm>,<Lett>,<Sel>,<OffNorm>,<OffSel>
  34.                  where:
  35.                     <Norm>    - color for unselected prompt (active)
  36.                     <Lett>    - color for hotkey in unselected prompt (active)
  37.                     <Sel>     - color for selected prompt (active)
  38.                     <OffNorm> - color for unselected prompt (inactive)
  39.                     <OffSel>  - color for selected prompt (inactive)
  40.       <do>     - function name to execute (minus parens and paramters, will
  41.                  be passed the menu object as its only paramter).  Default
  42.                  is MenuExit, which will exit menu and leave the current
  43.                  selection as chosen.
  44.  
  45.       INACTIVE - Make option unselectable
  46.  
  47.    PROMPT LINE
  48.  
  49.       Draw line across menu here separating items
  50.  
  51.    HOTKEY <key> DO <do>
  52.  
  53.       <key> - ASCII value of hotkey
  54.       <do>  - function name to execute (minus parens and paramters, will
  55.               be passed the menu array and key pressed as its paramters).  
  56.  
  57.    IDLE <sec> [SECONDS] DO <do>
  58.  
  59.       <sec> - idle number of seconds to wait before executing <do>.  This
  60.               action will happen every multiple of <sec> seconds.  Make sure
  61.               that longest pauses are defined first so that they have 
  62.               priority.
  63.       <do>  - function name to execute (minus parens and paramters, will
  64.               be passed the menu array and time passed as its paramters).  
  65.  
  66.       NOTE:  SECONDS designation is optional, but makes code clearer to 
  67.              read.
  68.  
  69.    CREATE <menu> @ <y>, <x> ALIGN [LEFT | RIGHT | CENTER] ;
  70.          [COLOR <color>] ;
  71.          [BORDER SINGLE | DOUBLE | NONE] ;
  72.  
  73.       <menu>  - Menu variable to put menu in.  Should be declared first.
  74.       <y>,<x> - "Reference" row and column
  75.       ALIGN   - This determines where menu is placed.  If LEFT is chosen,
  76.                 the upper left hand corner of the menu will be at <y>,<x>.
  77.                 If RIGHT is chosen, it will be the upper right hand corner.
  78.                 If CENTER is chosen, the menu will be horizontally and 
  79.                 vertically centered around that point (@ 12,40 ALIGN CENTER
  80.                 puts the menu in the center of the screen).
  81.        COLOR  - Default menu color in form listed under "PROMPT."  This can
  82.                 be overridden for each prompt.
  83.        BORDER - SINGLE line, DOUBLE line or NONE - No Border.
  84.  
  85.  
  86. See OMENU.CH for list of "public" functions for this module.  Please keep
  87. in mind that this module is just included as an example (though it does
  88. work) and may be changed before final release.
  89.  
  90. ARRAYFUN.PRG and ARRAYFUN.CH define a smaller module that gives a good
  91. example of how code blocks are properly used.  Though Ogg's Menuing Module
  92. is the only module that currently uses ACOMP() it was moved to a new module
  93. because it is of general use.  It was not "published" in the Menuing
  94. Module because it is not specific to menus.
  95.  
  96. Have at! 
  97.