home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / WNDTOOL5.ZIP / WINDTOOL.DOC < prev   
Text File  |  1989-07-04  |  83KB  |  3,044 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                  WINDOW TOOLS
  9.  
  10.  
  11.                         Programming 'Toolbox' Routines
  12.  
  13.                                  version 5.0
  14.  
  15.                                    for the
  16.  
  17.                      Microsoft QuickBASIC 4.5 (tm) Compiler
  18.  
  19.                                 July 4, 1989
  20.  
  21.                                       by
  22.  
  23.                               James P. Morgan
  24.                               5226 Via Hacienda #115
  25.                               Orlando Fl, 32809
  26.                               Compuserve 71121,2006
  27.  
  28.  
  29.                                      AND
  30.  
  31.                         based on public domain works by
  32.                                   Dave Evers
  33.  
  34.  
  35.                      Copyright (C) 1989 by James P. Morgan
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.                               TABLE OF CONTENTS
  66.  
  67.  
  68.           Overview..................................................... 03
  69.  
  70.           Basic Requirements........................................... 04
  71.  
  72.           Routine Overview............................................. 05
  73.  
  74.           Keyboard Conventions ........................................ 09
  75.  
  76.           Mouse Conventions ........................................... 10
  77.  
  78.           Calling Conventions.......................................... 11
  79.  
  80.  
  81.                POPMENU ................................................ 12
  82.                POPLIST ................................................ 14
  83.                POPDIR ................................................. 15
  84.                TAGLIST ................................................ 16
  85.                TAGDIR ................................................. 17
  86.  
  87.                BARMENU ................................................ 18
  88.                MENU123 ................................................ 19
  89.  
  90.                CALENDAR ............................................... 20
  91.                CALENDR3 ............................................... 21
  92.                KEYCAL ................................................. 22
  93.  
  94.                QUERY .................................................. 23
  95.                CAUTION ................................................ 24
  96.                QUESTION................................................ 25
  97.                WARNING ................................................ 26
  98.  
  99.                ROW25 .................................................. 27
  100.                TITLE .................................................. 28
  101.                FULLMENU ............................................... 29
  102.                WAITTIME ............................................... 30
  103.  
  104.                FASTPRT ................................................ 31
  105.                MAKEWIND ............................................... 32
  106.                SAVESCRN ............................................... 34
  107.                RESTSCRN ............................................... 35
  108.                SAVEWIND ............................................... 36
  109.                RESTWIND ............................................... 37
  110.  
  111.                SCROLL   ............................................... 38
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.                                    Page 01
  125.  
  126.  
  127.  
  128.  
  129.                MMBUTTON ............................................... 39
  130.  
  131.                MMCHECK  ............................................... 40
  132.  
  133.                MMCLICK  ............................................... 41
  134.  
  135.                MMCURSORON ............................................. 42
  136.  
  137.                MMCURSOROFF............................................. 43
  138.  
  139.                MMGETLOC ............................................... 44
  140.  
  141.                MMSETLOC ............................................... 45
  142.  
  143.                MMSETRANGE ............................................. 46
  144.  
  145.        What is a QUADRANT ............................................. 47
  146.  
  147.       Comments and Suggestions ........................................ 48
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.                                    Page 02
  187.  
  188.  
  189.  
  190.           OVERVIEW
  191.           --------
  192.  
  193.           The Window Tool routines are designed and enhanced to perform
  194.           tasks that are common to many programs; and they were created
  195.           to perform these tasks in a manner that will enhance the value
  196.           of the programs they work with. Window Tools were also design-
  197.           ed to be as universal as possible, so that they can be adapted
  198.           easily to work in your programs. They were enhanced to be as
  199.           aesthetically pleasing, to give your programs that commercial
  200.           'look and feel'.
  201.  
  202.           All of these routines use, as a base, the BASWIND5 package which
  203.           is included in these libraries.  The  routines in BASWIND5 allow
  204.           for fast screen writing (which is fundamental to all of  these
  205.           procedures);  the ability  to  easily  create a colored 'window'
  206.           on the screen; and to let you save and restore the contents of
  207.           the  screen  so  that you can create 'pop-up' window features in
  208.           your program with a minimum of effort.
  209.  
  210.           The  Window Tools routines build upon these basic functions to
  211.           provide for more 'high-level' applications. A simple call to a
  212.           Window  Tool  procedure, with the appropriate parameters,  will
  213.           enable you to perform relatively complex tasks such as choosing
  214.           a filename from a directory, by simply selecting it from a list.
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.                                    Page 03
  249.  
  250.  
  251.  
  252.           BASIC REQUIREMENTS
  253.           ------------------
  254.  
  255.           All  of  the  BASWIND5  and  Window  Tools  routines  require the
  256.           Microsoft QuickBASIC 4.5 Compiler.
  257.  
  258.           You CANNOT use these routines with the  BASIC  or  BASICA  inter-
  259.           preter.  Attempting  to  do so will surely cause your computer to
  260.           become spastic; possibly to the  point  of  damage  to  files  on
  261.           disk.  So  PLEASE  DO  NOT  ATTEMPT  TO  USE THEM WITH THE INTER-
  262.           PRETER.
  263.  
  264.  
  265.           There is basically ONE(1) way to use the routines included in
  266.           this package (for now):
  267.  
  268.  
  269.                 1) In a standalone EXE file created by compiling the
  270.                    main program with the 'BC /O' option; and then linking
  271.                    with the correct WINDQB45 library. Programs created
  272.                    in this manner will be large; but they will be totally
  273.                    self-sufficient.  These routines were NOT meant to be used
  274.                    from within the QuickBASIC environment (at this time)
  275.                    because the QB environment handles arrays differently than
  276.                    it does when a program is compiled as standalone. However
  277.                    limited testing has been done in the QB 4.5 environment with
  278.                    no problems found, so far.
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.                                    Page 04
  311.  
  312.  
  313.  
  314.           ROUTINE OVERVIEW
  315.           ----------------
  316.  
  317.           The  following  is a brief summary of the function of each of the
  318.           routines contained in the Window Tools package:
  319.  
  320.  
  321.                    FASTPRT - A method of direct-screen writing to replace
  322.                              the relatively slow PRINT statement. Allows
  323.                              you to place a message string at a given row
  324.                              and column using any valid screen attributes.
  325.  
  326.                   MAKEWIND - A routine to create a colored window on the
  327.                              screen, with either no border or a line-
  328.                              graphic border in one of 4 styles; with or
  329.                              without a true  'shadow' underneath; and
  330.                              either immediately appearing on the screen
  331.                              or 'growing' into position.
  332.  
  333.                   SAVESCRN - Saves the contents of the current screen into
  334.                              an array.
  335.  
  336.                   RESTSCRN - Restores the screen from the saved array.
  337.  
  338.                   SAVEWIND - Like SAVESCRN, but instead saves only the
  339.                              screen data from a particular window area;
  340.                              rather than the entire screen. Saves time
  341.                              and memory.
  342.  
  343.                   RESTWIND - Restores the area of the screen saved by
  344.                              SAVEWIND.
  345.  
  346.                     SCROLL - Allows you to scroll a section of the screen
  347.                              either up or down and optionally write a new
  348.                              string into the line created at either the
  349.                              bottom or top, respectively. BIOS dependant.
  350.  
  351.                    POPMENU - Creates a 'pop-up' menu on the screen in a
  352.                              window; allows you to scroll through the
  353.                              menu with a 'select bar', and returns the
  354.                              number of the option selected when [RETURN]
  355.                              is pressed. Really sub-function of POPLIST.
  356.  
  357.                    POPLIST - While POPMENU is a display of several menu
  358.                              items; all on screen at the same time; POP-
  359.                              LIST displays a window with a few items from
  360.                              a list that can be much larger than the on-
  361.                              screen window. You may scroll through the
  362.                              list with the cursor keys, move to the beg-
  363.                              inning or end of the list with HOME and END,
  364.                              respectively; or use the PG UP and PG DN
  365.                              keys to move a 'window-full' at a time.
  366.                              [RETURN] makes the selection.
  367.  
  368.  
  369.  
  370.  
  371.  
  372.                                    Page 05
  373.  
  374.  
  375.  
  376.                     POPDIR - A special case of the POPLIST routine; where
  377.                              the list displayed is the directory of a disk
  378.                              obtained by specifying a filespec. The filespec
  379.                              may contain the wildcard characters "*" and
  380.                              "?".
  381.  
  382.                    TAGLIST - Where POPLIST is intended to select one value
  383.                              from a list, TAGLIST allows you to 'Tag' one
  384.                              or more items to be returned when [RETURN] is
  385.                              pressed. Items that have been tagged can be
  386.                              'untagged' (de-selected). Click on with mouse.
  387.  
  388.                     TAGDIR - Again, a special case of the TAGLIST routine
  389.                              where the list of items is a directory.
  390.  
  391.                    BARMENU - If you like the user interface of QuickBASIC
  392.                              Version 2/3, you will like this routine. A menu
  393.                              bar across the top serves as the basis for
  394.                              individual 'pull-down' menus from which you
  395.                              can select via the cursor keys or mouse.
  396.  
  397.                    MENU123 - If you prefer the menu style of Lotus 1-2-3,
  398.                              you may find this routine more to your liking
  399.                              with its highlighting of the selected option
  400.                              and the expanded description below.
  401.  
  402.                   CALENDAR - Given a month number and a year number, this
  403.                              routine returns with a calendar in a window
  404.                              for that month. As best as can be determined,
  405.                              this calendar routine allows for leap years
  406.                              and leap centuries correctly; and will provide
  407.                              correct calendars for all years.
  408.  
  409.                   CALENDR3 - As above, this routine creates a calendar in
  410.                              a window for a given month and year. However,
  411.                              this one also provides calendars for the pre-
  412.                              vious and following months.
  413.  
  414.                     KEYCAL - Starting from a month and year, this routine
  415.                              allows you to advance or retreat months and
  416.                              years by means of the cursor keys (in the
  417.                              same fashion as Sidekick).
  418.  
  419.                     QUERY  - Is a general-purpose window handler for such
  420.                              function types as QUESTION/WARNING/CAUTION.
  421.                              The above pseudo QUERY functions are still
  422.                              included for downward compatibility ONLY.
  423.  
  424.                    CAUTION - Creates a yellow 'Caution' window on the
  425.                              screen with message strings that you pass it.
  426.                              You then select whether to Cancel or Continue
  427.                              with the operation you are cautioning against.
  428.                              NOT a true function, based on QUERY function.
  429.  
  430.  
  431.  
  432.  
  433.  
  434.                                    Page 06
  435.  
  436.  
  437.  
  438.                    QUESTION- Allows you to present a user with a question,
  439.                              and get back a YES or NO reply to your question.
  440.                              NOT a true function, based on QUERY function.
  441.  
  442.                   WARNING - A bit more dramatic than CAUTION with its
  443.                              red color and blinking 'WARNING' message;
  444.                              but otherwise works exactly the same.
  445.                              NOT a true function, based on QUERY function.
  446.  
  447.                   FULLMENU - Used when you want to create a full-screen
  448.                              menu with several options requiring more
  449.                              explanation than can be given in POPMENU.
  450.  
  451.                      TITLE - A 'sub-function' of the FULLMENU routine,
  452.                              that places a title bar at the top of the
  453.                              screen.
  454.  
  455.                      ROW25 - Also a spinoff of the FULLMENU routine. This
  456.                              function lets you put a message on the bottom
  457.                              row of the screen framed by flashing charac-
  458.                              ters. Keeps the rest of the screen full of
  459.                              data while prompting the operator.
  460.  
  461.                   WAITTIME - Pass it the number of seconds or fractions
  462.                              thereof and it will pause for that long; re-
  463.                              gardless of processor speed (unlike FOR-
  464.                              NEXT loops).
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.                                    Page 07
  497.  
  498.  
  499.  
  500.                   MMCHECK  - Test for presence of a mouse and initializes it.
  501.  
  502.                   MMCLICK  - Returns the number of times a mouse button has
  503.                              pressed and released, since last time function
  504.                              called.
  505.  
  506.                   MMBUTTON - Returns whether a mouse button is pressed and
  507.                              currently held down.
  508.  
  509.                   MMGETLOC - Returns the current screen location of the mouse
  510.                              cursor.
  511.  
  512.                   MMSETLOC - Moves the mouse cursor to the screen location
  513.                              specified.
  514.  
  515.                MMCURSORON  - Turns on the mouse cursor, by making it visible.
  516.  
  517.                MMCURSOROFF - Turns off the mouse cursor, by making it invisible.
  518.  
  519.                MMSETRANGE  - Restricts the mouses movements to an area of the
  520.                              screen.
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.                                    Page 08
  559.  
  560.  
  561.  
  562.           KEYBOARD CONVENTIONS
  563.           --------------------
  564.  
  565.            The keyboard ,as well as the mouse , may be used to allow you
  566.           to move within the windows, make window selections and page up
  567.           and down.
  568.  
  569.            The keyboard is the primary input device. If an action is made
  570.           with the keyboard, the mouse will 'follow' the keyboards actions.
  571.           In otherwords, the mouse's cursor will re-position to the location
  572.           of the screen cursor, if the keyboard is used to move around the
  573.           screen.
  574.  
  575.            The 'standard' keyboard key press and function are :
  576.  
  577.           keyboard               function that is performed
  578.           --------       -----------------------------------------------------
  579.  
  580.           ENTER          Pressing the ENTER key is the normal way to 'select'
  581.                          an item from a window. ENTER signals that you are
  582.                          through processing this window.
  583.  
  584.           First Letter   For most all windows you may select an items by
  585.                          pressing the key that corresponds to the 'first
  586.                          character' (case sensitive) of the item you may
  587.                          want to select. If there are multiple items that
  588.                          start with the same character, each will be high-
  589.                          lighted in-turn.
  590.  
  591.           CURSOR keys    The CURSOR UP and CURSOR DOWN keys are normally used
  592.                          to move the high-lighted select bar up or down within
  593.                          a window. If there are more items than can be displayed
  594.                          in the window, The CURSOR UP/CURSOR DOWN causes the
  595.                          window selections to 'scroll' into or out of the
  596.                          window. The CURSOR LEFT and CURSOR RIGHT keys are
  597.                          normally used with a horizontal 'bar' type menu. You
  598.                          cursor left or right to position to an item and it is
  599.                          high-lighted. Positioning on a 'bar' item in some cases
  600.                          causes a 'drop-down' window , with additional options,
  601.                          to be displayed. You move the cursor up or down within
  602.                          the 'drop-down' window  and/or cursor left/right to
  603.                          select another 'bar' menu item.
  604.  
  605.          PgUp/PgDn       If a window has more selection items than can be
  606.                          displayed at once, you can page up or page down to see
  607.                          a 'new' window of different selection items.
  608.  
  609.          Home/End        If a window has more selection items than can be
  610.                          displayed at once, you can view the first window of
  611.                          items by pressing Home. To view the last window of
  612.                          items , press the End key.
  613.  
  614.          ESC             Most all windows/menus allow you to 'not select' an
  615.                          option. If you decide that you really do not want to
  616.                          make a selection off the window, then press the ESC
  617.                          key.
  618.  
  619.  
  620.                                    Page 09
  621.  
  622.  
  623.  
  624.           MOUSE CONVENTIONS
  625.           -----------------
  626.  
  627.            The mouse ,as well as the keyboard , may be used to allow you
  628.           to move within the windows, make window selections and page up
  629.           and down.
  630.  
  631.            The keyboard is the primary input device. If an action is made
  632.           with the keyboard, the mouse will 'follow' the keyboards actions.
  633.           In otherwords, the mouse's cursor will re-position to the location
  634.           of the screen cursor, if the keyboard is used to move around the
  635.           screen.
  636.  
  637.            The 'standard' mouse usage and function is :
  638.  
  639.           Mouse                  function that is performed
  640.           --------       -----------------------------------------------------
  641.  
  642.           Click on       Select an item within a window. Clicking on a high-
  643.           high-lighted   lighted window item signals that this item is the
  644.           item           one you want and that you are through processing
  645.                          this window. You may click on an item to 'tag' or
  646.                          'untag' it also.
  647.  
  648.           Move Mouse     For most all windows you may move to a new item by
  649.           pointer        moving the mouse cursor, within the window or
  650.                          on a 'bar' menu. Again, for most all windows, you may
  651.                          move the mouse out of a window and back in.
  652.  
  653.           Click on top   If a window has more selection items than can be
  654.           or bottom of   displayed at once, you can page up or page down to
  655.           window frame   see a 'new' window of different selection items.
  656.                          If a 'little arrow (up or down type)' is displayed
  657.                          on the top or bottom in the window frame, you can
  658.                          click on the 'little arrow' to  get a window of
  659.                          different selection items.
  660.  
  661.           click outside  Most all windows/menus allow you to 'not select' an
  662.           window or off  option. If you decide that you really do not want to
  663.           menu 'bar'     make a selection off the window, then click outside
  664.                          the window or off the 'bar' menu (if one displayed).
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.                                    Page 10
  683.  
  684.  
  685.  
  686.           CALLING CONVENTIONS
  687.           -------------------
  688.  
  689.  
  690.           In  all  of the following descriptions, numeric variables MUST be
  691.           integers; either globally defined early in the program  by  means
  692.           of  a  DEFINT statement, or locally at the statement level by the
  693.           integer assignment '%'. The EXCEPTION is for the WAITTIME routine.
  694.           The parameter passed to WAITTIME MUST be a single precision var-
  695.           iable, to allow for fractions of a second.
  696.  
  697.           You  may  also  replace  the variables in the parameter list with
  698.           constants. Strings  must  be  quoted (i.e., "This is a String").
  699.  
  700.           To see how each of these routines would be used in a typical  ap-
  701.           plication  program,  please  see  the  files  on  the disk marked
  702.           DEMO1.BAS and DEMO2.BAS. These are the source code files for  the
  703.           demo  programs  distributed  with BASWIND5. DEMO1 consists mainly
  704.           of CALLS to  MAKEWIND,  SAVESCRN,  RESTSCRN,  and  SCROLL.  DEMO2
  705.           includes a complete demo of all/most of the Window Tool Routines.
  706.           Run the DEMO1.EXE and DEMO2.EXE files to see the .BAS compiled
  707.           programs in action. The DEMO programs support a MS compatible mouse
  708.           if one is available.
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.                                    Page 11
  745.  
  746.  
  747.  
  748.           Routine: POPMENU
  749.                    -------
  750.  
  751.           Purpose: Provides a menu window from which  you may make choices by
  752.                    moving the 'select bar' by means of the cursor keys or mouse.
  753.                    All the menu items to choose from are displayed at once.
  754.  
  755.  
  756.           CALL POPMENU(HEADER.TITLE$,NUMBER.ITEMS%,ITEMS$(),_
  757.                         TYPE.FRAME%,FOREGROUND%,BACKGROUND%,_
  758.                         HEADER.FORE%,HEADER.BACK%,QUADRANT$,_
  759.                         SHADOW%,SELECTION%)
  760.  
  761.           Passed:
  762.  
  763.            HEADER.TITLE$ - A message that appears in the top row of the window.
  764.                            The  length of the header  will determine the
  765.                            width of the menu window unless a choice des-
  766.                            cription in array ITEMS$() is longer.
  767.  
  768.            NUMBER.ITEMS% - The number of items to choose from in the  menu.
  769.  
  770.                 ITEMS$() - An array with the individual menu descriptions
  771.                            for each choice.
  772.  
  773.              TYPE.FRAME% - The type of frame that will go around the window:
  774.  
  775.                                 0 - No frame. Just a border of spaces
  776.                                     of the background color.
  777.  
  778.                                 1 - A single line frame.
  779.  
  780.                                 2 - A double line frame.
  781.  
  782.                                 3 - A single horizontal line,
  783.                                     double vertical line frame.
  784.  
  785.                                 4 - A double horizontal line,
  786.                                     single vertical line frame.
  787.  
  788.              FOREGROUND% - The foreground color; ranging from 0 (BLACK)
  789.                            to 15 (BRIGHT WHITE). This will be the color
  790.                            of the frame.
  791.  
  792.              BACKGROUND% - The background color (the color of the window).
  793.                            Can range from 0 (BLACK) to 7 (WHITE).
  794.  
  795.             HEADER.FORE% - The foreground color of the Header.
  796.  
  797.             HEADER.BACK% - The background color of the Header.
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.                                    Page 12
  807.  
  808.  
  809.  
  810.                QUADRANT$ - The quadrant or row:column co-ordinates
  811.                            of where the window will be on the screen.
  812.  
  813.                              (see description of QUADRANT, page 47)
  814.  
  815.                  SHADOW% - A switch to determine if the menu window will
  816.                            have a shadow underneath. Any non-zero value
  817.                            will produce a shadow.
  818.  
  819.  
  820.               SELECTION% - The number of the item to be initially high-lighted.
  821.                            This allow you to select the initial 'default' menu
  822.                            selection item presented to the user.
  823.  
  824.  
  825.           Returns:
  826.  
  827.               SELECTION% - The number of the item selected. This can be
  828.                            used in a  SELECT CASE  .... statement to route
  829.                            program flow to the desired section.
  830.  
  831.                              -1  -   If [ESC] is pressed or mouse clicked
  832.                                     outside the menu window.
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.                                    Page 13
  869.  
  870.           Routine: POPLIST
  871.                    -------
  872.  
  873.           Purpose: To display a list of items from which to select one.
  874.                    If there are more items in the list than can fit within
  875.                    the window, you can scroll the list up or down, using
  876.                    the cursor keys or the mouse.
  877.  
  878.           CALL POPLIST(HEADER.TITLE$,SHOWITEMS%,NUMBER.ITEMS%,_
  879.                        ITEMS$(),FOREGROUND%,BACKGROUND%,_
  880.                        HEADER.FORE%,HEADER.BACK%,QUADRANT$,_
  881.                        SHADOW%,SELECTION%)
  882.  
  883.           Passed:
  884.  
  885.            HEADER.TITLE$ -  A message that appears in the top row of the window.
  886.                             The  length of the header  will determine the
  887.                             width of the menu window unless a choice des-
  888.                             cription in array ITEMS$() is longer.
  889.  
  890.               SHOWITEMS% - The number of items to display in the list window
  891.                            at one time, in case there are more than can be
  892.                            displayed in the window at one time.
  893.  
  894.            NUMBER.ITEMS% - The total number of items in the list array.
  895.  
  896.                 ITEMS$() - A description for each item in the list array,
  897.                            from which to choose.
  898.  
  899.              FOREGROUND% - The foreground color; ranging from 0 (BLACK)
  900.                            to 15 (BRIGHT WHITE). This will be the color of
  901.                            the frame.
  902.  
  903.              BACKGROUND% - The background color (the color of the window).
  904.                            Can range from 0 (BLACK) to 7 (WHITE).
  905.  
  906.             HEADER.FORE% - The foreground color of the Header.
  907.  
  908.             HEADER.BACK% - The background color of the Header.
  909.  
  910.                QUADRANT$ - The quadrant or row:column co-ordinates
  911.                            of where the window will be on the screen.
  912.  
  913.                              (see description of QUADRANT, page 47)
  914.  
  915.                  SHADOW% - A switch to determine if list window will
  916.                            have a black shadow underneath. Any non-zero
  917.                            value will produce a shadow.
  918.  
  919.               SELECTION% - The number of the item to be initially high-lighted.
  920.                            This allow you to select the initial 'default' menu
  921.                            selection item presented to the user.
  922.  
  923.           Returns:
  924.  
  925.               SELECTION% - The number of the item  selected. The actual
  926.                            list item selected can be determined by
  927.                            LIST$(SELECTION%).
  928.  
  929.                             -1  - If [ESC] is pressed or mouse clicked
  930.                                   outside window.
  931.  
  932.                                    Page 14
  933.  
  934.  
  935.           Routine: POPDIR
  936.                    ------
  937.  
  938.           Purpose: Produce a window on the screen containing a list of files,
  939.                    using the filespec in SEARCH$. The filespec may contain
  940.                    the wildcards '*' and '?'. Select one file from the list
  941.                    using the cursor keys or mouse.
  942.  
  943.  
  944.           CALL POPDIR(SEARCH$,SHOWITEMS%,FOREGROUND%,BACKGROUND%,_
  945.                       HEADER.FORE%,HEADER.BACK%,_
  946.                       QUADRANT$,SHADOW%,NUMFILES%,SELECTFILE$)
  947.  
  948.           Passed:
  949.  
  950.                  SEARCH$ - The file specification used to determine
  951.                            which files will be displayed in the
  952.                            directory window. May contain the wildcard
  953.                            characters "*" and "?". For example, "*.*"
  954.                            or "BAS?????.TXT".
  955.  
  956.               SHOWITEMS% - The number of items to display in the
  957.                            directory window at one time, in case there
  958.                            are more than can be displayed in the window
  959.                            at one time.
  960.  
  961.              FOREGROUND% - The foreground color; ranging from 0 (BLACK)
  962.                            to 15 (BRIGHT WHITE). This will be the color of
  963.                            the frame.
  964.  
  965.              BACKGROUND% - The background color (the color of the window).
  966.                             Can range from 0 (BLACK) to 7 (WHITE).
  967.  
  968.             HEADER.FORE% - The foreground color of the Header.
  969.  
  970.             HEADER.BACK% - The background color of the Header.
  971.  
  972.                QUADRANT$ - The quadrant or row:column co-ordinates
  973.                            of where the window will be, on the screen
  974.  
  975.                              (see description of QUADRANT, page 47)
  976.  
  977.                  SHADOW% - A switch to determine if list window will
  978.                            have a black shadow underneath. Any non-zero
  979.                            value will produce a shadow.
  980.  
  981.           Returns:
  982.  
  983.                NUMFILES% - The number of files that match the  SEARCH$
  984.                            filespec.
  985.  
  986.              SELECTFILE$ - The full filename of the  file selected.
  987.  
  988.  
  989.  
  990.           NOTE: The header for this routine consists of the SEARCH$ string.
  991.  
  992.  
  993.  
  994.                                    Page 15
  995.  
  996.           Routine: TAGLIST
  997.                    -------
  998.  
  999.           Purpose: Produces a window on the screen with a list of items
  1000.                    as in POPLIST; only instead of returning only a single
  1001.                    selection from the list, allows you to 'tag' a number
  1002.                    of items using the 'Ins' key or 'untag' items with the
  1003.                    'Del' key. You may click on an item to tag/untag it also.
  1004.  
  1005.           CALL TAGLIST(HEADER.TITLE$,SHOWITEMS%,NUMBER.ITEMS%,_
  1006.                        NUMTAGGED%,ITEMS$(),TAGITEMS%(),FOREGROUND%,_
  1007.                        BACKGROUND%,HEADER.FORE%,HEADER.BACK%,_
  1008.                        QUADRANT$,SHADOW%)
  1009.  
  1010.           Passed:
  1011.  
  1012.            HEADER.TITLE$ - A message that appears in the top row of the window.
  1013.                            The length of the header  will determine the
  1014.                            width of the menu window unless a choice des-
  1015.                            cription in array ITEMS$() is longer.
  1016.  
  1017.               SHOWITEMS% - The number of items to display in the window
  1018.                            window at one time, in case there are more
  1019.                            items than can be displayed in the window
  1020.                            at one time.
  1021.  
  1022.            NUMBER.ITEMS% - The total number of items in the list array.
  1023.  
  1024.                 ITEMS$() - A description for each item in the list array,
  1025.                            from which to choose.
  1026.  
  1027.  
  1028.              FOREGROUND% - The foreground color; ranging from 0 (BLACK)
  1029.                            to 15 (BRIGHT WHITE). This will be the color of
  1030.                            the frame.
  1031.  
  1032.              BACKGROUND% - The background color (the color of the window).
  1033.                            Can range from 0 (BLACK) to 7 (WHITE).
  1034.  
  1035.             HEADER.FORE% - The foreground color of the Header.
  1036.  
  1037.             HEADER.BACK% - The background color of the Header.
  1038.  
  1039.                QUADRANT$ - The quadrant or row:column co-ordinates
  1040.                            of where the window will be, on the screen.
  1041.  
  1042.                             (see description of QUADRANT, page 47)
  1043.  
  1044.                  SHADOW% - A switch to determine if list window will
  1045.                            have a black shadow underneath. Any non-zero
  1046.                            value will produce a shadow.
  1047.  
  1048.               NUMTAGGED% - The maximum number of items allowed to be tagged
  1049.  
  1050.           Returns:
  1051.  
  1052.               NUMTAGGED% - The total number of tagged items.
  1053.  
  1054.              TAGITEMS%() - An array holding the element numbers of the
  1055.                            tagged items.
  1056.  
  1057.                                    Page 16
  1058.  
  1059.  
  1060.           Routine: TAGDIR
  1061.                    ------
  1062.  
  1063.           Purpose: Produce a window on the screen containing a list of files,
  1064.                    using the filespec in SEARCH$. The filespec may contain
  1065.                    the wildcards '*' and '?'. Instead of returning only a
  1066.                    single selection from the list, you to 'tag' a number
  1067.                    of items using the 'Ins' key or 'untag' items with the
  1068.                    'Del' key. You may also click on an item to tag/untag it.
  1069.  
  1070.  
  1071.           CALL TAGDIR(SEARCH$,SHOWITEMS%,FOREGROUND%,BACKGROUND%,_
  1072.                       HEADER.FORE%,HEADER.BACK%,QUADRANT$,_
  1073.                       SHADOW%,NUMTAGGED%,TAG$()$)
  1074.  
  1075.           Passed:
  1076.  
  1077.                  SEARCH$ - The file specification used to determine
  1078.                            which files will be displayed in the
  1079.                            directory window. May contain the wildcard
  1080.                            characters "*" and "?". For example, "*.*"
  1081.                            or "BAS?????.TXT".
  1082.  
  1083.               SHOWITEMS% - The number of items to display in the
  1084.                            directory window at one time, in case there
  1085.                            are more than can be displayed in the window
  1086.                            at one time.
  1087.  
  1088.              FOREGROUND% - The foreground color; ranging from 0 (BLACK)
  1089.                            to 15 (BRIGHT WHITE). This will be the color of
  1090.                            the frame.
  1091.  
  1092.              BACKGROUND% - The background color (the color of the window).
  1093.                            Can range from 0 (BLACK) to 7 (WHITE).
  1094.  
  1095.             HEADER.FORE% - The foreground color of the Header.
  1096.  
  1097.             HEADER.BACK% - The background color of the Header.
  1098.  
  1099.                QUADRANT$ - The quadrant or row:column co-ordinates
  1100.                            of where the window will be, on the screen
  1101.  
  1102.                             (see description of QUADRANT, page 47)
  1103.  
  1104.                  SHADOW% - A switch to determine if list window will
  1105.                            have a black shadow underneath. Any non-zero
  1106.                            value will produce a shadow.
  1107.  
  1108.               NUMTAGGED% - The maximum number of filenames that can be tagged.
  1109.  
  1110.           Returns:
  1111.  
  1112.               NUMTAGGED% - The number of filenames that were tagged.
  1113.  
  1114.                   TAG()$ - An array containing the full filenames of the
  1115.                            files tagged.
  1116.  
  1117.           NOTE: The header for the window consists of the  SEARCH$ string.
  1118.  
  1119.                                    Page 17
  1120.  
  1121.           Routine: BARMENU
  1122.                    -------
  1123.  
  1124.           Purpose: Produces a display similar to the editing screen of
  1125.                    QuickBASIC with a bar across the top and 'pull-down'
  1126.                    menus for each selection.
  1127.  
  1128.           CALL BARMENU(HEADER.TITLE$,FOREGROUND%,BACKGROUND%,_
  1129.                        BLKSIZE%,BLKNUM%,MAXSIZE%(), MAXITEMS%(),ITEMS$(),_
  1130.                        MENUSLCT%,SELECTION%)
  1131.  
  1132.           Passed:
  1133.  
  1134.            HEADER.TITLE$ - The Menu Headings that will be placed on the
  1135.                            second screen line (to allow for a screen border
  1136.                            if desired).
  1137.  
  1138.              FOREGROUND% - The foreground color of the HEADER.TITLE$ string.
  1139.  
  1140.              BACKGROUND% - The background color of the HEADER.TITLE$ string.
  1141.  
  1142.                 BLKSIZE% - The HEADER.TITLE$ string is divided into blocks
  1143.                            of fixed size, which will be highlighted as each
  1144.                            is selected and the appropriate menu  'drops down'
  1145.                            beneath it. BLKSIZE% sets the size of these blocks.
  1146.  
  1147.                  BLKNUM% - The number of fixed blocks of BLKSIZE% that are
  1148.                            present in HEADER.TITLE$.
  1149.  
  1150.               MAXSIZE%() - An array with one element for each menu that will
  1151.                            appear (i.e., BLKNUM%). This array element holds
  1152.                            the maximum length of the  items contained in the
  1153.                            corresponding menu. HOWEVER, with BASWIND5, this
  1154.                            array is NOT really effective, as BASWIND5 looks
  1155.                            at ALL the ITEMS$() and adjusts the window size.
  1156.  
  1157.              MAXITEMS%() - An array with one element per menu, holding the
  1158.                            number of items in each corresponding menu.
  1159.  
  1160.                 ITEMS$() - A two-dimensional array (i.e. ITEMS$(1,1)
  1161.                            holding the actual menu item description.
  1162.                            The first dimension holds the menu number, and
  1163.                            the second holds the item number, within a
  1164.                            menu. Thus, ITEMS$(1,1) would be the first
  1165.                            item in Menu #1; and ITEMS$(5,10) would be
  1166.                            the 10th item in Menu #5 (depending on your
  1167.                            OPTION BASE or DIM statement).
  1168.  
  1169.               SELECTION% - The number of the item to be initially high-lighted.
  1170.                            This allow you to select the initial 'default' menu
  1171.                            selection item presented to the user.
  1172.  
  1173.           Returns:
  1174.  
  1175.                MENUSLCT% - The menu number,  of the menu selected.
  1176.  
  1177.               SELECTION% - The item number,  within the menu selected.
  1178.  
  1179.                             -1  - If ESC pressed or mouse clicked outside
  1180.                                    menu window.
  1181.  
  1182.                                    Page 18
  1183.  
  1184.  
  1185.  
  1186.           Routine: MENU123
  1187.                    -------
  1188.  
  1189.           Purpose: Produces two-line menus,  similar to those used with
  1190.                    LOTUS 1-2-3.
  1191.  
  1192.  
  1193.           CALL MENU123(HEADER.TITLE$,ROW%,FOREGROUND%,BACKGROUND%,_
  1194.                        NUMBER.ITEMS%,ITEMS$(),SELECTION%)
  1195.  
  1196.           Passed:
  1197.  
  1198.            HEADER.TITLE$ - A description the top menu line; from
  1199.                            which selection is made. The individual
  1200.                            names in the HEADER.TITLE$ string must be
  1201.                            separated by at least one space.
  1202.  
  1203.                     ROW% - The screen row on  which the menu is to appear.
  1204.                            This allows  you to place the menu on either the
  1205.                            top or bottom of the screen.
  1206.  
  1207.              FOREGROUND% - The foreground color of the HEADER.TITLE$ and
  1208.                            the Description Line under it.
  1209.  
  1210.              BACKGROUND% - The background color of the HEADER.TITLE$ and
  1211.                            the Description Line under it.
  1212.  
  1213.            NUMBER.ITEMS% - The number of individual names within the
  1214.                            HEADER.TITLE$.
  1215.  
  1216.                 ITEMS$() - An array of descriptions, one for each selection
  1217.                            item in the HEADER.TITLE$.
  1218.  
  1219.               SELECTION% - The number of the item to be initially high-lighted.
  1220.                            This allow you to select the initial 'default' menu
  1221.                            selection item presented to the user.
  1222.  
  1223.  
  1224.           Returns:
  1225.  
  1226.               SELECTION% - The number of the item selected.
  1227.  
  1228.  
  1229.                             -1  - If ESC pressed or mouse clicked off menu.
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.                                    Page 19
  1245.  
  1246.  
  1247.  
  1248.           Routine: CALENDAR
  1249.                    --------
  1250.  
  1251.           Purpose: Displays a calendar for the month and year desired.
  1252.  
  1253.  
  1254.           CALL CALENDAR(MONTH%,YEAR%,QUADRANT$,FOREGROUND%,BACKGROUND%,SHADOW%)
  1255.  
  1256.  
  1257.           Passed:
  1258.  
  1259.                   MONTH% - The number of the month desired.
  1260.  
  1261.                    YEAR% - The year in 4 digit format; that is, 1986,1987 etc.
  1262.  
  1263.                QUADRANT$ - The quadrant or row:column co-ordinates
  1264.                            of where the window will be, on the screen
  1265.  
  1266.                            (see description of QUADRANT, page 47)
  1267.  
  1268.              FOREGROUND% - The foreground color; ranging from 0
  1269.                              (BLACK) to 15 (BRIGHT WHITE). This
  1270.                              will be the color of the frame.
  1271.  
  1272.              BACKGROUND% - The background color (the color of the
  1273.                              window). Can range from 0 (BLACK) to
  1274.                              7 (WHITE).
  1275.  
  1276.                  SHADOW% - A switch to determine if list window will
  1277.                            have a black shadow underneath. Any non-zero
  1278.                            value will produce a shadow.
  1279.  
  1280.  
  1281.            Returns:
  1282.  
  1283.                            No returned parameters.
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.              NOTE:   The calendar routines do no error checking, so for
  1296.                      proper results, you must insure that month and years
  1297.                      fall within proper ranges.
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.                                    Page 20
  1307.  
  1308.  
  1309.  
  1310.           Routine: CALENDR3
  1311.  
  1312.                    --------
  1313.           Purpose: Displays a calendar for the month and year desired and also
  1314.                    for the previous and following month.
  1315.  
  1316.  
  1317.           CALL CALENDR3(MONTH%,YEAR%,ROW%,FOREGROUND%,BACKGROUND%,SHADOW%)
  1318.  
  1319.           Passed:
  1320.  
  1321.                   MONTH% - The number of the month desired.
  1322.  
  1323.                    YEAR% - The year in 4 digit format; that is, 1986,1987 etc.
  1324.  
  1325.                     ROW% - The row that the 3 calendars will be displayed on.
  1326.                            Since the 3 calendars produced by this routine
  1327.                            take up nearly the entire width of the screen,
  1328.                            there is no need to specify column parameter
  1329.  
  1330.              FOREGROUND% - The foreground color; ranging from 0 (BLACK)
  1331.                            to 15 (BRIGHT WHITE). This will be the color of
  1332.                            the frame.
  1333.  
  1334.              BACKGROUND% - The background color (the color of the window).
  1335.                            Can range from 0 (BLACK) to 7 (WHITE).
  1336.  
  1337.                  SHADOW% - A switch to determine if list window will
  1338.                            have a black shadow underneath. Any non-zero
  1339.                            value will produce a shadow.
  1340.  
  1341.            Returns:
  1342.  
  1343.                             No returned parameters.
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.              NOTE:   The calendar routines do no error checking, so for
  1363.                      proper results, you must insure that month and years
  1364.                      fall within proper ranges.
  1365.  
  1366.  
  1367.  
  1368.                                    Page 21
  1369.  
  1370.  
  1371.  
  1372.           Routine: KEYCAL
  1373.                    ------
  1374.  
  1375.           Purpose: Display a calendar for the month and year desired.
  1376.                    However, using the cursor keys, you may advance or
  1377.                    back up months and years automatically.
  1378.  
  1379.  
  1380.           CALL KEYCAL(MONTH%,YEAR%,QUADRANT$,FOREGROUND%,BACKGROUND%,SHADOW%)
  1381.  
  1382.           Passed:
  1383.  
  1384.                   MONTH% - The number of the month desired.
  1385.  
  1386.                    YEAR% - The year in 4 digit format; that is, 1986,1987 etc.
  1387.  
  1388.                QUADRANT$ - The quadrant or row:column co-ordinates
  1389.                            of where the window will be, on the screen
  1390.  
  1391.                            (see description of QUADRANT, page 47)
  1392.  
  1393.              FOREGROUND% - The foreground color; ranging from 0 (BLACK)
  1394.                            to 15 (BRIGHT WHITE). This will be the color of
  1395.                            the frame.
  1396.  
  1397.              BACKGROUND% - The background color (the color of the window).
  1398.                            Can range from 0 (BLACK) to 7 (WHITE).
  1399.  
  1400.                  SHADOW% - A switch to determine if list window will
  1401.                            have a black shadow underneath. Any non-zero
  1402.                            will produce a shadow.
  1403.  
  1404.  
  1405.  
  1406.           Returns:
  1407.  
  1408.                            No returned parameters.
  1409.  
  1410.                            However, you may use the cursor keys
  1411.                            to vary the calendar displayed as  follows:
  1412.  
  1413.                               UP ARROW    - Increment Year
  1414.  
  1415.                               DOWN ARROW  - Decrement Year
  1416.  
  1417.                               RIGHT ARROW - Increment Month
  1418.  
  1419.                               LEFT ARROW  - Decrement Month
  1420.  
  1421.                               You may exit the routine by pressing
  1422.                               either RETURN or ESCAPE.
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.                                    Page 22
  1431.  
  1432.  
  1433.           Routine: QUERY
  1434.                    -----
  1435.  
  1436.           Purpose: Allow a user to make a YES/NO or STOP/GO type of decision
  1437.                   based on a 'prompt', with supporting messages.
  1438.  
  1439.           CALL QUERY(NUMBER.ITEMS%,ITEMS$(),QUADRANT$,HEADER.TITLE$,_
  1440.                      LEFT.BUTTON.MSG$,LEFT.BUTTON.REPLY$,_
  1441.                      RIGHT.BUTTON.MSG$,RIGHT.BUTTON.REPLY$,_
  1442.                      QUERY.TYPE%,SELECTION%)
  1443.  
  1444.           Passed:
  1445.  
  1446.            NUMBER.ITEMS% - The number of lines of message data to appear in
  1447.                            the QUERY window. Allow for any blank lines
  1448.                            you may want.
  1449.  
  1450.                 ITEMS$() - The array of the text message data to appear in
  1451.                            the window. You must provide null strings ("")
  1452.                            for any blank lines
  1453.  
  1454.                QUADRANT$ - The quadrant or row:column co-ordinates
  1455.                            of where the window will be, on the screen
  1456.  
  1457.                            (see description of QUADRANT, page 47)
  1458.  
  1459.           HEADER.TITLE$  - A message that reflects the main reason for display-
  1460.                            ing this QUERY window.
  1461.  
  1462.         LEFT.BUTTON.MSG$ - The QUERY prompt that you want to appear in the left
  1463.                            window 'button', such as "YES"
  1464.  
  1465.       LEFT.BUTTON.REPLY$ - The valid allowable user keyboard responses to
  1466.                            select this option. For example: for a YES reply you
  1467.                            would specify "Yy" (to allow for upper/lower case)
  1468.  
  1469.        RIGHT.BUTTON.MSG$ - The QUERY prompt you want to appear in the right
  1470.                            window 'button', such as "NO"
  1471.  
  1472.      RIGHT.BUTTON.REPLY$ - The valid allowable user keyboard responses to
  1473.                            select this option. For example: for a NO  reply you
  1474.                            would specify "Nn" (to allow for upper/lower case)
  1475.  
  1476.             QUERY.TYPE%  - The type of QUERY window to be displayed, as follows:
  1477.  
  1478.                               0 - CAUTION/QUESTION type window
  1479.                               1 - WARNING type window
  1480.  
  1481.               SELECTION% - The number of the item to be initially high-lighted.
  1482.                            This allow you to select the initial 'default'
  1483.                            dialog button presented to the user.
  1484.  
  1485.           Returns:
  1486.  
  1487.               SELECTION% - A  0 or 1, indicating selection as follows:
  1488.  
  1489.                                   0 - left window 'button' selected
  1490.                                   1 - right window 'button' selected
  1491.                                  -1 - ESC key was pressed
  1492.  
  1493.                                    Page 23
  1494.  
  1495.  
  1496.  
  1497.           Routine: CAUTION
  1498.                    -------
  1499.  
  1500.           Purpose: Produces a yellow (or brown, depending on your monitor)
  1501.                    Caution window with given text messages, allowing the
  1502.                    user to either Cancel or Continue with the operation at
  1503.                    hand. The CAUTION window is now only a special case of the
  1504.                    QUERY window function.
  1505.  
  1506.           CALL CAUTION(NUMBER.ITEMS%,ITEMS$(),QUADRANT$,SELECTION%)
  1507.  
  1508.           Passed:
  1509.  
  1510.            NUMBER.ITEMS% - The number of lines of message data to appear in
  1511.                            the CAUTION window. Allow for any blank lines
  1512.                            you may want.
  1513.  
  1514.                 ITEMS$() - The array of the text message data to appear in
  1515.                            the window. You must provide null strings ("")
  1516.                            for any blank lines
  1517.  
  1518.                QUADRANT$ - The quadrant or row:column co-ordinates
  1519.                            of where the window will be, on the screen
  1520.  
  1521.                            (see description of QUADRANT, page 47)
  1522.  
  1523.               SELECTION% - The number of the item to be initially high-lighted.
  1524.                            This allow you to select the initial 'default'
  1525.                            dialog button  presented to the user.
  1526.  
  1527.           Returns:
  1528.  
  1529.               SELECTION% - A  0 or 1, indicating selection as follows:
  1530.  
  1531.                                   0 - CANCEL selected.
  1532.  
  1533.                                   1 - CONTINUE selected.
  1534.  
  1535.                                  -1 - ESC key was pressed
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.                                    Page 24
  1556.  
  1557.  
  1558.  
  1559.           Routine: QUESTION
  1560.                    --------
  1561.  
  1562.           Purpose: Produces a yellow (or brown, depending on your monitor)
  1563.                    Question window with given text messages, allowing the
  1564.                    user to answer either Yes or No to the question.
  1565.                    The QUESTION window is now only a special case of the
  1566.                    QUERY window function.
  1567.  
  1568.  
  1569.           CALL QUESTION (NUMBER.ITEMS%,ITEMS$(),QUADRANT$,SELECTION%)
  1570.  
  1571.           Passed:
  1572.  
  1573.            NUMBER.ITEMS% - The number of lines of message data to appear in
  1574.                            the QUESTION window. Allow for any blank lines
  1575.                            you may want.
  1576.  
  1577.                 ITEMS$() - The array of the text message data to appear in
  1578.                            the window. You must provide null strings ("")
  1579.                            for any blank lines
  1580.  
  1581.                QUADRANT$ - The quadrant or row:column co-ordinates
  1582.                            of where the window will be, on the screen
  1583.  
  1584.                            (see description of QUADRANT, page 47)
  1585.  
  1586.               SELECTION% - The number of the item to be initially high-lighted.
  1587.                            This allow you to select the initial 'default'
  1588.                            dialog button presented to the user.
  1589.  
  1590.           Returns:
  1591.  
  1592.               SELECTION% - A  0 or 1, indicating selection as follows:
  1593.  
  1594.                                   0 - NO     selected.
  1595.  
  1596.                                   1 - YES    selected.
  1597.  
  1598.                                  -1 - ESC key was pressed
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.                                    Page 25
  1618.  
  1619.  
  1620.  
  1621.           Routine: WARNING
  1622.                    -------
  1623.  
  1624.           Purpose: Similar to CAUTION above, but more dramatic with its
  1625.                    red color and flashing "WARNING" message.
  1626.                    The WARNING window is now only a special case of the
  1627.                    QUERY window function.
  1628.  
  1629.  
  1630.           CALL WARNING(NUMBER.ITEMS%,ITEMS$(),QUADRANT$,SELECTION%)
  1631.  
  1632.           Passed:
  1633.  
  1634.            NUMBER.ITEMS% - The number of lines of message data to appear in
  1635.                            the WARNING  window. Allow for any blank lines
  1636.                            you may want.
  1637.  
  1638.                 ITEMS$() - The array of the text message data to appear in
  1639.                            the window. You must provide null strings ("")
  1640.                            for any blank lines
  1641.  
  1642.                QUADRANT$ - The quadrant or row:column co-ordinates
  1643.                            of where the window will be, on the screen
  1644.  
  1645.                            (see description of QUADRANT, page 47)
  1646.  
  1647.               SELECTION% - The number of the item to be initially high-lighted.
  1648.                            This allow you to select the initial 'default'
  1649.                            dialog button presented to the user.
  1650.  
  1651.  
  1652.           Returns:
  1653.  
  1654.               SELECTION% - A  0 or 1, indicating selection as follows:
  1655.  
  1656.                                   0 - CANCEL selected.
  1657.  
  1658.                                   1 - CONTINUE selected.
  1659.  
  1660.                                  -1 - ESC key was pressed
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.                                    Page 26
  1680.  
  1681.  
  1682.  
  1683.           Routine: ROW25
  1684.                    -----
  1685.  
  1686.           Purpose: Produces a message centered on row 25 of the screen.
  1687.  
  1688.  
  1689.           CALL ROW25(HEADER.TITLE$)
  1690.  
  1691.           Passed:
  1692.  
  1693.            HEADER.TITLE$ - A message that is to be placed on Row 25 of
  1694.                            the screen. This string must be of length 72
  1695.                            or less for proper display.
  1696.  
  1697.  
  1698.  
  1699.           Returns:
  1700.  
  1701.                            No parameters returned.
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.            NOTE:  The string in HEADER.TITLE$ displayed centered  on Row 25
  1737.                    bracketed by flashing highlights.
  1738.  
  1739.  
  1740.  
  1741.                                    Page 27
  1742.  
  1743.  
  1744.  
  1745.           Routine: TITLE
  1746.                    -----
  1747.  
  1748.           Purpose: Produces a message centered in a Title Block.
  1749.  
  1750.  
  1751.           CALL TITLE(HEADER.TITLE$)
  1752.  
  1753.           Passed:
  1754.  
  1755.             HEADER.TITLE$ - A message that is to be used to title the screen.
  1756.  
  1757.  
  1758.  
  1759.           Returns:
  1760.  
  1761.  
  1762.                            No parameters returned
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.          NOTE:   The HEADER.TITLE$ displayed in a  Title Bar at the top
  1799.                  of the screen.
  1800.  
  1801.  
  1802.  
  1803.                                    Page 28
  1804.  
  1805.  
  1806.  
  1807.           Routine: FULLMENU
  1808.                    --------
  1809.  
  1810.           Purpose: Produces a full screen menu with choices selected by
  1811.                    pressing number keys.
  1812.  
  1813.  
  1814.           CALL FULLMENU(HEADER.TITLE$,ITEMS$(),MAIN%,NUMBER.ITEMS%,SELECTION%)
  1815.  
  1816.           Passed:
  1817.  
  1818.            HEADER.TITLE$ - A message to be displayed in the screen title,
  1819.                            (uses TITLE function).
  1820.  
  1821.                 ITEMS$() - An array of the descriptions of each of the menu
  1822.                            selections
  1823.  
  1824.                    MAIN% - A switch indicating if this is the Main Menu
  1825.                            of the program. This determines if the Menu
  1826.                            description accompanying the [ESC] selection
  1827.                            states "Return to Previous Menu" or "Exit Program".
  1828.  
  1829.            NUMBER.ITEMS% - The number of choices available for the menu.
  1830.  
  1831.  
  1832.  
  1833.           Returns:
  1834.  
  1835.               SELECTION% - The number of the item selected. This can be used
  1836.                            in a SELECT CASE .... statement to route  program
  1837.                            flow to the desired section.
  1838.  
  1839.                                -1 - If ESC is pressed
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.                                    Page 29
  1866.  
  1867.  
  1868.  
  1869.           Routine: WAITTIME
  1870.                    --------
  1871.  
  1872.           Purpose: Waits a given number of seconds or fractions thereof
  1873.                    regardless of processor speed or until ESC pressed.
  1874.  
  1875.  
  1876.           CALL WAITTIME(SECONDS!)
  1877.  
  1878.           Passed:
  1879.  
  1880.                 SECONDS! - A single precision number, holding the number of
  1881.                            seconds or fractions thereof to wait.
  1882.  
  1883.  
  1884.           Returns:
  1885.                            No parameters returned.
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.           NOTE:  Returns to the calling program after the  selected time
  1912.                  period or when the ESC key pressed.
  1913.  
  1914.                  The SECONDS was changed from a interger to a  single precision
  1915.                  to allow for fractions of a  second.
  1916.  
  1917.                  The WAITTIME was enhanced to allow for "rollover" at
  1918.                  midnite from a value of 86400 , back to 0  and still
  1919.                  correctly wait number of seconds specified.
  1920.  
  1921.                  A "backdoor" out of WAITTIME was added. The user can press
  1922.                  the ESC key and immediately cause a "timeout" to occur.
  1923.  
  1924.  
  1925.  
  1926.  
  1927.                                    Page 30
  1928.  
  1929.  
  1930.  
  1931.           Routine: FASTPRT
  1932.                    -------
  1933.  
  1934.           Purpose: Performs direct write to the memory screen buffer. Writes
  1935.                    a string at a row and column location, using the specified
  1936.                    attributes. This is an adaptation of the QPRINT routine
  1937.                    that has been around for awhile.
  1938.  
  1939.  
  1940.           CALL FASTPRT(HEADER.TITLE$,ROW%,COLUMN%,ATTR%)
  1941.  
  1942.           Passed:
  1943.  
  1944.            HEADER.TITLE$ - The information to be written directly to the
  1945.                            memory screen buffer (bypassing DOS).
  1946.  
  1947.                     ROW% - The row at which the HEADER.TITLE$ is to be written.
  1948.  
  1949.                  COLUMN% - The column at which the HEADER.TITLE$ to be written.
  1950.  
  1951.                    ATTR% - The screen attribute with which to display the
  1952.                            HEADER.TITLE$.
  1953.                            ATTR% is derived from the followung formula:
  1954.  
  1955.                                ATTR% = (backgrnd * 16) + foregrnd
  1956.  
  1957.  
  1958.  
  1959.           Returns:
  1960.  
  1961.                            No return parameter.
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.                                    Page 31
  1990.  
  1991.  
  1992.  
  1993.           Routine: MAKEWIND
  1994.                    --------
  1995.  
  1996.           Purpose: Produces a window of the given size and color at a
  1997.                    specified location on the screen; with options such
  1998.                    as a frame in various styles, a shadow underneath,
  1999.                    and 'growing' onto the screen.
  2000.  
  2001.           CALL MAKEWIND(ULR%,ULC%,LRR%,LRC%,TYPE.FRAME%,FOREGROUND%,_
  2002.                         BACKGROUND%,GROW%,SHADOW%,HEADER.TITLE$)
  2003.  
  2004.           Passed:
  2005.  
  2006.                     ULR% - An integer holding the upper left hand
  2007.                            corner row value.
  2008.  
  2009.                     ULC% - An integer holding the upper left hand
  2010.                            corner column value.
  2011.  
  2012.                     LRR% - An integer holding the lower right hand
  2013.                            corner row value.
  2014.  
  2015.                     LRC% - An integer holding the lower right hand
  2016.                            corner column value.
  2017.  
  2018.              TYPE.FRAME% - An integer defining the type of frame style
  2019.                            for the window as follows:
  2020.  
  2021.                               0 - No frame. Just a border of spaces
  2022.                                   of the background color. This is the
  2023.                                   default if an invalid value is specified.
  2024.  
  2025.                               1 - A single line frame.
  2026.  
  2027.                               2 - A double line frame.
  2028.  
  2029.                               3 - A single horizontal line,
  2030.                                   double vertical line frame.
  2031.  
  2032.                               4 - A double horizontal line,
  2033.                                   single vertical line frame.
  2034.  
  2035.              FOREGROUND% - The foreground color; ranging from 0 (BLACK)
  2036.                            to 15 (BRIGHT WHITE). This will be the color of
  2037.                            the frame. To get a blinking frame add 128 to
  2038.                            FOREGROUND%.
  2039.  
  2040.              BACKGROUND% - The background color (the color of the window).
  2041.                            Can range from 0 (BLACK) to 7 (WHITE).
  2042.  
  2043.                    GROW% - A switch to determine if the window will grow
  2044.                            from the center outward. Any non-zero value will
  2045.                            produce a growing window.
  2046.  
  2047.                  SHADOW% - A switch to determine if the window will
  2048.                            have a black shadow underneath. Any non-zero
  2049.                            value will produce a shadow.
  2050.  
  2051.                                    Page 32
  2052.  
  2053.  
  2054.  
  2055.            HEADER.TITLE$ - A string that will be used to produce a
  2056.                            label in CENTERED in the top line of the
  2057.                            window frame. The label will be framed
  2058.                            by square brackets ( [ ] ). If the
  2059.                            HEADER.TITLE$ string is a null string ("") the
  2060.                            the label will not be displayed. If the
  2061.                            HEADER.TITLE$ is longer than the width of the
  2062.                            window, the  label will be truncated.
  2063.  
  2064.           Returns:
  2065.                            No parameters returned.
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.           NOTES:
  2095.                 Once the window is placed on the screen, it is up to you
  2096.                 to fill it with data, by means of LOCATE, COLOR, and
  2097.                 PRINT statements.
  2098.  
  2099.                 The frame is drawn around the window coordinates. Thus the
  2100.                 dimensions of the windows will actually be two columns greater
  2101.                 in width and two row greater in length.
  2102.  
  2103.                 Adding a shadow increases the effective window size by 3
  2104.                 columns to the left and 1 row below.
  2105.  
  2106.                 You can use constants in the argument list of the CALL, so you
  2107.                 do not have to pre-assign variables to all parameters.
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.                                    Page 33
  2114.  
  2115.  
  2116.  
  2117.           Routine: SAVESCRN
  2118.                    --------
  2119.  
  2120.           Purpose: Saves the screen buffer contents to an  array.
  2121.  
  2122.  
  2123.           CALL SAVESCRN(NOTEST%,SCRNARRY%)
  2124.  
  2125.  
  2126.           Passed:
  2127.                  NOTEST% - A switch to determine whether to test horizontal
  2128.                            retrace status during data transfers to minimize
  2129.                            screen snow. The IBM CGA requires these tests;
  2130.                            but many non-IBM color cards and the EGA do not.
  2131.                            Operations can be significantly speeded up on
  2132.                            monitors NOT requiring a test of the horizontal
  2133.                            retrace.
  2134.  
  2135.                               A value of 0 for NOTEST% will cause the
  2136.                               routine to check horizontal retrace status.
  2137.                               Any other value will bypass status checking.
  2138.  
  2139.                               Regardless of this value, monochrome cards
  2140.                               will always bypass status checking.
  2141.  
  2142.  
  2143.                SCRNARRY% - The memory location of the element of the array
  2144.                            that is to hold the screen data. The memory
  2145.                            location must be able to hold 4000 bytes.
  2146.                            The memory location is determined as follows:
  2147.                            (for the start of the array only)
  2148.  
  2149.                                   SCRNARRY% = VARPTR(ARRY%(0))
  2150.  
  2151.                               If OPTION BASE 1 is used in the calling
  2152.                               program, the following statement would
  2153.                               be used instead:
  2154.  
  2155.                                   SCRNARRY% = VARPTR(ARRY%(1))
  2156.  
  2157.           Returns:
  2158.  
  2159.                            The data in the screen stored at the specified
  2160.                            memory location (of the array).
  2161.  
  2162.  
  2163.  
  2164.           NOTE: This routine does not save the current cursor location. If you
  2165.                 require that it be saved, you must issue the following statement
  2166.                 BEFORE you call SAVESCRN:
  2167.  
  2168.                                   OLDX% = POS(0):OLDY% = CSRLIN
  2169.  
  2170.                 You can restore the cursor position with the following statement
  2171.  
  2172.                                   LOCATE OLDY%,OLDX%
  2173.  
  2174.  
  2175.                                    Page 34
  2176.  
  2177.  
  2178.  
  2179.           Routine: RESTSCRN
  2180.                    --------
  2181.  
  2182.           Purpose: Moves screen data , that had been saved with SAVESCRN,
  2183.                    from the specified memory location ( in an array) back into
  2184.                    the screen memory buffer.
  2185.  
  2186.           CALL RESTSCRN(NOTEST%,SCRNARRY%)
  2187.  
  2188.           Passed:
  2189.  
  2190.                  NOTEST% - A switch to determine whether to test horizontal
  2191.                            retrace status during data transfers to minimize
  2192.                            screen snow. The IBM CGA requires these tests;
  2193.                            but many non-IBM color cards and the EGA do not.
  2194.                            Operations can be significantly speeded up on
  2195.                            monitors NOT requiring a test of the horizontal
  2196.                            retrace.
  2197.  
  2198.                               A value of 0 for NOTEST% will cause the
  2199.                               routine to check horizontal retrace status.
  2200.                               Any other value will bypass status checking.
  2201.  
  2202.                               Regardless of this value, monochrome cards
  2203.                               will always bypass status checking.
  2204.  
  2205.  
  2206.                SCRNARRY% - The memory location of the element of the array
  2207.                            that is holding the screen data. The memory
  2208.                            location must be holding 4000 bytes.
  2209.                            The memory location is determined as follows:
  2210.                            (for the start of the array only)
  2211.  
  2212.                                   SCRNARRY% = VARPTR(ARRY%(0))
  2213.  
  2214.                               If OPTION BASE 1 is used in the calling
  2215.                               program, the following statement would
  2216.                               be used instead:
  2217.  
  2218.                                   SCRNARRY% = VARPTR(ARRY%(1))
  2219.  
  2220.           Returns:
  2221.                            No parameters returned.
  2222.  
  2223.                            The screen as it was before the execution
  2224.                            of the SAVESCRN routine.
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.                                    Page 35
  2238.  
  2239.  
  2240.  
  2241.           Routine: SAVEWIND
  2242.                    --------
  2243.  
  2244.           Purpose: Copies a rectangular area of the screen memory buffer
  2245.                   to a memory location (in an array).
  2246.  
  2247.  
  2248.           SAVEWIND(ULR%,ULC%,LRR%,LRC%,WINDARRY%)
  2249.  
  2250.           Passed:
  2251.  
  2252.                     ULR% - The upper left hand corner row value.
  2253.  
  2254.                     ULC% - The upper left hand corner column value.
  2255.  
  2256.                     LRR% - The lower right hand corner row value.
  2257.  
  2258.                     LRC% - The lower right hand corner column value.
  2259.  
  2260.                WINDARRY% - The memory location of an element of an array
  2261.                            that is to hold the screen buffer data,
  2262.                            determined as follows: (for first elemeny only)
  2263.  
  2264.  
  2265.                                     WINDARRY% = VARPTR(ARRY%(0))
  2266.  
  2267.                                                or
  2268.  
  2269.                                     WINDARRY% = VARPTR(ARRY%(1))
  2270.                                          (if OPTION BASE 1)
  2271.  
  2272.  
  2273.  
  2274.           Returns:
  2275.  
  2276.                            The data in the specified screen memory buffer
  2277.                            is stored at the specified memory location
  2278.                            (of an array).
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.                                    Page 36
  2300.  
  2301.  
  2302.  
  2303.           Routine: RESTWIND
  2304.                    --------
  2305.  
  2306.           Purpose: Copies to a rectangular area of the screen memory buffer
  2307.                    from a memory location (in an array).
  2308.  
  2309.  
  2310.           RESTWIND(ULR%,ULC%,LRR%,LRC%,WINDARRY%)
  2311.  
  2312.  
  2313.           Passed:
  2314.  
  2315.                     ULR% - The upper left hand corner row value.
  2316.  
  2317.                     ULC% - The upper left hand corner column value.
  2318.  
  2319.                     LRR% - The lower right hand corner row value.
  2320.  
  2321.                     LRC% - The lower right hand corner column value.
  2322.  
  2323.                WINDARRY% - The memory location of an element of an array
  2324.                            that is holding the screen buffer data,
  2325.                            determined as follows: (for first elemeny only)
  2326.  
  2327.                                     WINDARRY% = VARPTR(ARRY%(0))
  2328.  
  2329.                                                or
  2330.  
  2331.                                     WINDARRY% = VARPTR(ARRY%(1))
  2332.                                          (if OPTION BASE 1)
  2333.  
  2334.  
  2335.  
  2336.           Returns:
  2337.                            No parameters returned.
  2338.  
  2339.                            The data in the specified array is restored
  2340.                            to the screen at the given co-ordinates. Note
  2341.                            that these DO NOT have to be the same coordinates
  2342.                            that were given at the time of the SAVEWIND
  2343.                            operation; allowing you to 'pick up' a section
  2344.                            of the screen and 'drop' it somewhere else.
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.                                    Page 37
  2362.  
  2363.  
  2364.  
  2365.           Routine: SCROLL
  2366.                    ------
  2367.  
  2368.           Purpose: Allows an area of the screen to be scrolled or cleared,
  2369.                    independent of the rest of the screen.
  2370.  
  2371.  
  2372.           CALL  SCROLL(ULR%,ULC%,LRR%,LRC%,LINES%,DIR%,HEADER.TITLE$)
  2373.  
  2374.  
  2375.           Passed:
  2376.  
  2377.                     ULR% - The upper left hand corner row value.
  2378.  
  2379.                     ULC% - The upper left hand  corner column value.
  2380.  
  2381.                     LRR% - The lower right hand corner row value.
  2382.  
  2383.                     LRC% - The lower right hand corner column value.
  2384.  
  2385.                   LINES% - The number of lines  to be scrolled. Normally 1,
  2386.                            so that another line can be set into its place.
  2387.                            If number of lines is 0, THEN the area defined
  2388.                            is cleared, using the background attribute.
  2389.  
  2390.                     DIR% - The direction of the scroll.
  2391.  
  2392.                                      1 - scroll up
  2393.  
  2394.                                     -1 - scroll down
  2395.  
  2396.            HEADER.TITLE$ - A text message that will be placed into the
  2397.                            area left clear by the scroll procedure.
  2398.  
  2399.  
  2400.           Returns:
  2401.                           No returned parameters.
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.           NOTE:
  2417.                 The SCROLL function takes advantage of calls made
  2418.                directly to the BIOS. Therefore the PCs BIOS that
  2419.                the program is running on MUST be able to provide
  2420.                IBM  compatibility for SCROLL to work correctly.
  2421.  
  2422.  
  2423.                                    Page 38
  2424.  
  2425.  
  2426.  
  2427.           Routine: MMBUTTON
  2428.                    --------
  2429.  
  2430.           Purpose: Returns which mouse buttons are currently being held down.
  2431.  
  2432.           CALL MMBUTTON(LFT%,RGT%)
  2433.  
  2434.           Passed:
  2435.  
  2436.                     No parameters passed
  2437.  
  2438.           Returns:
  2439.  
  2440.                     LFT% - Will return a non-zero value if the left button is
  2441.                            currently held down.
  2442.  
  2443.                     RGT% - Will return a non-zero value if the right button is
  2444.                            currently held down.
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.                                    Page 39
  2486.  
  2487.  
  2488.  
  2489.           Routine: MMCHECK
  2490.                    -------
  2491.  
  2492.           Purpose: Check for an installed mouse, reset the mouse, initialize
  2493.                    all motion  counters and set mouse to center position.
  2494.                    This call MUST BE MADE BEFORE any other mouse calls will
  2495.                    function.
  2496.  
  2497.           CALL MMCHECK(MOUSE%)
  2498.  
  2499.           Passed:
  2500.  
  2501.                   No parameters passed.
  2502.  
  2503.           Returns:
  2504.  
  2505.  
  2506.                   MOUSE% - The number of mouse buttons installed.
  2507.                            Zero(0) if NO mouse installed.
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.                                    Page 40
  2548.  
  2549.  
  2550.  
  2551.           Routine: MMCLICK
  2552.                    -------
  2553.  
  2554.           Purpose: Returns which mouse buttons have been clicked since you last
  2555.                    used this function.
  2556.  
  2557.  
  2558.           CALL MMCLICK(LFT%,RGT%)
  2559.  
  2560.  
  2561.           Passed:
  2562.                  No parameters passed
  2563.  
  2564.           Returns:
  2565.  
  2566.                     LFT% - Will return the number of times that left button has
  2567.                            been pressed since the last call to this function.
  2568.  
  2569.                     RGT% - Will return the number of times that right button has
  2570.                            been pressed since the last call to this function.
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.                                    Page 41
  2610.  
  2611.  
  2612.  
  2613.           Routine: MMCURSORON
  2614.                    ----------
  2615.  
  2616.  
  2617.           Purpose: Makes the cursor associated with the mouse visible. This is
  2618.                    normally a blinking block, and shows where the mouse is
  2619.                    currently pointing.
  2620.  
  2621.           CALL MMCURSORON
  2622.  
  2623.  
  2624.           Passed:
  2625.  
  2626.                   No parameters
  2627.  
  2628.           Returned:
  2629.  
  2630.                   No parameters
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.                                    Page 42
  2672.  
  2673.  
  2674.  
  2675.           Routine: MMCURSOROFF
  2676.                    -----------
  2677.  
  2678.           Purpose:  Makes the cursor associated with the mouse invisible.
  2679.                     If the cursor is off, the cursor will still follow the
  2680.                     mouses movements, but the cursor will not be seen until
  2681.                     turned on.
  2682.  
  2683.  
  2684.           MMCURSORON.
  2685.  
  2686.           CALL MMCURSOROFF
  2687.  
  2688.           Passed:
  2689.  
  2690.                   No parameters
  2691.  
  2692.           Returned:
  2693.  
  2694.                   No parameters
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.                                    Page 43
  2734.  
  2735.  
  2736.  
  2737.           Routine: MMGETLOC
  2738.                    --------
  2739.  
  2740.           Purpose: Gets the current location of the mouse cursor.  This is
  2741.                    returned as a value from 0-639 for columns, and 0-199 for
  2742.                    rows. You need to adjust this for the current screen format.
  2743.                    If you're in text mode, divide the columns by eight and the
  2744.                    rows by eight. If you're in low-res graphics mode, divide
  2745.                    by two. If you're in high res graphics, the numbers are fine.
  2746.  
  2747.           CALL MMGETLOC(COL%,ROW%)
  2748.  
  2749.           Passed:
  2750.  
  2751.                  No parameters passed
  2752.  
  2753.           Returned:
  2754.  
  2755.                     COL% - 'x' co-ordinate (column) is a value from 0-639
  2756.  
  2757.                     ROW% - 'y' co-ordinate (row) is a value from 0-199.
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.          NOTE: To normalize the values returned by  MMGETLOC (for 80x25 text
  2784.                screen) , the basic formula is:
  2785.  
  2786.  
  2787.                Basics CSRLIN  value is: ((ROW%\8) + 1)
  2788.  
  2789.                Basics POS(0)  value is: ((COL%\8) + 1)
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.                                    Page 44
  2796.  
  2797.  
  2798.  
  2799.           Routine: MMSETLOC
  2800.                    --------
  2801.  
  2802.           Purpose: Sets the current location of the mouse cursor.  This is
  2803.                    passed  as a value from 0-639 for columns, and 0-199 for
  2804.                    rows. You need to adjust this for the current screen format.
  2805.  
  2806.  
  2807.           CALL MMSETLOC(COL%,ROW%)
  2808.  
  2809.  
  2810.           Passed:
  2811.  
  2812.                     COL% - 'x' co-ordinate (column) is a value from 0-639
  2813.  
  2814.                     ROW% - 'y' co-ordinate (row) is a value from 0-199.
  2815.  
  2816.           Returns
  2817.  
  2818.                     No parameters returned.
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.          NOTE: To translate Basic's CSRLIN and POS(0) values, (for 80x25 text
  2848.                screen) , the basic formula is:
  2849.  
  2850.  
  2851.                Mouses 'y' value is :    ((CSRLIN-1)*8))
  2852.  
  2853.                Mouses 'x' value is :    ((POS(0)-1)*8)
  2854.  
  2855.  
  2856.  
  2857.                                    Page 45
  2858.  
  2859.  
  2860.  
  2861.           Routine: MMSETRANGE
  2862.                    ----------
  2863.  
  2864.  
  2865.           Purpose: Sets the range of locations where the mouse cursor is allowed
  2866.                    to be. This is done by specifying the upper left corner and
  2867.                    lower right corner of the edges of the mouse input field.
  2868.  
  2869.  
  2870.           CALL MMSETRANGE(ULC%,ULR%,LRC%,LRR%)
  2871.  
  2872.  
  2873.           Passed:
  2874.  
  2875.                     ULC% - The upper left hand corner column value.
  2876.  
  2877.                     ULR% - The upper left hand corner row value.
  2878.  
  2879.                     LRC% - The lower right hand corner column value.
  2880.  
  2881.                     LRR% - The lower right hand corner row value.
  2882.  
  2883.  
  2884.           Returns:
  2885.  
  2886.                     No parameters returned.
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.          NOTE: To translate Basic's CSRLIN and POS(0) values, (for 80x25 text
  2910.                screen) , the basic formula is:
  2911.  
  2912.  
  2913.                Mouses ROW    value is :    ((CSRLIN-1)*8))
  2914.  
  2915.  
  2916.                Mouses COLUMN value is :    ((POS(0)-1)*8)
  2917.  
  2918.  
  2919.                                    Page 46
  2920.  
  2921.  
  2922.  
  2923.  
  2924.           QUADRANT$
  2925.           ---------
  2926.  
  2927.  
  2928.           A QUADRANT$ is defined as a string. This string can have a
  2929.           a value as noted below ("0"/"4" or "01:01"). The "row:column"
  2930.           format defines actual upper left screen co-ordinates of a window.
  2931.           The other format, "0", defines a quadrant of the screen in which
  2932.           a window is centered. With BASWIND5, IF the window does NOT center
  2933.           in a quadrant (its to big for example), the center co-ordinates
  2934.           for the quadrant are adjusted so that the window will still be
  2935.           in that quadrant of the window.
  2936.  
  2937.  
  2938.  
  2939.                                    screen layout
  2940.                                  -----------------
  2941.  
  2942.  
  2943.  
  2944.                              ---------------------------
  2945.                             |             .             |
  2946.                             |      1      .      2      |
  2947.                             |             .             |
  2948.                             |.............0.............|
  2949.                             |             .             |
  2950.                             |             .             |
  2951.                             |      4      .      3      |
  2952.                             |             .             |
  2953.                              ---------------------------
  2954.  
  2955.                             "0" - In the exact center of the
  2956.                                   screen; centered according
  2957.                                   to menu size.
  2958.  
  2959.                             "1" - Upper Left Quadrant.
  2960.  
  2961.                             "2" - Upper Right Quadrant.
  2962.  
  2963.                             "3" - Lower Right Quadrant.
  2964.  
  2965.                             "4" - Lower Left Quadrant.
  2966.  
  2967.                         "rr:cc" - Specifies exact coordinates
  2968.                                   of upper left corner of window
  2969.                                   to be row rr and column cc
  2970.                                   (two digits each).
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.                                    Page 47
  2982.  
  2983.  
  2984.  
  2985.                              Comments, and Suggestions
  2986.  
  2987.  
  2988.           In  order  to  make  the Window Tools routines the best that they
  2989.           can be, and to better serve your  needs;  This  form  is provided
  2990.           for  your  feedback. If you  have any comments or suggestions on
  2991.           these routines,  please use this to  communicate that information.
  2992.  
  2993.            If  you  have  any  suggestions  as  to additional  Window  Tool
  2994.           routines  that would be useful to you, please include that infor-
  2995.           mation as well.
  2996.  
  2997.            You  may also use this form if you would like to be kept informed
  2998.           of any future additions and releases of Window Tools or supporting
  2999.           assembler routines.
  3000.  
  3001.  
  3002.           Name:________________________      Mail to:   James P. Morgan
  3003.  
  3004.           Address: ____________________                 5226 Via Hacienda #115
  3005.  
  3006.                    ____________________                 Orlando FL  32809
  3007.  
  3008.           City: _______________________                 U. S. A.
  3009.  
  3010.           State: __________ Zip: ______
  3011.  
  3012.           Country: ____________________
  3013.  
  3014.           COMMENTS:
  3015.  
  3016.           ________________________________________________________________
  3017.  
  3018.           ________________________________________________________________
  3019.  
  3020.           ________________________________________________________________
  3021.  
  3022.           ________________________________________________________________
  3023.  
  3024.           ________________________________________________________________
  3025.  
  3026.           ________________________________________________________________
  3027.  
  3028.           ________________________________________________________________
  3029.  
  3030.           ________________________________________________________________
  3031.  
  3032.           ________________________________________________________________
  3033.  
  3034.           ________________________________________________________________
  3035.  
  3036.           ________________________________________________________________
  3037.  
  3038.           ________________________________________________________________
  3039.  
  3040.           ________________________________________________________________
  3041.  
  3042.  
  3043.                                    Page 48
  3044.