home *** CD-ROM | disk | FTP | other *** search
- February 27, 1987
-
- MULTI-LEVEL PULL-DOWN MENUS
- Version 1.1
-
- PURPOSE:
-
- This utility creates incredibly quick multi-level pull-down menus
- as an include files in Turbo Pascal programs for IBM PC/XT/AT
- compatibles. It features:
-
- - Workspace window
- - Pull-down menus with Execute, Single, or Multiple choice
- - Unlimited levels of submenus
- - Unlimited data entry windows for the five
- basic types of data
- - Automatic NumLock and right justification for numerical
- data entry windows
- - Error messages for invalid data entries
- - Error messages for data entries out of range
- - Allowance for null entries on text data entry windows
- - Automatic and override configuration for sizes and
- locations for easier development
- - Operation by cursor keys or command keys
- - Pull/Pop between workspace and nested submenu(s)
- - Programmable control of pull and pop sequences
- - Full system of self-titled help windows
- - Message lines for prompts and processing
- - Full working shell for user development
- - Can be fully configured by the user
-
- They work on MDA, CGA, and EGA adapters in any column mode
- (40/80/etc.). This utility uses the quick screen writing utilities
- of QWIK21.INC and the multi-level window procedures of WINDOW32.INC.
- Users are encouraged to participate in the free Teamware concept
- with the release of these procedures.
-
- I also hope that this will help standardize the human interface
- with user written programs. Hopefully, users can write their
- programs around these include files and just exchange their
- essential code. That way users can have some powerful computing
- programs with just a little code. It also means that users can
- spend less time on screen design and more on the application.
- Therefore, users should be more willing to share their code with
- others.
-
-
- TEST DRIVE:
-
- Compile and run the program PULLDEMO.PAS to get a feeling
- for features and speed. WINDOW32.INC and QWIK21.INC are required
- to run it. The operation should be intuitive. If not, then I
- didn't do a very good job.
-
-
- FILES:
-
- In this version, PULL11.ARC contains:
-
- !read .me!: File that insists you get a copy of WINDOW32.ARC
- for source files and QWIK21.ARC for further
- documentation.
- Pull11 .doc: This document.
- Pull11 .inc: Include file for your programs to use the
- pull-down menus.
- PullDemo.pas: Fully functional working demo of PULL11.INC
- and a shell for your application programs.
-
-
- DEFINITIONS:
-
- So you can understand the program identifiers and this document,
- here's the definitions I'll use:
-
- Workspace - The working area of the application program.
- Top menu - The menu always shown (usually in row 1 or 2).
- Main menu - The first menu pulled from the top menu.
- Submenu - All subsequent menus pulled after the main menu.
- Line - A row of text.
- Menu - A list of selectable lines.
- Window - Not a menu.
- Data entry window - window for entering data into the
- application program.
- Selection - A line chosen in a menu for processing.
- 'HiLited' - A line pointed at in a menu.
- Message line - The bottom row to display key helps or
- processing status.
- Error message - a short message for data out of range.
- Link - A menu line that pulls another menu or window.
- Pull - pulls menus down to the previous level.
- Pop - removes menus and returns to the workspace.
-
-
- SCREEN DESIGN:
-
- PULL11.INC is quite flexible and allows you to change the basic
- screen design in your application program. EGA users will par-
- ticularly like it because it will also work in any row mode and
- column mode.
-
- PULLDEMO.PAS shows how to place a title or status line in row 1.
- Some applications may require a status line outside of the work-
- space window for file names or whatever. But it is not required.
- You can easily delete it by setting 'TopMenuRow:=1' and
- 'MainMenuRow:=2'.
-
- The demo also shows a 20x78 workspace but you can modify it to a
- full 80 columns by setting the MakeWindow to NoBrdr.
-
- There are really very few requirements. Two of which are:
- . All menus and data entry windows cannot use NoBrdr.
- . Data entry windows are limited to 2 lines.
- If you put your thinking cap on, you'll figure out how to do most
- anything. Say, if you didn't want a message line, just use
- MsgLine:='' for all the menus.
-
-
- OPERATION:
-
- Multi-level Menus - Every menu can have one of three modes:
-
- Execute choice - immediately executes a procedure
- Single choice - selects one line exclusively
- Multiple choice - toggles a boolean flag for each selection
-
- This mode tells how the selection should interact with the other
- selections on the menu. In addition, each line in the menu can
- have one of four select modes:
-
- Choice - will interact with the assigned menu mode
- NoChoice - a line that can't be HiLited
- ToDataWndw - links a data entry window when selected
- ToSubMenu - links a submenu when selected
-
- For single and multiple choice lines, the boolean data is stored
- in the menu record. And for this reason, all menus are unique;
- they cannot be linked again in another submenu. Lines that
- execute a procedure use an interface procedure called 'Process'
- to run. Data entry windows don't need to be unique and can be
- linked by several menus, because the data is stored by user
- identifiers in another interface procedure called 'DataTransfer'.
-
- If a data entry window is linked to an ExecChoice menu, it will
- execute AFTER the data is entered. An example of this is the
- 'save As' line in 'Files'. Once you select 'save As', it prompts
- you for the file name and then executes.
-
- Symbols - the three-line symbol (looks like a menu) tags the
- line that links a submenu. A small dot ('dota' window) tags the
- line that links a data window. In addition, the symbol location
- also shows the direction of display.
-
- Limits - Practically speaking there is no limit to the number of
- submenus that can be linked (<256).
-
- Help windows - Every menu or window is linked to a help window
- when called. It automatically knows the title of that menu. The
- help window is automatically centered left and right on the
- screen, but the user can assign the location of the bottom row and
- the size, or even override completely.
-
- Keyboard Operation - The operation is designed to be as intuitive
- as possible. The message lines should guide you through the
- options. One item not covered in the messages it that a '/' will
- pop you back to the top menu at any time except the help windows
- and understandably the text data entry windows.
-
-
- PROGRAMMING:
-
- Configuration - Virtually everything can be reconfigured by the
- user without having to modify PULL11.INC. It may require a little
- study, but the demo has most of the examples.
-
- Pull/Pop - programmably you can pull or pop menus in your
- procedures at any time. Try IRSaccounting,Update in PULLDEMO.PAS
- to see programmable control of the menus by assigning Pop and Pull
- equal to true. If not reassigned, CmdSeq will return the menus
- back to the same place before it was Popped. CmdSeq is a string
- of the command keys as if keyed in from the keyboard (but not '/').
- You of course can reassign the sequence to a new menu(s).
-
- Automatic configuration - Much of the drudgery of locating, sizing,
- directing, coloring, command letters is done automatically. If
- submenus are not given enough room to fit, an error message will
- indicate it. If a data entry window won't fit, it will reassign it
- to be centered on the screen which you can override by assigning
- values to RowAlt and ColAlt in the 'GetOverrideStats' procedure.
- Of course if you get to a point where you are going to distribute
- just a COM file, then you can manually assign these values to save
- some code.
-
- Special notes - Here are some things to keep in mind:
- . On a single choice menu, you must specify SingleSel which
- is the default line Selected.
- . DefaultLine is the line to be HiLited at startup.
- . BackToDefault will reset HiLited to DefaultLine every
- time the menu is re-entered. (Like 'Quit')
- . Any time the flags or data is changed on a menu, 'Changed'
- is set true. It is the users responsibility to toggle it
- back to false if it's to be useful.
-
- Data range checking - Sometimes you want to place a limit on
- what data values can be entered into the application program.
- Options/PriceLimit in the demo shows you how.
-
- Reducing code - All procedures executed by InitPull is only
- done once and never used again. There's lots of code there and
- you could probably reduce your code by making chain file or
- something.
-
- Suggestions - Its best for operation if you keep the links to the
- submenus high up on the menu which keeps the subsequent submenus
- high as well. Submenus that 'bottom out' on the display will be
- automatically pushed up when they are located. Also look for
- defaults that reduce keystrokes to get around in the menus.
-
- No excuses - I've cast my bread upon the waters. I hope to see
- some good programs from this!
-
-
- FEEDBACK:
-
- I realize that with a design like this that everyone will seem to
- have their preferences. It is not my intention to accommodate
- everyone's idiosyncrasies, but to provide a workable base for
- easier computing. That way, users only need to swap essential
- code (just like PULLDEMO.PAS) and have the INC files in common.
-
- I would appreciate some feedback on these procedures and how I
- can improve them. One thing I would like to do is have a truly
- interactive NumLock and one that will toggle the NumLock light
- on AT machines, but still work on all compatibles.
-
-
- TEAMWARE:
-
- With the release of this utility, I hope to introduce the concept
- of Teamware. These utilities are FREE, so don't worry. Many pro-
- grammers have done some superior individual efforts and have
- benefited many. But the problem is just that - they are individual
- efforts that as packages are not compatible with other individual
- efforts. And many of the programs are released as copyrighted so
- that others cannot use them in certain contexts. It seems that if
- users have other expertise and discover ways to combine each others
- utilities, the benefits can improve greatly. This is what this
- utility has done.
-
- As Teamware, users CAN and are encouraged to:
-
- 1. Use the utilities to enhance their programs and applications
- in both private and commercial contexts.
- 2. Combine, create, and edit other utilities and re-release them
- as Teamware by permission of the previous author(s)/editor(s).
- 3. Enhance shareware programs provided they are applications that
- in no way represent or advertise the power of the utilities
- themselves, but can advertise the use of Teamware.
- 4. Ask about questionable use of the utility.
-
- As Teamware, users CANNOT:
-
- 1. Distribute the utilities for profit.
- 2. Combine, create, and edit other utilities and re-release them
- as Shareware or for any profit as enhanced utilities.
-
-
- LIABILITY:
-
- No liabilities are assumed in the use or misuse of these utilities.
-
-
- CREDITS:
-
- Art Hill (CIS 72307,3570) started some initial ideas on this with
- PullDown.arc
-
- Copyright (c) 1987 by James H. LeMay, Arthur J. Hill
- These procedures are public domain under the Teamware concept.
- If there are any problems, please let me know.
-
- Jim LeMay, 6341 Klamath Rd., Ft. Worth, TX 76116
- CIS 76011,217, 1-(817) 732-7150 (after 1730 PST)
- Art Hill, 936 S. Kensington Ave., La Grange, IL 60525
- CIS 72307,3570
-
-
- REVISIONS:
-
- Version 1.1 (02-27-87):
- . Initial release