home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / MENUSPCS.ZIP / MENUS.PKG < prev    next >
Encoding:
Text File  |  1987-12-29  |  17.8 KB  |  436 lines

  1. =====================================================================
  2.  
  3.      Copyright (c) 1987 by Morton Goldberg, All Rights Reserved
  4.  
  5.                         Menus for Scheme (tm)
  6.  
  7.                                  by
  8.  
  9.                            Morton Goldberg
  10.                            3268 Alpine Dr.
  11.                         Ann Arbor, MI  48108
  12.  
  13.                            (313) 973-2571
  14.                         CompuServe: 72346,565
  15.  
  16. =====================================================================
  17.  
  18. Disclaimer of Liability
  19. -----------------------
  20.  
  21. Menus for Scheme is distributed strictly as is and without any
  22. warrantee or guarantee whatsoever.  Anyone who uses it does so
  23. strictly at his/her own risk.
  24.  
  25. =====================================================================
  26.  
  27. Shareware Statement
  28. -------------------
  29.  
  30. Menus for Scheme is shareware.  That means you can make non-
  31. commercial use of the files in this distribution and you can make
  32. non-commercial distribution of them.  Menus for Scheme is protected
  33. by copyright.  Commercial use or distribution is expressly prohibited
  34. without written permission of the author.  Further, any distribution
  35. you make must be complete and contain all the files listed below.
  36. Removal of this paragraph shall constitute violation of U.S.
  37. copyright law.
  38.  
  39. If you would like to have Menus for Scheme without the bother of a
  40. lengthy downloading session, or if you would like to contribute to
  41. its support and further development, become a registered user.  You
  42. will be sent the registered user distribution, which is described
  43. below.  To become a registered user, send a check or money order in
  44. the amount of $15.00 (United States dollars) along with your name and
  45. mail address to:
  46.  
  47.     Morton Goldberg
  48.     3268 Alpine Dr.
  49.     Ann Arbor, MI  48108
  50.  
  51. This offer is good only in the United States, Canada, and Mexico.
  52. Distribution of Menus for Scheme outside of these three countries
  53. for any purpose is expressly prohibited.
  54.  
  55. =====================================================================
  56.  
  57. System Requirements
  58. -------------------
  59.  
  60. Menus for Scheme requires PC Scheme by Texas Instruments (Ver. 2.0
  61. or later) and SCOOPS extension to PC Scheme.  It should run on any
  62. computer that runs PC Scheme and SCOOPS.  It supports the use of
  63. either a color monitor or a monochrome monitor.
  64.  
  65. The shareware distribution files require PC Scheme 3.0 to be used as
  66. provided.  If you have PC Scheme 2.0, you will have edit the sources
  67. and change all the references to #t and #f to t and nil or #!true and
  68. #!false.
  69.  
  70. =====================================================================
  71.  
  72. Contents of the shareware distribution
  73. --------------------------------------
  74.  
  75.   MENUS.PKG ...... This file -- contains the installation instructions
  76.   MENUS.REF ...... Disk file version of the Menus for Scheme program-
  77.                    mer's reference manual
  78.   PCS.DEF ........ Source code: Logitech mouse menu -- example of a
  79.                    top-level menu for the Scheme user-interface when
  80.                    a mouse is used
  81.   MENUS.S ........ Source code: the menu system.  Written with SCOOPS
  82.   MENEX.S ........ Source code: tutorial examples of menu applications
  83.   MENMOU.S ....... Source code: contains code linking the mouse menu
  84.                    defined in PCS.DEF to the menus in the user inter-
  85.                    face
  86.   MENKEY.S ....... Source code: replaces PCS.DEF and MENMOU.S as the
  87.                    top-level user-interface code when a mouse is not
  88.                    used
  89.   MENCO.S ........ Source code: menus for running the PCS compiler
  90.   MENDOS.S ....... Source code: menus for interfacing with DOS
  91.   MENLD.S ........ Source code: menus for loading Scheme .S and .FSL
  92.                    files
  93.   MENED.S ........ Source code: menus for interfacing with an external
  94.                    editor
  95.   PATCH.S ........ A example of a patch file that automatically loads
  96.                    the menu-based user interface whenever you start up
  97.                    PC Scheme
  98.  
  99. Contents of the registered user distribution
  100. --------------------------------------------
  101.  
  102.   Printed version of this file
  103.  
  104.   Printed version the Programmer's Reference Manual
  105.  
  106.   Printed listings of all the Scheme source code
  107.  
  108.   MS-DOS format 5-1/4 in. diskette containing:
  109.  
  110.     Latest versions of all files comprising the shareware
  111.     distribution in ASCII format (not ARC-ed) including any
  112.     enhancements that become ready to release after this text
  113.     was written.
  114.  
  115.     Ready-to-use fast-load files MENUS.FSL and MENEX.FSL.  With
  116.     these you can get started with Menus for Scheme in just a few
  117.     minutes.
  118.  
  119. =====================================================================
  120.  
  121. The Capabilities of Menus for Scheme
  122. ------------------------------------
  123.  
  124. Menus for Scheme can add the following capabilities to any PC Scheme
  125. program:
  126.  
  127.    -  Vertical and horizontal popup menus, both of which can be used
  128.       within the same application
  129.  
  130.    -  Menus can invoke other menus to any depth
  131.  
  132.    -  Menu item selection by moving a bar-cursor over an item
  133.       description and typing [Enter]
  134.  
  135.    -  Menu item selection by typing a single character (usually the
  136.       initial character the item description)
  137.  
  138.    -  Escape for any menu without making a selection by typing [Esc]
  139.  
  140.    -  Popup query windows which can be used to read in additional
  141.       information after a menu selection has been made
  142.  
  143.    -  Popup text windows which can be used to display results or
  144.       error messages
  145.  
  146.    -  Semi-automatic generation of menus from a list of files; a
  147.       programmer specified action is applied to the user selected
  148.       file
  149.  
  150.    -  Automatic sizing of the menus and the text and query windows
  151.  
  152.  
  153. =====================================================================
  154.  
  155. Condensed Installation Instructions
  156. -----------------------------------
  157.  
  158. These instructions are intended for the use of experienced PC Scheme
  159. programmers.  If they aren't clear to you, follow the instructions
  160. given in the Detailed Installation Instructions section.
  161.  
  162. Start by installing the minimal configuration (no demo, no menu-based
  163. user interface).  Run PC Scheme, Load SCOOPS, and compile MENUS.S to
  164. MENUS.SO.  Use the MAKE_FSL utility to make MENUS.FSL from the .SO
  165. file.  To test MENUS.FSL, run PC Scheme, load SCOOPS, MENUS.FSL, and
  166. MENEX.S.  Type (menus) to start the demo.
  167.  
  168. Next, and this is optional, of course, install the menu-based user
  169. interface.  You only need one of the files MENMOU.S or MENKEY.S.  Use
  170. MENMOU.S if you are going to use a mouse, otherwise use MENKEY.S.  You
  171. don't need the file MENED.S unless you use an external editor in
  172. place of or in addition to EDWIN.
  173.  
  174. Examine and modify (if necessary) the system-dependent global
  175. variables defined in MENMOU.S or MENKEY.S to suite your system.
  176. These variables are: *menu-norm*, *menu-high*, *popup-norm*,
  177. *popup-high*, *external-editor-spec*, and *make-fsl-spec*.  In
  178. addition, for MENMOU.S only: *console-colors*, *transcript-spec*.
  179.  
  180. If you are going to use the menu-based user interface to link to an
  181. external editor, it is important that you set the global variable
  182. *external-editor-spec* correctly for your system.  As it comes, this
  183. variable is set so that the interface looks for an external editor
  184. with the full-path name \bin\ep.exe.  This is unlikely to be right
  185. for your system.
  186.  
  187. Compile all the user interface source files you have decided to use
  188. to .SO files.  Run MAKE_FSL on the .SO files and install the
  189. resulting .FSL files in the same directory as MENUS.FSL.
  190.  
  191. If you intend to use a mouse, you will also have to create a
  192. top-level mouse menu using the menu software supplied with your
  193. mouse.  If you have a Logitech mouse, you can start out by using the
  194. one I use, PCS.DEF, which is included with Menus for Scheme.  If you
  195. use some other brand of mouse, you will have to write your own
  196. top-level menu, but PCS.DEF may be useful to you as a model.  Compile
  197. and test your top-level mouse menu.
  198.  
  199. To test the menu-based interface, bring up PC Scheme in a directory
  200. that has at least a few small Scheme source (.S) files that you don't
  201. mind experimenting with.  Load SCOOPS.FSL, MENUS.FSL, and MENMOU.S
  202. (or MENKEY.FSL) in that order.  Load MENCO.FSL, MENLD.FSL,
  203. MENDOS.FSL, and, if you are using an external editor, MENED.FSL.  The
  204. order in which these last files are loaded is not important.
  205.  
  206. MOUSE VERSION TESTS.  Click to bring up the top-level menu and select
  207. "Compile".  You should see a menu offering all the source files (.S)
  208. in your current directory as choices.  Select one of these files.
  209. The file should compile and a fast-load (.FSL) version should be
  210. created.  Click for the top-level menu again and select "Load".  You
  211. should see a menu with the selections ".S" and ".FSL".  Select
  212. ".FSL".  You should see a menu offering all the fast-load files in
  213. your current directory as choices, including the fast-load file you
  214. just created.  Select the new fast-load file.  It should load.  This
  215. completes the tests.  Explore the other interface features at your
  216. leisure.
  217.  
  218. KEYBOARD VERSION TESTS.  Evaluate (mco).  You should see a menu
  219. offering all the source files (.S) in your current directory as
  220. choices.  Select one of these files.  The file should compile and a
  221. fast-load (.FSL) version should be created.  Evaluate (mld).  You
  222. should see a menu with the selections ".S" and ".FSL".  Select
  223. ".FSL".  You should see a menu offering all the fast-load files in
  224. your current directory as choices, including the fast-load file you
  225. just created.  Select the new fast-load file.  It should load.  This
  226. completes the tests.  Explore evaluating (mdos) which brings up the
  227. DOS menu (and evaluating (med) for the external editor menu if you
  228. have MENED.FSL loaded) at your leisure.
  229.  
  230. If you are going use the menu-based user interface on a regular
  231. basis, I recommend you load MENUS.FSL, MENMOU.FSL (or MENKEY.FSL),
  232. etc. from a patch file.  See Hints, below, for details.
  233.  
  234. =====================================================================
  235.  
  236. Detailed Instruction for Installing and Running a Demonstration
  237. of Menus for Scheme
  238. ---------------------------------------------------------------
  239.  
  240. The file MENEX.S is included as a tutorial keyed to the reference
  241. manual.  By reading it along with the manual, you can see how easy
  242. it is to write applications using menus.  However, MENEX.S can also
  243. be run as a demonstration of Menus for Scheme.  Here is how to do it.
  244.  
  245.   1.  Make Menus for Scheme and the Examples Available to PC Scheme
  246.  
  247.       Make sure the files MENUS.S and SCOOPS.FSL are in your PC Scheme
  248.       pcs-sysdir directory.  That's the directory which contains the
  249.       PC Scheme compiler (COMPILER.APP).  The file MENEX.S should be
  250.       in your PC Scheme working directory.  That's the directory from
  251.       which you normally run PC Scheme.
  252.  
  253.   2.  Enable the Support for a Color Monitor?
  254.  
  255.       The demonstration will run on a color monitor as is, but will
  256.       not use color.  If you want color, you must edit the line
  257.       containing the definition of the global variable *rgb-monitor*
  258.       in the file MENEX.S.  Details are given in the file.
  259.  
  260.   3.  Start Up PC Scheme from PCS-SYSDIR Directory
  261.  
  262.   4.  Load SCOOPS.FSL
  263.  
  264.       Evaluate (fast-load "scoops.fsl").  The file SCOOPS.FSL must be
  265.       in current directory for this to work.
  266.  
  267.   5.  Compile MENUS.S
  268.  
  269.       Evaluate (compile-file "menus.s" "menus.so").  This takes a long
  270.       time.  When the compilation is done exit PC Scheme and make a
  271.       fast-load file from MENUS.SO using the MAKE_FSL.EXE utility
  272.       supplied with PC Scheme.
  273.  
  274.   6.  Start Up PC Scheme from Your Working Directory
  275.  
  276.   7.  Load SCOOPS
  277.  
  278.       Evaluate (fast-load (string-append pcs-sysdir "\\scoops.fsl")).
  279.  
  280.   8.  Load MENUS.FSL
  281.  
  282.       Evaluate (fast-load (string-append pcs-sysdir "\\menus.fsl")).
  283.  
  284.   9.  Load MENEX.S
  285.  
  286.       Evaluate (load "menex.s").
  287.  
  288.  10.  Start the Demonstration
  289.  
  290.       Evaluate (menus).
  291.  
  292. =====================================================================
  293.  
  294. Detailed Instructions for Installing the Keyboard Version of the
  295. Menu-Based User Interface
  296. -----------------------------------------------------------------
  297.  
  298. I am restricting these instructions to install a version the menu-
  299. based user interface that supports neither a mouse nor an external
  300. editor.  If you're ready to install one of the more complex versions,
  301. you're ready to cope with the condensed instructions given above.
  302.  
  303.   1.  If You Haven't Run the Demo 
  304.  
  305.       Perform Step 1 of the demo setup, but omit the part concerning
  306.       MENEX.S.  Skip Step 2 and perform Steps 3 - 5.
  307.  
  308.   2.  Make the Menu-Based User Interface Files Available to PC Scheme
  309.  
  310.       The files you will need are MENKEY.S, MENCO.S, MENLD.S, and
  311.       MENDOS.S.  They should be located in your pcs-sysdir directory.
  312.       The files SCOOPS.FSL, MENUS.FSL, and MAKE_FSL.EXE should also
  313.       be located in this directory.
  314.  
  315.   3.  System-Dependent Global Variables and Where To Find Them
  316.  
  317.       There are a number of global variables that you may want to
  318.       change for your system.  These variables are: *menu-norm*,
  319.       *menu-high*, *popup-norm*, *popup-high*, and *external-editor-
  320.       spec*.  You will find them near the beginning of MENKEY.S.  You
  321.       should remove *external-editor-spec* if you don't plan to add
  322.       the external editor menu at some later date.  The other
  323.       variables mentioned only affect colors used to display menu and
  324.       popup window objects.  The defaults should work on any system
  325.       so changing them is completely optional.
  326.  
  327.   4.  Start Up PC Scheme from PCS-SYSDIR Directory
  328.  
  329.   5.  Load SCOOPS.FSL and MENUS.FSL
  330.  
  331.       Evaluate (fast-load "scoops.fsl") and (fast-load "menus.fsl").
  332.  
  333.   6.  Compile MENKEY.S and MENCO.S
  334.  
  335.       Evaluate (compile-file "menkey.s" "menkey.so") and
  336.       (compile-file "menco.s" "menco.so").
  337.  
  338.   7.  Compile MENLD.S and MENDOS.S
  339.  
  340.       Enough of the menu-based interface has been installed for you
  341.       to use it to complete its own installation.  This will test it
  342.       as well.
  343.  
  344.       Evaluate (mco).  You should see a menu offering all the source
  345.       files (.S) in your current directory as choices.  Select
  346.       MENLD.S.  The file should compile and MENLD.FSL should be
  347.       created.  Evaluate (mld).  You should see a menu with the
  348.       selections ".S" and ".FSL".  Select ".FSL".  You should see a
  349.       menu offering all the fast-load files in your current directory
  350.       as choices, including MENLD.S.  Select MENLD.FSL.  It should
  351.       load.
  352.  
  353.       Evaluate (mco) again.  This time select MENDOS.S.  The file
  354.       should compile and MENDOS.FSL should be created.
  355.  
  356.   8.  Completing the Installation
  357.  
  358.       Exit PC Scheme.  Make fast-load files from MENKEY.SO and
  359.       MENCO.SO using the MAKE_FSL.EXE utility supplied with PC
  360.       Scheme.
  361.  
  362.   9.  Final Test
  363.  
  364.       Start up PC Scheme.  Evaluate the following forms
  365.  
  366.       (begin
  367.         (fast-load "scoops.fsl")
  368.         (fast-load "menus.fsl")
  369.         (fast-load "menkey.fsl")
  370.         (fast-load "menld.fsl"))
  371.  
  372.       (mld)
  373.  
  374.       Evaluate (mld).  You should see a menu offering all the fast-load
  375.       files (.FSL) in your current directory as choices.  Select
  376.       MENDOS.FSL.  When MENDOS.FSL has loaded, evaluate (mdos).  You
  377.       should see a menu offering several DOS operations as selections.
  378.       Select (dos-dir ?).  You should now see query window asking for
  379.       a file specification.  Type "*.*".  All the files in your
  380.       current directory should be displayed in a popup text window.
  381.       Type [Esc].  This completes the installation.
  382.  
  383. If you are going use the menu-based user interface on a regular
  384. basis, I recommend you load SCOOPS.FSL, MENUS.FSL, MENKEY.FSL,
  385. MENCO.FSL, MENLD.FSL, and MENDOS.FSL from a patch file.  See Hints,
  386. below, for details.
  387.  
  388. =====================================================================
  389.  
  390. Hints
  391. -----
  392.  
  393.   1.  Print the MENUS.REF and MENEX.S files.  You will find it useful
  394.       to have printed versions of these files on hand for reference
  395.       when you write your first application.  I strongly recommend
  396.       that you become familiar with the examples in MENEX.S as these
  397.       cover the most common ways of using Menus for Scheme.
  398.  
  399.   2.  Use a patch file if you decide to use Menus for Scheme on a
  400.       regular basis, you should load SCOOPS.FSL and MENUS.FSL from a
  401.       patch file.  This is more than just a convenient way of having
  402.       these two files automatically loaded each time you start up PC
  403.       Scheme.  Patch files load into the user-global-environment,
  404.       leaving the user-initial-environment uncluttered.  This makes
  405.       it easier for you to debug in the user-initial-environment
  406.       with the inspector.  If you need instructions about how to
  407.       create a patch file, see Section 2.3, Customization, in your PC
  408.       Scheme User's Guide.
  409.  
  410.   3.  To use the menu-based user interface, your patch file should
  411.       include the appropriate selection from the following forms:
  412.  
  413.       (fast-load (string-append pcs-sysdir "\\SCOOPS.FSL"))
  414.       (fast-load (string-append pcs-sysdir "\\MENUS.FSL"))
  415.  
  416.       Put this next form in if and only if you are going to use a
  417.       mouse.
  418.  
  419.       (fast-load (string-append pcs-sysdir "\\MENMOU.FSL"))
  420.  
  421.       Put this next form in if and only if you are NOT going to use
  422.       a mouse.
  423.  
  424.       (fast-load (string-append pcs-sysdir "\\MENKEY.FSL"))
  425.  
  426.       (fast-load (string-append pcs-sysdir "\\MENLD.FSL"))
  427.       (fast-load (string-append pcs-sysdir "\\MENCO.FSL"))
  428.       (fast-load (string-append pcs-sysdir "\\MENDOS.FSL"))
  429.  
  430.       Put this form in your patch file if and only if you use an
  431.       external editor in place of or in addition to EDWIN.
  432.  
  433.       (fast-load (string-append pcs-sysdir "\\MENED.FSL"))
  434.  
  435. =====================================================================
  436.