home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / q / qlib56.zip / INPUT.DOC < prev    next >
Text File  |  1992-12-09  |  25KB  |  624 lines

  1.  
  2.   INPUT subroutines replace BASIC's INKEY$ or INPUT commands, and add
  3.   functions not available with BASIC alone.
  4.  
  5.  
  6.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  7.  
  8.     Subroutine: ClearKey
  9.     object file: clearkey.obj (getkey.obj)
  10.  
  11.         Removes all keypresses from the keyboard's "type ahead" buffer.
  12.     Works with standard and enhanced keyboards.
  13.  
  14.     Example:
  15.         CALL ClearKey
  16.  
  17.  
  18.  
  19.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  20.  
  21.     Function: keycode% = DGetKey
  22.     object file: dgetkey.obj
  23.  
  24.          Using DOS functions, DGetKey returns the ASCII character code of
  25.     the first keypress waiting in the keyboard buffer.  If the key code
  26.     returned > 255, then the key pressed is an extended keycode (such as
  27.     the function keys F1 - F10) and the ASCII code of the key is (code%
  28.     AND 255).  If no keypresses are waiting in the keyboard buffer,
  29.     DGetKey waits until a key is pressed before it returns to BASIC.
  30.     Unlike GetKey, below, input to DGeyKey may be redirected from the
  31.     command line.  DGeyKey does not support F11 or F12 function keys.
  32.     DGetKey allows ^C to pass through as keycode% = 3 without causing your
  33.     program to stop.  ^<Break> works the same as ^C in compiled programs;
  34.     in the QuickBASIC or QBX development enviornment, ^<break> causes
  35.     suspension of program operation (as it normally does).  See your BASIC
  36.     manual for ASCII character codes.
  37.  
  38.     Example:
  39.         REM $INCLUDE: 'qlib.bi'
  40.         keycode% = DGetKey
  41.         IF keycode% < 255 THEN PRINT CHR$(keycode%)   ' prints key pressed
  42.  
  43.  
  44.  
  45.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  46.  
  47.     Function: GPullDown(VARPTR(menu$(0)), choice0%, choice1%)
  48.     object files: gpulldn.obj (q$menu.obj and several others)
  49.               (for graphics modes)
  50.  
  51.     Function: PullDown(VARPTR(menu$(0)), choice0%, choice1%)
  52.     object files: pulldown.obj (q$menu.obj and several others)
  53.               (for text modes)
  54.  
  55.     Subroutine: MenuOption(optionnumber%, option% [option$ for option 6])
  56.     object file: q$menu.obj
  57.  
  58.     Requires QuickBASIC or BC7 without /fs switch
  59.     NOT for QBX development enviornment or VBDOS
  60.  
  61.     Pull-down menu system similar to the menus in the QuickBASIC
  62.     development environment.  You may specify initial main choice and
  63.     initial submenu choice (choice0% and choice1%).  PullDown returns to
  64.     BASIC when either ESC or RETURN is pressed, and returns the menu choice
  65.     in choice0% and choice1%.  Use cursor keys, home/end, pgup/pgdown or
  66.     mouse to move cursor.  PullDown will also jump to a menu choice when an
  67.     alphabetic key is pressed if that menu choice includes a capitalized
  68.     letter, and the key pressed matches the capital letter ("Hotkey"
  69.     feature).  Menu choices are disabled if all lower case.
  70.  
  71.     PullDown saves the screen under the menu, and restores the
  72.     previous screen when it exits.
  73.  
  74.     If choice1% (initial submenu choice) < 0, the main selections
  75.     will be printed without submenus.  You may move among the main
  76.     headings with left & right arrow keys or with the mouse.  Submenus
  77.     are displayed when Enter or any mouse buttons are pressed, or when
  78.     up or down arrows are pressed, or when the mouse pointer is moved up
  79.     or down.  Esc will erase the main headings and return to BASIC.
  80.  
  81.     MenuOption is used to specify colors.  Options supported are:
  82.  
  83.     option 0 = normal text color
  84.     option 1 = highlight color (menu choice)
  85.     option 2 = menu box color
  86.     option 3 = hotkey color
  87.  
  88.     If you do not specify colors, PullDown uses bright white text and
  89.     menu box, reverse video menu choice and hotkey color.
  90.  
  91.     Other options are:
  92.  
  93.     option 4 = user-specified exit key code (see GetKey for keycodes)
  94.     option 5 = exit when hotkey is pressed
  95.     option 6 = user-specified string printed at right edge of screen
  96.  
  97.     Any menu option may be canceled by setting the option = 0.
  98.  
  99.     Example:
  100.        see MENU.BAS example program
  101.  
  102.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  103.  
  104.     Function: keycode% = GetKey
  105.     object file: getkey.obj (asmflags.obj)
  106.  
  107.         Returns the ASCII character code of the first keypress waiting in
  108.     the keyboard buffer.  If the key code returned > 255, then the key
  109.     pressed is an extended keycode (such as the function keys F1 - F10)
  110.     and the ASCII code of the key is (code% AND 255).  If no keypresses are
  111.     waiting in the keyboard buffer, GetKey waits until a key is pressed
  112.     before it returns to BASIC.  GetKey supports F11 and F12 on 101-key
  113.     keyboards if the PC's BIOS also supports 101-key keyboards (See GetKBD).
  114.     See your BASIC manual for most ASCII character codes.
  115.  
  116.     ASCII character codes for F11 and F12 are not listed in some BASIC
  117.     manuals:
  118.                    with SHIFT     with CTRL      with ALT
  119.     F11       133       135            137            139
  120.     F12       134       136            138            140
  121.  
  122.     Example:
  123.          REM $INCLUDE: 'qlib.bi'
  124.          keycode% = GetKey
  125.          IF keycode% AND 256 THEN
  126.               keycode% = keycode% AND 255
  127.               IF keycode% = 138 THEN PRINT "CTRL+F12 was pressed"
  128.               ELSE
  129.            .
  130.            .
  131.            .
  132.          END IF
  133.  
  134.  
  135.  
  136.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  137.  
  138.     Subroutine: HideMouse
  139.     object file: mouse.obj (mousedat.obj)
  140.  
  141.          Makes the mouse cursor disappear.  The mouse driver continues to
  142.     track the mouse's motion and button status.
  143.  
  144.     Example:
  145.          HideMouse
  146.  
  147.  
  148.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  149.  
  150.     Subroutine: HideGMouse
  151.     object file: gmouse.obj (mousedat.obj, $graph.obj)
  152.  
  153.          Makes the alternate graphics mouse cursor disappear.  QLIB's
  154.     alternate mouse driver continues to track the mouse's motion.
  155.     See GMouse in GRAPHICS.DOC.
  156.  
  157.     Example:
  158.          HideGMouse
  159.  
  160.  
  161.  
  162.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  163.  
  164.     Function: k% = IsAlpha(keycode%)
  165.     object file: isalpha.obj
  166.  
  167.     Function: k% = IsDigit(keycode%)
  168.     Function: k% = IsLower(keycode%)
  169.     Function: k% = IsUpper(keycode%)
  170.     object file: isdlu.obj
  171.  
  172.          These function quickly determine if keycode% is an alphabetic
  173.     character (A-Z, a-z: IsAlpha), a numeric digit (0-9: IsDigit), a
  174.     lower-case alphabetic character (a-z: IsLower) or an upper-case
  175.     alphabetic character (A-Z: IsUpper).  k% = keycode% if keycode%
  176.     meets the function's search criteria, or k% = 0 if keycode is not
  177.     0-9, A-Z, or a-z (depending on the function).  Keycode% may be the
  178.     output of LineEdit, GLineEdit or the GetKey or DGetKey functions.
  179.  
  180.     Example:
  181.       REM $INCLUDE: 'qlib.bi'
  182.       REM I want to input only lowercase a-z
  183.  
  184. 10:   k% = IsLower(GetKey)
  185.       IF k% = 0 GOTO 10
  186.  
  187.  
  188.  
  189.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  190.  
  191.     Function: JaNein
  192.     object file: janein.obj
  193.  
  194.     German language version of YesNo.  Waits for either "J" or "N" to be
  195.     pressed, then returns the ASCII character code of the key pressed.
  196.     The character code returned will be the code for UPPER case "J" or "N",
  197.     regardless of whether the key pressed was upper or lower case.
  198.  
  199.     Example:
  200.          REM $INCLUDE: 'QLIB.BI'
  201.          PRINT "Are you sure? (J/N)"
  202.          REM  ASC("J") = 74, ASC("N") = 78
  203.          IF JaNein = 78 THEN
  204.                    .         ' instructions for N response
  205.                    .
  206.                    .
  207.               ELSE
  208.                    .         ' instructions for J response
  209.                    .
  210.                    .
  211.          END IF
  212.  
  213.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  214.  
  215.     Function: k% = KeyFilter(s1$, s2$, keycode%)
  216.     object file: keyfilt.obj
  217.  
  218.         KeyFilter compares keycode% to each character in the strings
  219.     s1$ and s2$, and returns k% = 0 unless keycode% matches a character
  220.     in the search strings.  If keycode% is a normal character (i.e., not
  221.     a function key), then s1$ is used.  If keycode% is an extended keycode,
  222.     (keycode% > 255) then s2$ is used.  See example.
  223.  
  224.     Example:
  225.     REM $INCLUDE: 'qlib.bi'
  226.     REM  I want to input only the letters a, c and g (upper or lower case)
  227.     REM  and I also want to watch for F10 (keycode% = 256 OR 68)
  228.     s1$ = "aAcCgG"
  229.     s2$ = CHR$(68)
  230. 10: k% = KeyFilter(s1$, s2$, keycode%)
  231.     IF k% = 0 GOTO 10
  232.  
  233.     REM  Note that KeyFilter may also be called using one of QLIB's input
  234.     REM  functions such as GetKey, DGetKey or KeyIfWaiting like this:
  235.     REM  10: k% = KeyFilter(s1$, s2$, KeyIfWaiting)
  236.     REM      IF k% = 0 GOTO ...
  237.  
  238.  
  239.  
  240.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  241.  
  242.     Function: keycode% = KeyIfWaiting
  243.     object files: kifwait.obj (getkey.obj, asmflags.obj)
  244.  
  245.     Uses BIOS calls to determine whether a key is waiting in the keyboard
  246.     buffer, returning the key to BASIC.  If no key is waiting, KeyIfWaiting
  247.     returns keycode% = 0.  KeyIfWaiting supports F11 and F12 keys on 101-key
  248.     keyboards if the PC's BIOS also supports these keyboards.
  249.  
  250.     Example:
  251.          keycode% = KeyIfWaiting
  252.  
  253.  
  254.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  255.  
  256.     Subroutine: KeyOrButton(buttons%, keycode%)
  257.     object files: mouse.obj (getkey.obj)
  258.  
  259.     Returns first key pressed or mouse button pressed.  If no key is waiting
  260.     in the keyboard buffer and no mouse button is pressed, KeyOrButton waits
  261.     until one of these events happens.  If a key is waiting in the keyboard
  262.     buffer before KeyOrButton is called, the key is returned to QB without
  263.     checking mouse buttons.  Buttons% = 0 if a key has been read, otherwise
  264.     buttons% indicates which buttons are pressed.  See GetKey for key codes,
  265.     and see the example below for buttons% codes.  More than one button may
  266.     be pressed.
  267.  
  268.     Example:
  269.         CALL KeyOrButton(buttons%, keycode%)
  270.         msg$ = ""
  271.         IF buttons% THEN
  272.                IF buttons% AND 1 THEN msg$ = "left button pressed "
  273.                IF buttons% AND 2 THEN msg$ = msg$ + "right button pressed "
  274.                IF buttons% AND 4 THEN msg$ = msg$ + "center button pressed"
  275.                PRINT msg$
  276.                ELSE
  277.                            ' action for key pressed
  278.         END IF
  279.  
  280.  
  281.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  282.  
  283.     Function: a% = KeyWaiting
  284.     object file: getkey.obj (asmflags.obj)
  285.  
  286.     Uses BIOS calls to determine whether a key is waiting in the keyboard
  287.     buffer, without reading the key.  KeyWaiting supports F11 and F12 keys on
  288.     101-key keyboards if the PC's BIOS also supports these keyboards.
  289.  
  290.     Example:
  291.          REM $INCLUDE: 'qlib.bi'
  292.          IF KeyWaiting% THEN PRINT "A key has been pressed"
  293.  
  294.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  295.  
  296.     Subroutine: LineEdit(st$, row%, col%, attr%, options%, keycode%)
  297.     Subroutine: StartEdit(startcol%)
  298.     Function: LastEdit
  299.     object files: lineedit.obj (q$edit.obj, crt.obj, q$qprn.obj, cursor.obj,
  300.                                 getkey.obj)
  301.  
  302.          LineEdit displays st$ at (row%, col%) and provides many editing
  303.     functions, returning the edited string to BASIC.  The length of st$
  304.     will not change during the editing process.  Options are provided to
  305.     restrict legal input or to provide additional information, depending on
  306.     the bits set in options%.  See LineEdit's Summary of Commands, below.
  307.     See GetKey to interpret the keycode% returned by LineEdit.
  308.          StartEdit may be used before calling LineEdit in order to begin or
  309.     resume editing at a specified position in st$ (default position is
  310.     1, the left end of the string).  LastEdit is used after LineEdit returns
  311.     to BASIC, to determine the cursor position in st$ when control was
  312.     returned to BASIC.
  313.          LineEdit turns the cursor off when returning to BASIC.  You may
  314.     use BASIC's LOCATE command or QLIB's CursorON subroutine to restore
  315.     the cursor.  LineEdit works only in text mode.  Use GLineEdit in graphics
  316.     modes (See GLineEdit in GRAPHICS.DOC.).  LineEdit will edit any string up
  317.     to 32,767 bytes long.  See also WindowEdit.
  318.  
  319.     Thanks to Thomas Cullins for his bug report on the BC7/QBX version of
  320.     LineEdit.
  321.  
  322.      Summary of LineEdit commands:
  323.  
  324.      Enter, Esc = return string to BASIC
  325.      Left arrow, Right arrow = move cursor
  326.      Insert = toggle insert/overstrike modes
  327.      Home = move cursor to start of line
  328.      End = move cursor to end of text
  329.      Delete = delete character at cursor and close up space
  330.      Backspace = move cursor back one space, delete character, and close space
  331.      Ctrl+End = clear from cursor to end of line
  332.      Ctrl+Left, Ctrl+Right = move cursor one word
  333.  
  334.      LineEdit options and examples are on the next page.
  335.  
  336.  
  337.      LineEdit options:
  338.  
  339.      1 = Lower Case
  340.      2 = Upper Case
  341.      1 + 2 = Numerals only
  342.      1 + 2 + 4 = Numerals and numeric punctuation ($,.%-+*/)
  343.      8 = use BIOS to display string (default is DVM)
  344.      32 = Return to BASIC if cursor is past end of string
  345.      64 = Return to BASIC if normal key pressed
  346.      128 = Return to BASIC if extended key (F1 - F10, etc.) is pressed.
  347.               NOTE: if this option is used and an extended key is pressed,
  348.               keycode% returned as 256 + the ASCII code of the extended
  349.               key.  This may be used along with StartEdit and LastEdit
  350.               to trap specified extended key presses.  See examples.
  351.      256 = Return to calling program if ALT key is pressed.  keycode%
  352.               is returned = 256.
  353.      -32768 = Use alternate reverse video cursor instead of the blinking
  354.               hardware cursor.  This option may cause "snow" on CGA monitors.
  355.               The cursor position is indicated by a black character on a
  356.               white background; in insert mode, either the character blinks
  357.               or the background is high intensity, depending on the last call
  358.               to SetBLINK (see VIDEO.DOC).  To preserve compatability with
  359.               future versions of LineEdit, do not use this option with
  360.               option 8.  This version of LineEdit ignores option -32768 if
  361.               option 8 is used.
  362.  
  363.     Use BASIC's OR operator to combine options.
  364.  
  365.     Example 1:
  366.          st$ = "This is the string to be edited              "
  367.                                   ' extra spaces allow for inserted characters
  368.          row% = 5: col% = 10
  369.          options% = 0             ' allow all characters, no fancy stuff
  370.          CALL LineEdit(st$, row%, col%, attr%, options%, keycode%)
  371.  
  372.     Example 2:
  373.          REM $INCLUDE: 'qlib.bi'
  374.          st$ = "This is the string to be edited": row% = 5: col% = 10
  375.          options% = 2 OR 128 ' All text input converted to upper case and
  376.                              ' return to calling program if extended key
  377.                              ' pressed.
  378.                              ' I want to trap F1, which returns the ASCII
  379.                              ' code a% = 59 (see your BASIC manual for
  380.                              ' extended key codes)
  381. 10       CALL LineEdit(st$, row%, col%, attr%, options%, keycode%)
  382.          IF keycode% AND 256 THEN
  383.               a% = keycode% AND 255
  384.               IF a% = 59 THEN ...      ' do F1 stuff
  385.                                        '    else go back to LineEdit:
  386.               CALL StartEdit(LastEdit) ' re-set cursor location
  387.               GOTO 10                  ' and go back to LineEdit
  388.          END IF
  389.  
  390.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  391.  
  392.     Function: keycode% = MaskEdit(mask$, row%, column%, attr%, options%)
  393.     object file: maskedit.obj (getkey.obj, qprint.obj, cursor.obj)
  394.  
  395.          Permits a string with fixed fields and fixed delimiters to be
  396.     edited.  This can be used, for example, to input telephone numbers
  397.     or ZIP codes, or other fixed-field data.  MaskEdit will permit only
  398.     the characters in the input string which are numbers, letters or
  399.     space characters to be edited, skipping over field delimiters.
  400.     MaskEdit will optionally limit input to numerals, or will force
  401.     lower-case input, or upper-case input.  MaskEdit returns to your
  402.     BASIC program when either ESC or ENTER is pressed.  MaskEdit options
  403.     are:
  404.  
  405.        1 = a-z forced to upper case 
  406.        2 = A-Z forced to lower case 
  407.        3 = numerals only allowed
  408.  
  409.     row% and column% are the location on the screen where you want
  410.     the string to be printed, and attr% is the color attribute to be used.
  411.     You may use the TAB key to jump from one field to the next, and
  412.     shift+TAB jumps the cursor back to the previous field.  You may also
  413.     use the left, right, home and end keys to move the cursor.
  414.  
  415.     Example:
  416.        REM $INCLUDE: 'qlib.bi'
  417.        REM  define the mask for entering telephone numbers
  418.        REM  I'm using CHR$(255) as a non-editable space character
  419.        mask$ = "(   )"+CHR$(255)+"   -    "
  420.        phone$ = mask$                 ' don't disturb mask$
  421.        options% = 3
  422.        keycode% = MaskEdit(phone$, row%, column%, attr%, options%)
  423.        IF keycode% = 27 THEN          ' ESC was pressed
  424.  
  425.  
  426.  
  427.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  428.  
  429.     Subroutine: MouseStatus(x%, y%, buttons%)
  430.     object file: mstatus.obj (mousedat.obj)
  431.  
  432.          Returns the mouse button status and mouse position.  Buttons% is
  433.     a code which indicates which mouse buttons, if any, are pressed, and
  434.     the PIXEL coordinates of the mouse cursor, even in text modes.
  435.     Pixel coordinates start with (0,0) in the upper left corner.
  436.     X-coordinates are horizontal and Y-coordinates are vertical (increasing
  437.     from top of screen to bottom).  See KeyOrButton to decode buttons%.
  438.     To determine mouse cursor position in terms of text locations, see
  439.     TMouseStatus.
  440.  
  441.     Example:
  442.          CALL MouseStatus(x%, y%, buttons%)
  443.  
  444.  
  445.  
  446.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  447.  
  448.     Function: OuiNon
  449.     object file: ouinon.obj
  450.  
  451.     French language version of YesNo.  Waits for either "O" or "N" to be
  452.     pressed, then returns the ASCII character code of the key pressed.
  453.     The character code returned will be the code for UPPER case "O" or "N",
  454.     regardless of whether the key pressed was upper or lower case.
  455.  
  456.     Example:
  457.          REM $INCLUDE: 'QLIB.BI'
  458.          PRINT "Are you sure? (O/N)"
  459.          REM  ASC("O") = 79, ASC("N") = 78
  460.          IF OuiNon = 78 THEN
  461.                    .         ' instructions for N response
  462.                    .
  463.                    .
  464.               ELSE
  465.                    .         ' instructions for O response
  466.                    .
  467.                    .
  468.          END IF
  469.  
  470.  
  471.  
  472.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  473.  
  474.     Subroutine: ShowMouse
  475.     object file: mouse.obj (mousedat.obj)
  476.  
  477.          ShowMouse makes the mouse cursor visible.
  478.  
  479.     Example:
  480.          CALL ShowMouse
  481.  
  482.  
  483.  
  484.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  485.  
  486.     Subroutine: ShowGMouse
  487.     object file: gmouse.obj (mousedat.obj, $graph.obj)
  488.  
  489.          ShowGMouse makes the alternate graphics mouse cursor visible.
  490.     See GMouse in GRAPHICS.DOC.
  491.  
  492.     Example:
  493.          CALL ShowGMouse
  494.  
  495.  
  496.  
  497.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  498.  
  499.     Function: SiNo
  500.     object file: sino.obj
  501.  
  502.     Spanish language version of YesNo.  Waits for either "S" or "N" to be
  503.     pressed, then returns the ASCII character code of the key pressed.
  504.     The character code returned will be the code for UPPER case "S" or "N",
  505.     regardless of whether the key pressed was upper or lower case.
  506.  
  507.     Example:
  508.          REM $INCLUDE: 'QLIB.BI'
  509.          PRINT "Are you sure? (S/N)"
  510.          REM  ASC("S") = 83, ASC("N") = 78
  511.          IF SiNo = 78 THEN
  512.                    .         ' instructions for N response
  513.                    .
  514.                    .
  515.               ELSE
  516.                    .         ' instructions for S response
  517.                    .
  518.                    .
  519.          END IF
  520.  
  521.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  522.  
  523.     Subroutine: TMouseStatus(col%, row%, buttons%)
  524.     object file: tmstatus.obj
  525.  
  526.     TMouseStatus is similar to MouseStatus, but returns the mouse cursor's
  527.     position as (col%, row%) character coordinates instead of pixel
  528.     coordinates.  Note that most QLIB subroutines use column and row
  529.     coordinates in reverse order (row%, col%) instead of TMouseStatus'
  530.     (col%, row%).  Buttons% is the mouse's button status.  See KeyOrButton
  531.     to decode button status.
  532.  
  533.     Example:
  534.          CALL TMouseStatus(col%, row%, buttons%)
  535.  
  536.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  537.  
  538.     Function: keycode% = VertList(VARPTR(a$(0)), row%, col%, choice%)
  539.     object files: vlist.obj (q$menu.obj, getkey.obj, crt.obj, q$qprn.obj,
  540.                              several others)
  541.  
  542.     Vertical list menu system; requires an array of varable-length strings,
  543.     upper left corner coordinates (row%, col%) and starting position
  544.     (choice%).  VertList returns to BASIC when Esc, Enter or an
  545.     optional user-defined exit key is pressed, or when a mouse button is
  546.     pressed.  The keycode of the key pressed is returned as keycode% and
  547.     the menu selection is returned as choice%.  VertList uses all menu
  548.     options except option 6 (user-specified prompt string).  See MenuOption.
  549.  
  550.     Example:
  551.     REM $INCLUDE: 'qlib.bi'
  552.  
  553.     DIM mainmenu$(9)      ' 10 menu strings, 0-9; last string is NUL
  554.     FOR I= 0 TO 9
  555.       READ mainmenu$(I)   ' strings are in a DATA statement
  556.                           ' end of menu string data marked with a NUL string
  557.     NEXT I
  558.     row% = 5: col% = 10: choice% = 0
  559.                           ' "light bar" positioned at mainmenu$(0)
  560.     mm% = VARPTR(mainmenu$(0))
  561.     keycode% = VertList(mm%, row%, col%, choice%)
  562.  
  563.  
  564.  
  565.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  566.  
  567.     Subroutine: WindowEdit(st$, r0%, c0%, r1%, c1%, attr%, options%, keycode%)
  568.     Subroutine: WStartEdit(start%)
  569.     Function: WLastEdit
  570.     object files: wedit.obj (qprintw.obj(crt.obj, q$qprn.obj, q$clrw.obj),
  571.                              cursor.obj, getkey.obj)
  572.  
  573.          Similar to LineEdit, WindowEdit edits the string st$ in a window on
  574.     a text-mode screen and returns the result to BASIC.  WindowEdit is still
  575.     in the early stages of development; your comments and suggestions will
  576.     influence my development of this subroutine.
  577.  
  578.     WindowEdit differs from LineEdit in that it includes word wrap and
  579.     up/down cursor movement, and varies the length of the string st$, depending
  580.     on text inserted or deleted.  WindowEdit does not yet scroll to allow
  581.     editing strings longer than the window can display (but this is on my
  582.     list of enhancements).  WindowEdit also does not yet use any options%.
  583.     Note that you should use options% = 0 for compatability with future
  584.     versions of WindowEdit.  WStartEdit and WLastEdit are used with
  585.     WindowEdit as StartEdit and LastEdit are used with LineEdit.
  586.  
  587.     Summary of WindowEdit commands:
  588.  
  589.      Enter, Esc = return string to BASIC
  590.      Left, Right, Up, Down arrows = move cursor
  591.      Insert = toggle insert/overstrike modes
  592.      Home = move cursor to start of line
  593.      End = move cursor to end of line
  594.      Delete = delete character at cursor and close up space
  595.      Backspace = move cursor back one space, delete character, and close space
  596.      Ctrl+Left, Ctrl+Right = move cursor one word
  597.  
  598.  
  599.  
  600.  
  601.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  602.  
  603.     Function: YesNo
  604.     object file: yesno.obj
  605.  
  606.          Waits for either "Y" or "N" to be pressed, then returns the ASCII
  607.     character code of the key pressed.  The character code returned will be
  608.     the code for UPPER case "Y" or "N", regardless of whether the key pressed
  609.     was upper or lower case.
  610.  
  611.     Example:
  612.          REM $INCLUDE: 'QLIB.BI'
  613.          PRINT "Are you sure? (Y/N)"
  614.          REM  ASC("Y") = 89, ASC("N") = 78
  615.          IF YesNo = 78 THEN
  616.                    .         ' instructions for N response
  617.                    .
  618.                    .
  619.               ELSE
  620.                    .         ' instructions for Y response
  621.                    .
  622.                    .
  623.          END IF
  624.