home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / PULLDOWN.ZIP / PULL11.DOC next >
Encoding:
Text File  |  1987-02-27  |  13.5 KB  |  291 lines

  1.                                                          February 27, 1987
  2.  
  3.                            MULTI-LEVEL PULL-DOWN MENUS
  4.                                    Version 1.1
  5.  
  6.         PURPOSE:
  7.  
  8.         This utility creates incredibly quick multi-level pull-down menus
  9.         as an include files in Turbo Pascal programs for IBM PC/XT/AT
  10.         compatibles.  It features:
  11.  
  12.               - Workspace window
  13.               - Pull-down menus with Execute, Single, or Multiple choice
  14.               - Unlimited levels of submenus
  15.               - Unlimited data entry windows for the five
  16.                   basic types of data
  17.               - Automatic NumLock and right justification for numerical
  18.                   data entry windows
  19.               - Error messages for invalid data entries
  20.               - Error messages for data entries out of range
  21.               - Allowance for null entries on text data entry windows
  22.               - Automatic and override configuration for sizes and
  23.                   locations for easier development
  24.               - Operation by cursor keys or command keys
  25.               - Pull/Pop between workspace and nested submenu(s)
  26.               - Programmable control of pull and pop sequences
  27.               - Full system of self-titled help windows
  28.               - Message lines for prompts and processing
  29.               - Full working shell for user development
  30.               - Can be fully configured by the user
  31.  
  32.         They work on MDA, CGA, and EGA adapters in any column mode
  33.         (40/80/etc.).  This utility uses the quick screen writing utilities
  34.         of QWIK21.INC and the multi-level window procedures of WINDOW32.INC.
  35.         Users are encouraged to participate in the free Teamware concept
  36.         with the release of these procedures.
  37.  
  38.         I also hope that this will help standardize the human interface
  39.         with user written programs.  Hopefully, users can write their
  40.         programs around these include files and just exchange their
  41.         essential code.  That way users can have some powerful computing
  42.         programs with just a little code.  It also means that users can
  43.         spend less time on screen design and more on the application.
  44.         Therefore, users should be more willing to share their code with
  45.         others.
  46.  
  47.  
  48.         TEST DRIVE:
  49.  
  50.         Compile and run the program PULLDEMO.PAS to get a feeling
  51.         for features and speed.  WINDOW32.INC and QWIK21.INC are required
  52.         to run it.  The operation should be intuitive.  If not, then I
  53.         didn't do a very good job.
  54.  
  55.  
  56.         FILES:
  57.  
  58.         In this version, PULL11.ARC contains:
  59.  
  60.            !read   .me!:  File that insists you get a copy of WINDOW32.ARC
  61.                           for source files and QWIK21.ARC for further
  62.                           documentation.
  63.            Pull11  .doc:  This document.
  64.            Pull11  .inc:  Include file for your programs to use the
  65.                           pull-down menus.
  66.            PullDemo.pas:  Fully functional working demo of PULL11.INC
  67.                           and a shell for your application programs.
  68.  
  69.  
  70.         DEFINITIONS:
  71.  
  72.         So you can understand the program identifiers and this document,
  73.         here's the definitions I'll use:
  74.  
  75.            Workspace - The working area of the application program.
  76.            Top menu - The menu always shown (usually in row 1 or 2).
  77.            Main menu - The first menu pulled from the top menu.
  78.            Submenu - All subsequent menus pulled after the main menu.
  79.            Line - A row of text.
  80.            Menu - A list of selectable lines.
  81.            Window - Not a menu.
  82.            Data entry window - window for entering data into the
  83.                                application program.
  84.            Selection - A line chosen in a menu for processing.
  85.            'HiLited' - A line pointed at in a menu.
  86.            Message line - The bottom row to display key helps or
  87.                           processing status.
  88.            Error message - a short message for data out of range.
  89.            Link - A menu line that pulls another menu or window.
  90.            Pull - pulls menus down to the previous level.
  91.            Pop - removes menus and returns to the workspace.
  92.  
  93.  
  94.         SCREEN DESIGN:
  95.  
  96.         PULL11.INC is quite flexible and allows you to change the basic
  97.         screen design in your application program.  EGA users will par-
  98.         ticularly like it because it will also work in any row mode and
  99.         column mode.
  100.  
  101.         PULLDEMO.PAS shows how to place a title or status line in row 1.
  102.         Some applications may require a status line outside of the work-
  103.         space window for file names or whatever.  But it is not required.
  104.         You can easily delete it by setting 'TopMenuRow:=1' and
  105.         'MainMenuRow:=2'.
  106.  
  107.         The demo also shows a 20x78 workspace but you can modify it to a
  108.         full 80 columns by setting the MakeWindow to NoBrdr.
  109.  
  110.         There are really very few requirements.  Two of which are:
  111.              . All menus and data entry windows cannot use NoBrdr.
  112.              . Data entry windows are limited to 2 lines.
  113.         If you put your thinking cap on, you'll figure out how to do most
  114.         anything.  Say, if you didn't want a message line, just use
  115.         MsgLine:='' for all the menus.
  116.  
  117.  
  118.         OPERATION:
  119.  
  120.         Multi-level Menus - Every menu can have one of three modes:
  121.  
  122.              Execute choice  - immediately executes a procedure
  123.              Single choice   - selects one line exclusively
  124.              Multiple choice - toggles a boolean flag for each selection
  125.  
  126.         This mode tells how the selection should interact with the other
  127.         selections on the menu.  In addition, each line in the menu can
  128.         have one of four select modes:
  129.  
  130.              Choice - will interact with the assigned menu mode
  131.              NoChoice - a line that can't be HiLited
  132.              ToDataWndw - links a data entry window when selected
  133.              ToSubMenu - links a submenu when selected
  134.  
  135.         For single and multiple choice lines, the boolean data is stored
  136.         in the menu record.  And for this reason, all menus are unique;
  137.         they cannot be linked again in another submenu.  Lines that
  138.         execute a procedure use an interface procedure called 'Process'
  139.         to run.  Data entry windows don't need to be unique and can be
  140.         linked by several menus, because the data is stored by user
  141.         identifiers in another interface procedure called 'DataTransfer'.
  142.  
  143.         If a data entry window is linked to an ExecChoice menu, it will
  144.         execute AFTER the data is entered.  An example of this is the
  145.         'save As' line in 'Files'.  Once you select 'save As', it prompts
  146.         you for the file name and then executes.
  147.  
  148.         Symbols - the three-line symbol (looks like a menu) tags the
  149.         line that links a submenu.  A small dot ('dota' window) tags the
  150.         line that links a data window.  In addition, the symbol location
  151.         also shows the direction of display.
  152.  
  153.         Limits - Practically speaking there is no limit to the number of
  154.         submenus that can be linked (<256).
  155.  
  156.         Help windows - Every menu or window is linked to a help window
  157.         when called.  It automatically knows the title of that menu.  The
  158.         help window is automatically centered left and right on the
  159.         screen, but the user can assign the location of the bottom row and
  160.         the size, or even override completely.
  161.  
  162.         Keyboard Operation - The operation is designed to be as intuitive
  163.         as possible.  The message lines should guide you through the
  164.         options.  One item not covered in the messages it that a '/' will
  165.         pop you back to the top menu at any time except the help windows
  166.         and understandably the text data entry windows.
  167.  
  168.  
  169.         PROGRAMMING:
  170.  
  171.         Configuration - Virtually everything can be reconfigured by the
  172.         user without having to modify PULL11.INC.  It may require a little
  173.         study, but the demo has most of the examples.
  174.  
  175.         Pull/Pop - programmably you can pull or pop menus in your
  176.         procedures at any time.  Try IRSaccounting,Update in PULLDEMO.PAS
  177.         to see programmable control of the menus by assigning Pop and Pull
  178.         equal to true.  If not reassigned, CmdSeq will return the menus
  179.         back to the same place before it was Popped.  CmdSeq is a string
  180.         of the command keys as if keyed in from the keyboard (but not '/').
  181.         You of course can reassign the sequence to a new menu(s).
  182.  
  183.         Automatic configuration - Much of the drudgery of locating, sizing,
  184.         directing, coloring, command letters is done automatically.  If
  185.         submenus are not given enough room to fit, an error message will
  186.         indicate it.  If a data entry window won't fit, it will reassign it
  187.         to be centered on the screen which you can override by assigning
  188.         values to RowAlt and ColAlt in the 'GetOverrideStats' procedure.
  189.         Of course if you get to a point where you are going to distribute
  190.         just a COM file, then you can manually assign these values to save
  191.         some code.
  192.  
  193.         Special notes - Here are some things to keep in mind:
  194.             . On a single choice menu, you must specify SingleSel which
  195.               is the default line Selected.
  196.             . DefaultLine is the line to be HiLited at startup.
  197.             . BackToDefault will reset HiLited to DefaultLine every
  198.               time the menu is re-entered.  (Like 'Quit')
  199.             . Any time the flags or data is changed on a menu, 'Changed'
  200.               is set true.  It is the users responsibility to toggle it
  201.               back to false if it's to be useful.
  202.  
  203.         Data range checking - Sometimes you want to place a limit on
  204.         what data values can be entered into the application program.
  205.         Options/PriceLimit in the demo shows you how.
  206.  
  207.         Reducing code - All procedures executed by InitPull is only
  208.         done once and never used again.  There's lots of code there and
  209.         you could probably reduce your code by making chain file or
  210.         something.
  211.  
  212.         Suggestions - Its best for operation if you keep the links to the
  213.         submenus high up on the menu which keeps the subsequent submenus
  214.         high as well.  Submenus that 'bottom out' on the display will be
  215.         automatically pushed up when they are located.  Also look for
  216.         defaults that reduce keystrokes to get around in the menus.
  217.  
  218.         No excuses - I've cast my bread upon the waters.  I hope to see
  219.         some good programs from this!
  220.  
  221.  
  222.         FEEDBACK:
  223.  
  224.         I realize that with a design like this that everyone will seem to
  225.         have their preferences.  It is not my intention to accommodate
  226.         everyone's idiosyncrasies, but to provide a workable base for
  227.         easier computing.  That way, users only need to swap essential
  228.         code (just like PULLDEMO.PAS) and have the INC files in common.
  229.  
  230.         I would appreciate some feedback on these procedures and how I
  231.         can improve them.  One thing I would like to do is have a truly
  232.         interactive NumLock and one that will toggle the NumLock light
  233.         on AT machines, but still work on all compatibles.
  234.  
  235.  
  236.         TEAMWARE:
  237.  
  238.         With the release of this utility, I hope to introduce the concept
  239.         of Teamware.  These utilities are FREE, so don't worry.  Many pro-
  240.         grammers have done some superior individual efforts and have
  241.         benefited many.  But the problem is just that - they are individual
  242.         efforts that as packages are not compatible with other individual
  243.         efforts.  And many of the programs are released as copyrighted so
  244.         that others cannot use them in certain contexts.  It seems that if
  245.         users have other expertise and discover ways to combine each others
  246.         utilities, the benefits can improve greatly.  This is what this
  247.         utility has done.
  248.  
  249.         As Teamware, users CAN and are encouraged to:
  250.  
  251.            1. Use the utilities to enhance their programs and applications
  252.               in both private and commercial contexts.
  253.            2. Combine, create, and edit other utilities and re-release them
  254.               as Teamware by permission of the previous author(s)/editor(s).
  255.            3. Enhance shareware programs provided they are applications that
  256.               in no way represent or advertise the power of the utilities
  257.               themselves, but can advertise the use of Teamware.
  258.            4. Ask about questionable use of the utility.
  259.  
  260.         As Teamware, users CANNOT:
  261.  
  262.            1. Distribute the utilities for profit.
  263.            2. Combine, create, and edit other utilities and re-release them
  264.               as Shareware or for any profit as enhanced utilities.
  265.  
  266.  
  267.         LIABILITY:
  268.  
  269.         No liabilities are assumed in the use or misuse of these utilities.
  270.  
  271.  
  272.         CREDITS:
  273.  
  274.         Art Hill (CIS 72307,3570) started some initial ideas on this with
  275.         PullDown.arc
  276.  
  277.         Copyright (c) 1987 by James H. LeMay, Arthur J. Hill
  278.         These procedures are public domain under the Teamware concept.
  279.         If there are any problems, please let me know.
  280.  
  281.           Jim LeMay, 6341 Klamath Rd., Ft. Worth, TX  76116
  282.             CIS 76011,217, 1-(817) 732-7150 (after 1730 PST)
  283.           Art Hill, 936 S. Kensington Ave., La Grange, IL 60525
  284.             CIS 72307,3570
  285.  
  286.  
  287.         REVISIONS:
  288.  
  289.         Version 1.1 (02-27-87):
  290.           . Initial release
  291.