home *** CD-ROM | disk | FTP | other *** search
- =====================================================================
-
- Copyright (c) 1987 by Morton Goldberg, All Rights Reserved
-
- Menus for Scheme (tm)
-
- by
-
- Morton Goldberg
- 3268 Alpine Dr.
- Ann Arbor, MI 48108
-
- (313) 973-2571
- CompuServe: 72346,565
-
- =====================================================================
-
- Disclaimer of Liability
- -----------------------
-
- Menus for Scheme is distributed strictly as is and without any
- warrantee or guarantee whatsoever. Anyone who uses it does so
- strictly at his/her own risk.
-
- =====================================================================
-
- Shareware Statement
- -------------------
-
- Menus for Scheme is shareware. That means you can make non-
- commercial use of the files in this distribution and you can make
- non-commercial distribution of them. Menus for Scheme is protected
- by copyright. Commercial use or distribution is expressly prohibited
- without written permission of the author. Further, any distribution
- you make must be complete and contain all the files listed below.
- Removal of this paragraph shall constitute violation of U.S.
- copyright law.
-
- If you would like to have Menus for Scheme without the bother of a
- lengthy downloading session, or if you would like to contribute to
- its support and further development, become a registered user. You
- will be sent the registered user distribution, which is described
- below. To become a registered user, send a check or money order in
- the amount of $15.00 (United States dollars) along with your name and
- mail address to:
-
- Morton Goldberg
- 3268 Alpine Dr.
- Ann Arbor, MI 48108
-
- This offer is good only in the United States, Canada, and Mexico.
- Distribution of Menus for Scheme outside of these three countries
- for any purpose is expressly prohibited.
-
- =====================================================================
-
- System Requirements
- -------------------
-
- Menus for Scheme requires PC Scheme by Texas Instruments (Ver. 2.0
- or later) and SCOOPS extension to PC Scheme. It should run on any
- computer that runs PC Scheme and SCOOPS. It supports the use of
- either a color monitor or a monochrome monitor.
-
- The shareware distribution files require PC Scheme 3.0 to be used as
- provided. If you have PC Scheme 2.0, you will have edit the sources
- and change all the references to #t and #f to t and nil or #!true and
- #!false.
-
- =====================================================================
-
- Contents of the shareware distribution
- --------------------------------------
-
- MENUS.PKG ...... This file -- contains the installation instructions
- MENUS.REF ...... Disk file version of the Menus for Scheme program-
- mer's reference manual
- PCS.DEF ........ Source code: Logitech mouse menu -- example of a
- top-level menu for the Scheme user-interface when
- a mouse is used
- MENUS.S ........ Source code: the menu system. Written with SCOOPS
- MENEX.S ........ Source code: tutorial examples of menu applications
- MENMOU.S ....... Source code: contains code linking the mouse menu
- defined in PCS.DEF to the menus in the user inter-
- face
- MENKEY.S ....... Source code: replaces PCS.DEF and MENMOU.S as the
- top-level user-interface code when a mouse is not
- used
- MENCO.S ........ Source code: menus for running the PCS compiler
- MENDOS.S ....... Source code: menus for interfacing with DOS
- MENLD.S ........ Source code: menus for loading Scheme .S and .FSL
- files
- MENED.S ........ Source code: menus for interfacing with an external
- editor
- PATCH.S ........ A example of a patch file that automatically loads
- the menu-based user interface whenever you start up
- PC Scheme
-
- Contents of the registered user distribution
- --------------------------------------------
-
- Printed version of this file
-
- Printed version the Programmer's Reference Manual
-
- Printed listings of all the Scheme source code
-
- MS-DOS format 5-1/4 in. diskette containing:
-
- Latest versions of all files comprising the shareware
- distribution in ASCII format (not ARC-ed) including any
- enhancements that become ready to release after this text
- was written.
-
- Ready-to-use fast-load files MENUS.FSL and MENEX.FSL. With
- these you can get started with Menus for Scheme in just a few
- minutes.
-
- =====================================================================
-
- The Capabilities of Menus for Scheme
- ------------------------------------
-
- Menus for Scheme can add the following capabilities to any PC Scheme
- program:
-
- - Vertical and horizontal popup menus, both of which can be used
- within the same application
-
- - Menus can invoke other menus to any depth
-
- - Menu item selection by moving a bar-cursor over an item
- description and typing [Enter]
-
- - Menu item selection by typing a single character (usually the
- initial character the item description)
-
- - Escape for any menu without making a selection by typing [Esc]
-
- - Popup query windows which can be used to read in additional
- information after a menu selection has been made
-
- - Popup text windows which can be used to display results or
- error messages
-
- - Semi-automatic generation of menus from a list of files; a
- programmer specified action is applied to the user selected
- file
-
- - Automatic sizing of the menus and the text and query windows
-
-
- =====================================================================
-
- Condensed Installation Instructions
- -----------------------------------
-
- These instructions are intended for the use of experienced PC Scheme
- programmers. If they aren't clear to you, follow the instructions
- given in the Detailed Installation Instructions section.
-
- Start by installing the minimal configuration (no demo, no menu-based
- user interface). Run PC Scheme, Load SCOOPS, and compile MENUS.S to
- MENUS.SO. Use the MAKE_FSL utility to make MENUS.FSL from the .SO
- file. To test MENUS.FSL, run PC Scheme, load SCOOPS, MENUS.FSL, and
- MENEX.S. Type (menus) to start the demo.
-
- Next, and this is optional, of course, install the menu-based user
- interface. You only need one of the files MENMOU.S or MENKEY.S. Use
- MENMOU.S if you are going to use a mouse, otherwise use MENKEY.S. You
- don't need the file MENED.S unless you use an external editor in
- place of or in addition to EDWIN.
-
- Examine and modify (if necessary) the system-dependent global
- variables defined in MENMOU.S or MENKEY.S to suite your system.
- These variables are: *menu-norm*, *menu-high*, *popup-norm*,
- *popup-high*, *external-editor-spec*, and *make-fsl-spec*. In
- addition, for MENMOU.S only: *console-colors*, *transcript-spec*.
-
- If you are going to use the menu-based user interface to link to an
- external editor, it is important that you set the global variable
- *external-editor-spec* correctly for your system. As it comes, this
- variable is set so that the interface looks for an external editor
- with the full-path name \bin\ep.exe. This is unlikely to be right
- for your system.
-
- Compile all the user interface source files you have decided to use
- to .SO files. Run MAKE_FSL on the .SO files and install the
- resulting .FSL files in the same directory as MENUS.FSL.
-
- If you intend to use a mouse, you will also have to create a
- top-level mouse menu using the menu software supplied with your
- mouse. If you have a Logitech mouse, you can start out by using the
- one I use, PCS.DEF, which is included with Menus for Scheme. If you
- use some other brand of mouse, you will have to write your own
- top-level menu, but PCS.DEF may be useful to you as a model. Compile
- and test your top-level mouse menu.
-
- To test the menu-based interface, bring up PC Scheme in a directory
- that has at least a few small Scheme source (.S) files that you don't
- mind experimenting with. Load SCOOPS.FSL, MENUS.FSL, and MENMOU.S
- (or MENKEY.FSL) in that order. Load MENCO.FSL, MENLD.FSL,
- MENDOS.FSL, and, if you are using an external editor, MENED.FSL. The
- order in which these last files are loaded is not important.
-
- MOUSE VERSION TESTS. Click to bring up the top-level menu and select
- "Compile". You should see a menu offering all the source files (.S)
- in your current directory as choices. Select one of these files.
- The file should compile and a fast-load (.FSL) version should be
- created. Click for the top-level menu again and select "Load". You
- should see a menu with the selections ".S" and ".FSL". Select
- ".FSL". You should see a menu offering all the fast-load files in
- your current directory as choices, including the fast-load file you
- just created. Select the new fast-load file. It should load. This
- completes the tests. Explore the other interface features at your
- leisure.
-
- KEYBOARD VERSION TESTS. Evaluate (mco). You should see a menu
- offering all the source files (.S) in your current directory as
- choices. Select one of these files. The file should compile and a
- fast-load (.FSL) version should be created. Evaluate (mld). You
- should see a menu with the selections ".S" and ".FSL". Select
- ".FSL". You should see a menu offering all the fast-load files in
- your current directory as choices, including the fast-load file you
- just created. Select the new fast-load file. It should load. This
- completes the tests. Explore evaluating (mdos) which brings up the
- DOS menu (and evaluating (med) for the external editor menu if you
- have MENED.FSL loaded) at your leisure.
-
- If you are going use the menu-based user interface on a regular
- basis, I recommend you load MENUS.FSL, MENMOU.FSL (or MENKEY.FSL),
- etc. from a patch file. See Hints, below, for details.
-
- =====================================================================
-
- Detailed Instruction for Installing and Running a Demonstration
- of Menus for Scheme
- ---------------------------------------------------------------
-
- The file MENEX.S is included as a tutorial keyed to the reference
- manual. By reading it along with the manual, you can see how easy
- it is to write applications using menus. However, MENEX.S can also
- be run as a demonstration of Menus for Scheme. Here is how to do it.
-
- 1. Make Menus for Scheme and the Examples Available to PC Scheme
-
- Make sure the files MENUS.S and SCOOPS.FSL are in your PC Scheme
- pcs-sysdir directory. That's the directory which contains the
- PC Scheme compiler (COMPILER.APP). The file MENEX.S should be
- in your PC Scheme working directory. That's the directory from
- which you normally run PC Scheme.
-
- 2. Enable the Support for a Color Monitor?
-
- The demonstration will run on a color monitor as is, but will
- not use color. If you want color, you must edit the line
- containing the definition of the global variable *rgb-monitor*
- in the file MENEX.S. Details are given in the file.
-
- 3. Start Up PC Scheme from PCS-SYSDIR Directory
-
- 4. Load SCOOPS.FSL
-
- Evaluate (fast-load "scoops.fsl"). The file SCOOPS.FSL must be
- in current directory for this to work.
-
- 5. Compile MENUS.S
-
- Evaluate (compile-file "menus.s" "menus.so"). This takes a long
- time. When the compilation is done exit PC Scheme and make a
- fast-load file from MENUS.SO using the MAKE_FSL.EXE utility
- supplied with PC Scheme.
-
- 6. Start Up PC Scheme from Your Working Directory
-
- 7. Load SCOOPS
-
- Evaluate (fast-load (string-append pcs-sysdir "\\scoops.fsl")).
-
- 8. Load MENUS.FSL
-
- Evaluate (fast-load (string-append pcs-sysdir "\\menus.fsl")).
-
- 9. Load MENEX.S
-
- Evaluate (load "menex.s").
-
- 10. Start the Demonstration
-
- Evaluate (menus).
-
- =====================================================================
-
- Detailed Instructions for Installing the Keyboard Version of the
- Menu-Based User Interface
- -----------------------------------------------------------------
-
- I am restricting these instructions to install a version the menu-
- based user interface that supports neither a mouse nor an external
- editor. If you're ready to install one of the more complex versions,
- you're ready to cope with the condensed instructions given above.
-
- 1. If You Haven't Run the Demo
-
- Perform Step 1 of the demo setup, but omit the part concerning
- MENEX.S. Skip Step 2 and perform Steps 3 - 5.
-
- 2. Make the Menu-Based User Interface Files Available to PC Scheme
-
- The files you will need are MENKEY.S, MENCO.S, MENLD.S, and
- MENDOS.S. They should be located in your pcs-sysdir directory.
- The files SCOOPS.FSL, MENUS.FSL, and MAKE_FSL.EXE should also
- be located in this directory.
-
- 3. System-Dependent Global Variables and Where To Find Them
-
- There are a number of global variables that you may want to
- change for your system. These variables are: *menu-norm*,
- *menu-high*, *popup-norm*, *popup-high*, and *external-editor-
- spec*. You will find them near the beginning of MENKEY.S. You
- should remove *external-editor-spec* if you don't plan to add
- the external editor menu at some later date. The other
- variables mentioned only affect colors used to display menu and
- popup window objects. The defaults should work on any system
- so changing them is completely optional.
-
- 4. Start Up PC Scheme from PCS-SYSDIR Directory
-
- 5. Load SCOOPS.FSL and MENUS.FSL
-
- Evaluate (fast-load "scoops.fsl") and (fast-load "menus.fsl").
-
- 6. Compile MENKEY.S and MENCO.S
-
- Evaluate (compile-file "menkey.s" "menkey.so") and
- (compile-file "menco.s" "menco.so").
-
- 7. Compile MENLD.S and MENDOS.S
-
- Enough of the menu-based interface has been installed for you
- to use it to complete its own installation. This will test it
- as well.
-
- Evaluate (mco). You should see a menu offering all the source
- files (.S) in your current directory as choices. Select
- MENLD.S. The file should compile and MENLD.FSL should be
- created. Evaluate (mld). You should see a menu with the
- selections ".S" and ".FSL". Select ".FSL". You should see a
- menu offering all the fast-load files in your current directory
- as choices, including MENLD.S. Select MENLD.FSL. It should
- load.
-
- Evaluate (mco) again. This time select MENDOS.S. The file
- should compile and MENDOS.FSL should be created.
-
- 8. Completing the Installation
-
- Exit PC Scheme. Make fast-load files from MENKEY.SO and
- MENCO.SO using the MAKE_FSL.EXE utility supplied with PC
- Scheme.
-
- 9. Final Test
-
- Start up PC Scheme. Evaluate the following forms
-
- (begin
- (fast-load "scoops.fsl")
- (fast-load "menus.fsl")
- (fast-load "menkey.fsl")
- (fast-load "menld.fsl"))
-
- (mld)
-
- Evaluate (mld). You should see a menu offering all the fast-load
- files (.FSL) in your current directory as choices. Select
- MENDOS.FSL. When MENDOS.FSL has loaded, evaluate (mdos). You
- should see a menu offering several DOS operations as selections.
- Select (dos-dir ?). You should now see query window asking for
- a file specification. Type "*.*". All the files in your
- current directory should be displayed in a popup text window.
- Type [Esc]. This completes the installation.
-
- If you are going use the menu-based user interface on a regular
- basis, I recommend you load SCOOPS.FSL, MENUS.FSL, MENKEY.FSL,
- MENCO.FSL, MENLD.FSL, and MENDOS.FSL from a patch file. See Hints,
- below, for details.
-
- =====================================================================
-
- Hints
- -----
-
- 1. Print the MENUS.REF and MENEX.S files. You will find it useful
- to have printed versions of these files on hand for reference
- when you write your first application. I strongly recommend
- that you become familiar with the examples in MENEX.S as these
- cover the most common ways of using Menus for Scheme.
-
- 2. Use a patch file if you decide to use Menus for Scheme on a
- regular basis, you should load SCOOPS.FSL and MENUS.FSL from a
- patch file. This is more than just a convenient way of having
- these two files automatically loaded each time you start up PC
- Scheme. Patch files load into the user-global-environment,
- leaving the user-initial-environment uncluttered. This makes
- it easier for you to debug in the user-initial-environment
- with the inspector. If you need instructions about how to
- create a patch file, see Section 2.3, Customization, in your PC
- Scheme User's Guide.
-
- 3. To use the menu-based user interface, your patch file should
- include the appropriate selection from the following forms:
-
- (fast-load (string-append pcs-sysdir "\\SCOOPS.FSL"))
- (fast-load (string-append pcs-sysdir "\\MENUS.FSL"))
-
- Put this next form in if and only if you are going to use a
- mouse.
-
- (fast-load (string-append pcs-sysdir "\\MENMOU.FSL"))
-
- Put this next form in if and only if you are NOT going to use
- a mouse.
-
- (fast-load (string-append pcs-sysdir "\\MENKEY.FSL"))
-
- (fast-load (string-append pcs-sysdir "\\MENLD.FSL"))
- (fast-load (string-append pcs-sysdir "\\MENCO.FSL"))
- (fast-load (string-append pcs-sysdir "\\MENDOS.FSL"))
-
- Put this form in your patch file if and only if you use an
- external editor in place of or in addition to EDWIN.
-
- (fast-load (string-append pcs-sysdir "\\MENED.FSL"))
-
- =====================================================================
-