home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-11 | 287.0 KB | 7,855 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- WINDOWS R-E-Z
- VER. 6.00
-
-
- CONNECT Software
- 6192 Fawn Meadow
- Farmington, NY 14425
-
- Richard Magnanti
- (716) 924-3439
-
- CPS: 71020,2040
- GENIE: R.MAGNANTI
- DELPHI: MAGNANTI
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (c) 1988 - 1992 BY:
- CONNECT Software
- ALL RIGHTS RESERVED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CONTENTS
-
- Differences in versions of WINDOWS R-E-Z ----------------- 1
-
- Important notes for BASIC 7.1 and VB 1.0 for DOS users-- 2-3
-
- General overview ( list of procedures included ) ------- 4-8
-
- System and programming requirements ---------------------- 9
-
- Getting started ----------------------------------------- 10
-
- Windowing routines ----------------------------------- 11-21
- The Active Window ------------------------------ 11
- 1.00 SETWIND ------------------------------------- 11-12
- 1.01 MAKEWIND ------------------------------------ 12-14
- 1.02 CHNGWIND --------------------------------------- 15
- 1.03 PRINTW ----------------------------------------- 15
- 1.04 PRINTWHOT ----------------------------------- 15-16
- 1.05 SAVEWIND --------------------------------------- 16
- 1.06 RESAVE -------------------------------------- 16-17
- 1.07 RSTRWIND --------------------------------------- 17
- 1.08 DELWIND ------------------------------------- 17-18
- 1.09 CLRWIND ---------------------------------------- 18
- 1.10 NEWCOLOR --------------------------------------- 18
- 1.11 LINEW --------------------------------------- 18-19
- 1.12 BOXW ------------------------------------------- 19
- 1.13 WAVAIL% ---------------------------------------- 20
- 1.14 WINDSTATUS ------------------------------------- 21
-
- Pulldown windows ------------------------------------- 22-30
- 2.00 SETPULL ------------------------------------- 22-24
- Example: SETPULL ---------------------------- 24-25
- 2.01 PULLDOWN ------------------------------------ 25-29
- 2.02 RSTRPULL ------------------------------------ 29-30
- 2.03 CHNGPULL --------------------------------------- 30
-
- Scroll windows --------------------------------------- 31-51
- 3.00 SCRLWIND ------------------------------------ 31-40
- SCRLWIND example ( Auto-exit ) -------------- 40-41
- 3.01 B4SCRL -------------------------------------- 41-50
- 3.02 MARKED% ------------------------------------- 50-51
-
- Input routines --------------------------------------- 52-79
- 4.00 INPTINIT ------------------------------------ 52-53
- 4.10 B4INPT -------------------------------------- 53-55
- 4.02 INPTWIND ------------------------------------ 55-59
- 4.03 RSTRINPT ------------------------------------ 59-60
- Example: INPTWIND ------------------------------ 61
- Multi-field Input Overview --------------------- 62
- 4.04 SETINPT ---------------------------------------- 63
- 4.05 MAKEFIELD ----------------------------------- 64-67
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4.06 MULTINPT ------------------------------------ 67-72
- Editing features for input routines ------------ 73
- 4.07 UPDATEFIELD ------------------------------------ 74
- 4.08 GETANS -------------------------------------- 74-76
- 4.09 CHOICEWIND% --------------------------------- 76-78
- 4.10 CHOICEBAR% ---------------------------------- 78-79
-
- Directory routines ----------------------------------- 80-85
- 5.00 GETDISK ---------------------------------------- 80
- 5.01 FINDPATH --------------------------------------- 80
- 5.02 SETDISK ---------------------------------------- 80
- 5.03 DISKSIZE --------------------------------------- 81
- 5.04 FINDDIR ------------------------------------- 81-83
- A directory scroll window ( example ) ------- 84-85
-
- Keyboard and Mouse routines -------------------------- 86-91
- 6.00 GETAKEY% -------------------------------------- 86
- GETAKEY% example ------------------------------- 86
- 6.01 CLEARKB ---------------------------------------- 87
- 6.02 MOUSEON ---------------------------------------- 87
- 6.03 MOUSEHIDE -------------------------------------- 87
- 6.04 MOUSESHOW ----------------------------------- 87-88
- 6.05 MOUSEROW% -------------------------------------- 88
- 6.06 MOUSECOL% -------------------------------------- 88
- 6.07 MOUSEPOS --------------------------------------- 88
- 6.08 MOUSELIMIT ------------------------------------- 88
- 6.09 LBUTTON% --------------------------------------- 88
- 6.10 RBUTTON% --------------------------------------- 89
- 6.11 MOUSEINWIND% ----------------------------------- 89
- 6.12 MOUSEINMULT% -------------------------------- 90-91
-
- Information line routines ---------------------------- 91-95
- 8.00 INFOLINE ---------------------------------------- 91
- 8.01 PRINTINFO ------------------------------------ 91-92
- 8.02 INFOFIXED --------------------------------------- 92
- 8.03 RSTRINFO ---------------------------------------- 92
- Examples: Info-line routines ---------------- 93-95
-
- Misc Routines ---------------------------------------- 96-97
- 7.00 DOSOUND ---------------------------------------- 96
- 7.01 DISPLAYROWS% ----------------------------------- 96
- 7.02 PEEKASM& --------------------------------------- 96
- 7.03 GETCUR& ---------------------------------------- 96
- 7.04 SETCUR& ---------------------------------------- 97
- 7.05 CUROFF ----------------------------------------- 97
-
- Program format -------------------------------------- 98-101
-
- Event Trapping ----------------------------------------- 102
-
- Description of files ------------------------------- 103-105
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Errors --------------------------------------------- 106-110
-
- Appendix ------------------------------------------- 111-114
- Color attribute chart ------------------------------- 111
- Multi-field code chart ------------------------------ 112
- Border designation chart ---------------------------- 113
- GETAKEY code values --------------------------------- 114
-
- Restrictions and disclaimer ---------------------------- 115
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ***************************
- * NOTE ------ READ THIS! *
- ***************************
-
- The information in this documentation refers to the
- enhanced version of WINDOWS R-E-Z. Differences between the
- QuickBasic 4.50, BASIC 7.1 (PDS) and Visual Basic for DOS
- (VBDOS) versions are detailed. The documentation can be used
- for the unenhanced versions with the following exceptions.
-
-
- 1. MEMORY - Additional libraries are included in the
- enhanced versions which do not contain error checking or
- window status capability. These libraries can be used after
- the program is de-bugged and represent an opportunity for
- considerable memory reduction.
-
- - Additional libraries are included in the
- enhanced versions which can be used for programs not requiring
- event handling. The libraries in the unenhanced versions allow
- event handling. Extra libraries for programs not requiring
- event handling are not included in the unenhanced versions.
- Modules compiled from the QB/QBX/VBDOS environment will use the
- event handing switches ( /W or /V ) in the unenhanced versions
- even if event handling is not used. This produces larger and
- slower programs.
-
-
- 2. The BASIC 7.1 and VBDOS unenhanced versions do not
- allow the use of unnamed ( blank ) COMMON blocks. The
- enhanced version has provisions for the use of same.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- **********************************************************
- ** For information on obtaining the enhanced version **
- ** of WINDOWS R-E-Z see the file ORDER.ME. **
- **********************************************************
-
-
-
-
-
- 1
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Important notes for BASIC 7.1 and VBDOS 1.00 users.
-
-
- ENHANCED AND UNENHANCED VERSIONS:
-
- The /Ea option may be used when loading QBX or VBDOS.
- This allows the use of expanded memory.
-
- Window memory resides in a separate segment of string space
- reserved for strings placed in unnamed ( blank ) COMMON
- blocks. DO NOT USE BLANK COMMON BLOCKS IN YOUR PROGRAM.
-
- EXAMPLE: COMMON SHARED A$ ' NOT PERMITTED
- COMMON SHARED /BLOCKNAME/ A$ ' PERMITTED
-
-
- Maximum window memory is 64k bytes. Calls to MAKEWIND or
- SAVEWIND requesting window memory in excess of 64k bytes
- will result in an "Out of string space" error message. As
- 64k represents sixteen full display windows (80 x 25 mode)
- this limitation should not be restrictive.
-
-
- The use of far strings is required. This is the default for
- programs compiled from the QBX environment If the source
- code is compiled on the command line the /Fs option must be
- used with BC. Unlike BASIC 7.1, VBDOS always uses far
- strings.
-
-
- ENHANCED VERSION ONLY:
-
- Additional object files PDSALT.OBJ or VBALT.OBJ are included
- which allow the use of unnamed (blank) COMMON blocks. They
- must replace the object file PDSVBMEM.OBJ, which is included
- in the BASIC 7.1 and VB for DOS libraries. Window memory will
- share main module string space after this change is made. To
- make this change;
-
- 1. Make new library files. ( Back-up old library files first! )
-
- LIB PDSALL.LIB-PDSVBMEM.OBJ+PDSALT.OBJ; ( BASIC 7.1 )
- LIB PDSNER.LIB-PDSVBMEM.OBJ+PDSALT.OBJ; ( BASIC 7.1 )
- LIB PDSTRAP.LIB-PDSVBMEM.OBJ+PDSALT.OBJ; ( BASIC 7.1 )
- LIB PDSNETRP.LIB-PDSVBMEM.OBJ+PDSALT.OBJ; ( BASIC 7.1 )
-
-
- LIB VBALL.LIB-PDSVBMEM.OBJ+VBALT.OBJ; ( VBDOS )
- LIB VBNER.LIB-PDSVBMEM.OBJ+VBALT.OBJ; ( VBDOS )
- LIB VBTRAP.LIB-PDSVBMEM.OBJ+VBALT.OBJ; ( VBDOS )
- LIB VBNETRP.LIB-PDSVBMEM.OBJ+VBALT.OBJ; ( VBDOS )
-
-
-
-
- 2
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 2. Make new quick-libraries. ( Back-up old quick-libraries! )
-
- LINK/Q PDSALL.LIB,PDSALL.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
- LINK/Q PDSNER.LIB,PDSNER.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
- LINK/Q PDSTRAP.LIB,PDSTRAP.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
- LINK/Q PDSNETRP.LIB,PDSNETRP.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
-
- LINK/Q VBALL.LIB,VBALL.QLB,,VBDOSQLB.LIB; ( VBDOS )
- LINK/Q VBNER.LIB,VBNER,,VBDOSQLB.LIB; ( VBDOS )
- LINK/Q VBTRAP.LIB,VBTRAP.QLB,,VBDOSQLB.LIB; ( VBDOS )
- LINK/Q VBNETRP.LIB,VBNETRP,,VBDOSQLB.LIB; ( VBDOS )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- *** GENERAL OVERVIEW ***
-
- WINDOWS R-E-Z is a collection of QuickBASIC and assembly
- routines which provide users of QuickBASIC 4.50, BASIC 7.1
- ( PDS ), and Visual BASIC for DOS with a complete window
- management system. With WINDOWS R-E-Z users can make, save,
- restore, and delete up to twenty windows. The memory used to
- save windowed areas is dynamically allocated and outside of
- basic's normal data storage area leaving more room for the
- basic programs data. Windows are assigned a number from zero
- to twenty.
-
- INPUT WINDOWS, MULTI-FIELD INPUT SCREENS, CHOICE WINDOWS,
- CHOICE BARS and GET ANSWER WINDOWS all provide an excellent
- source for user input. Input fields may be alpha/numeric,
- numeric, date or restricted. Multi-field input fields may be
- use to emulate "buttons". Additional numerous options are
- included for input fields.
-
- WINDOWS R-E-Z provides users the ability to incorporate
- "PULLDOWN WINDOWS", emulating those used in the QuickBASIC
- programming environment, in their programs.
-
- Directory routines find the default drive and path, disk
- size and free space, and directory listing for any path.
- File size, date, time, and attributes can also be found.
-
- Information line routines provide an easy means to print
- messages, directions, or prompts, anyplace on the display.
-
- SCROLL WINDOWS may be used to scroll through small lists
- or large databases.
-
- Also includes are numerous KEYBOARD and MOUSE routines.
-
- All of the routines require a minimal amount of initial-
- ization and the resulting programs present a professional
- appearance.
-
- Unlike many other basic "add-ons", WINDOWS R-E-Z
- provides extensive error detection and reporting.
-
- Procedures included:
-
- SETWIND -------- Set up routine for windowing procedures.
-
- MAKEWIND ------- Makes a window. Saves windowed area to
- window memory. The window becomes the
- "active window".
-
- SAVEWIND ------- Saves a screen area to window memory.
-
-
-
-
- 4
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- RESAVE --------- Saves the active window.
-
- RSTRWIND ------- Restores a window area to the display.
-
- DELWIND -------- Deletes a window area from window memory.
-
- CHNGWIND ------- Changes the active window to another
- window.
-
- NEWCOLOR ------- Changes the print-to color of the active
- window for text printed by PRINTW.
- The print-to color is used by CLRWIND to
- clear the active window's interior.
-
- CLRWIND -------- Clears the interior of the active window.
-
- PRINTW --------- Prints text in the active window using
- the window's "print-to" color.
-
- PRINTWHOT ------ Prints text in the active window. One
- character is printed in a different color.
-
- LINEW ---------- Prints a line in the active window using
- the window's "print-to" color.
-
- BOXW ----------- Prints a box in the active window using
- the window's "print-to" color.
-
- WAVAIL% -------- (FUNCTION) Reports a window's availability.
-
- WINDSTATUS ----- Reports window memory status.
-
- B4SCRL --------- Sets exit keys, "marked entry string"
- scroll bar status, tag character color,
- and refresh status for a subsequent call
- to SCRLWIND.
-
-
- SCRLWIND ------- Places a scrollable list in the active
- window.
-
- MARKED% -------- (FUNCTION) Returns position of marked
- items after a call to SCRLWIND.
-
- SETPULL -------- Set up routine for pulldown windows.
-
- PULLDOWN ------- Makes pulldown windows. On exit the
- displayed pulldown window is the active
- pulldown window.
-
-
-
-
-
-
- 5
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- RSTRPULL ------- Restores the area under the active
- pulldown window and menubar. Deactivates
- the active pulldown window.
-
- CHNGPULL ------- Changes the color of, and disables or
- enables an item in a pulldown window.
-
- INPTINIT ------- Initializes input memory. Sets date format,
- decimal designator, and "exit keys".
-
- INPTWIND ------- Makes an input field with an optional
- window. The field can be edited by
- the user. On exit the displayed input
- line or window is the active input window.
-
-
- RSTRINPT ------- Restores the area under the active input
- window to the display. Deactivates the
- active input window.
-
- SETINPT -------- Set up routine for multi-field input
- screens.
-
- MAKEFIELD ------ Makes an input field or button for routine
- MULTINPT
-
- MULTINPT ------- Places input fields on the screen as
- defined by a previous calls to SETINPT and
- MAKEFIELD.
-
- UPDATEFIELD ---- Updates a field in a multi-field input screen.
-
- CHOICEWIND% --- Makes a text window with one to ten user
- choices. Returns the selected choice.
-
- CHOICEBAR% --- Presents the user with 1 to 10 choices.
- Returns the selected choice.
-
- GETANS --------- Makes a get answer window or single line
- prompt. Waits for a single key response.
-
- INFOLINE ------- Sets coordinates and color for the info-line.
- Also turns on the info-line. Saves the area
- of the display reserved by the info-line. The
- info-line displays a prompt or message.
-
- PRINTINFO ------ Prints a prompt or message in the info-line.
-
-
-
-
-
-
-
-
- 6
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- INFOFIXED ------ Defines a fixed string for the info-line. The
- string is printed every time PRINTINFO is
- called. The string specified in PRINTINFO is
- added to the string defined in this routine.
- Useful for scroll and pulldown windows.
-
- RSTRINFO ------- Restores the display area under, and option-
- ally turns off the info-line.
- DOSOUND -------- Produces sound determined by SETWIND.
-
- GETDISK -------- Returns the default disk drive.
-
- SETDISK -------- Sets the default disk drive.
-
- FINDPATH ------- Returns the default path for any drive
- ( current directory ).
- DISKSIZE ------- Returns disk size and free space.
-
- FINDDIR -------- Returns the directory of any drive or path
- in a string array.
-
- GETAKEY% ------- Returns a code for a key pressed or
- zero if no key is pressed.
-
- MOUSEON% -------- Turns the mouse on or off.
-
- MOUSESHOW ------ Displays the mouse cursor.
-
- MOUSEHIDE ------ Hides the mouse cursor.
-
- MOUSEROW% ------ Returns the row position of the mouse
- cursor.
-
- MOUSECOL% ------ Returns the column position of the mouse
- cursor.
-
- MOUSEPOS ------- Positions the mouse cursor at any screen
- location.
-
- MOUSELIMIT ----- Limits mouse movement to a defined area
- of the display.
-
- LBUTTON% ------- Returns the left mouse button status.
-
- RBUTTON% ------- Returns the right mouse button status.
-
- MOUSEINWIND% --- Returns a value signifying if the mouse
- cursor is in a specified window.
-
- MOUSEINMULT% --- Returns the field number the mouse cursor
- occupies for a specified multi-field
- input screen.
-
-
-
- 7
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- DISPLAYROW% ---- Returns the number of display rows for
- the active screen.
-
- PEEKASM& ------- Returns a 1,2,3 or 4 byte value for a
- specified memory location.
-
-
- GETCUR& --------- Returns the cursor position and size in a
- long integer.
-
- SETCUR --------- Restores the cursor position and size.
-
- CUROFF ---------- Turns the system cursor off.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 8
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- --------------------------------------------------------
-
- *** SYSTEM AND PROGRAMMING REQUIREMENTS ***
-
- COMPUTER:
- IBM PC (XT or AT) or compatible computer. One disk drive.
-
- VIDEO ADAPTOR CARD:
- MONO, CGA, EGA or VGA emulating CGA.
-
- PROGRAMMING LANGUAGE:
- For the QuickBASIC. version;
-
- QuickBASIC version 4.5.
- - Text mode -- 80 by 25, 80 by 43, or 80 by 50
-
- For the BASIC 7.1 (PDS) version;
-
- BASIC 7.1.
- - Text mode -- 80 by 25, 80 by 43, or 80 by 50
-
- - Requires use of "far strings". This is the default
- if executable programs are produced from within
- QBX. If modules are compiled using BC on the command
- line ( outside of the QBX environment ) the /Fs option
- must be used.
-
- For the VISUAL BASIC FOR DOS version;
-
- Visual BASIC 1.00
- - Text mode -- 80 by 25, 80 by 43, or 80 by 50
-
- DOS: Version 2.1 or higher.
-
- -------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 9
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- GETTING STARTED
-
-
- Before using the routines included in WINDOW R-E-Z, it is
- necessary to set several global values. The following routines
- set these values. These routines must be called at the start
- of any program.
-
-
- ROUTINE USED TO...
-
- SETWIND 1. Set the default sound for all routines
- 2. Set the shadow color for all windows.
- 3. Set "slow print" for CGA adaptors.
- 4. Determine how certain hi-intensity
- characters are displayed.
- 3. Set the color of button brackets ( < > ).
-
- SETWIND MUST BE CALLED BEFORE USING ANY OF
- THE ROUTINES INCLUDED WITH WINDOW R-E-Z.
-
-
- INPTINIT 1. Set the date format for input routines.
- 2. Set the comma designator for input
- routines.
- 3. Set the cursor "start position" for input
- routines.
- 4. Determine if the first valid key pressed
- erases an input field.
- 5. Determine if an invalid key produces a
- sound while entering data in an input
- field.
-
- INPTINIT MUST BE CALL PRIOR TO CALLING
- ROUTINES MULTINPT, INPTWIND, OR SCRLWIND,
- CHOICEWIND, OR CHOICEBAR.
-
-
- MOUSEON 1. Initializes the mouse and optionally
- turns the mouse "ON".
-
- MOUSEON MUST BE CALLED TO USE THE MOUSE
-
-
- SEE THE DETAILED DESCRIPTIONS FOR THE INDIVIDUAL ROUTINES.
-
-
-
-
-
-
-
-
-
-
- 10
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- USING WINDOWS R-E-Z
-
- THE ACTIVE WINDOW
-
- When a window is defined ( made ) the number assigned to it
- by the programmer represents the area covered by the window.
- The area is restored or deleted via it's "number". Up to 20
- window areas can be saved. The memory used to save the
- window areas is automatically managed by WINDOWS R-E-Z.
-
- Any time a window is made it becomes the "active" window. The
- active window is used by the following routines.
-
- PRINTW --- Prints text in the active window.
- LINEW ---- Prints a line in the active window.
- BOXW ----- Prints a box in the active window.
- SCRLWIND - Places a scrollable list in the active
- window.
- CLRWIND -- Clears all text from the interior of the
- active window.
- RESAVE -- Saves the active window and any text in the
- active window.
- NEWCOLOR - Changes the "print-to" color of the active
- window.
-
- NOTE: ACTIVE INPUT AND PULLDOWN WINDOWS MAY ALSO EXIST. THESE
- WINDOWS ARE NOT RELATED TO THE ACTIVE WINDOW GENERATED BY THE
- WINDOWING ROUTINES.
-
-
- 1.00 SETWIND ( FST%, SND%, SHAD%, NOHI%, BRACKETATTR% )
-
- Description: SETWIND must be called at least once in
- any program using the routines in WINDOWS-R-E-Z, prior
- to calling the routines. This procedure initializes
- window memory. It also sets the default windowing
- speed, sound, window shadow color, and "button" bracket
- color.
-
- The first call to SETWIND initializes window memory and
- sets the default parameters. Subsequent calls to
- SETWIND will not affect window memory but can be used
- to change the default parameters.
-
- NOTE: IF A CLEAR STATEMENT IS EXECUTED BY THE PROGRAM
- ALL WINDOW MEMORY IS LOST. WINDOW AREAS SAVED IN WINDOW
- MEMORY ARE LOST. SETWIND MUST BE CALLED AGAIN TO RE-
- INITIALIZE WINDOW MEMORY AFTER EXECUTING A CLEAR STATEMENT.
-
- Arguments: FST% is used to allow "fast" windowing
- if a CGA video card, or emulation, is detected. If
- FST% = 0 window routines will be slower on computers
-
-
-
- 11
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- with CGA. If FST% = 1 window routines will be "fast" on
- computers with CGA. This may, however, cause "snow" with
- certain CGA cards. If a monochrome, EGA, or VGA card is
- detected, FST% is ignored. All windowing is "fast".
-
- SND% determines which sound will be
- generated by the routines. If SND% = 1 a "CLICK" sound
- will be generated. If SND% = 2 a "BEEP" sound will be
- produced. Any other value produces no sound.
-
- SHAD% sets the color for window shad-
- ows. See the color attribute chart for details. Set-
- ting SHAD% to 7 works well for monochrome displays while
- setting SHAD% to 8 works well for color displays.
-
- NOHI% determines how pulldown and scroll
- window routines display "key" characters. It also
- determines how the button brackets ( < > ) for the active
- choice for routines SCRLWIND, INPTWIND, CHOICEBAR, and
- CHOICEWIND are displayed. In addition, if a field defined
- in routine MAKEFIELD is use to make a "button field" the
- color of characters used as brackets ( when the field is
- active via routine MULTINPT ) is affected by the value of
- NOHI% If NOHI% = 0 key characters or brackets are
- displayed in their specified color. If NOHI% = 1 "key"
- characters and brackets are displayed in reverse video.
- This is appropriate for LCD displays which can not display
- high intensity characters. NOHI% affects "key" characters
- and "active brackets" ONLY if they have been defined to
- have a different color then normal characters and inactive
- brackets.
-
- BRACKETATTR% determines the foreground
- color of button brackets ( < > ) for active choices or
- fields in routines SCRLWIND, INPTWIND, CHOICEWIND,
- CHOICEBAR, and MULTINPT. It only affects the brackets for
- the active choice. BRACKETATTR% may be set from 0 to 15.
- For most applications BRACKETATTR% can be set to 15 with
- good results. If BRACKETATTR% is set to zero the bracket
- color for the active choice does not change. The brackets
- retain their in-active color.
-
-
- 1.01 MAKEWIND (W%, LABEL$, TR%, LC%, WIDE%, NR%, ATTR%, BORBER%)
-
- Description: Makes a window. May also save a window-
- ed area to window memory. The window becomes the active
- window. Calls to PRINTW, LINEW, SCRLWIND, CLRWIND, BOXW,
- RESAVE, and NEWCOLOR refer to the active window. If an
- attempt is made to place a window on the display and it
- will not fit on the display an error will be reported. The
-
-
-
-
- 12
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- maximum size of a window is dependent on the screen mode
- when a window is made.
-
- NOTE: TEXT MODES 80x25, 80x43 AND 80x50 ARE SUPPORTED.
-
-
- Arguments: W% is the window number and must equal 0 to
- 20. If W% = 0 the area under the window is not saved.
- A window is simply made. If W% is from 1 to 20 the area
- under the window is saved and may be restored at a later
- time via a call to RSTRWIND. If W% is the number of a
- window area previously saved by MAKEWIND or SAVEWIND an
- error is reported.
-
- NOTE: WHEN WINDOW NUMBER 1 TO 20 IS MADE AN IMAGE OF THE
- DISPLAY AREA UNDER THE WINDOW IS SAVED IN WINDOW MEMORY.
- THIS AREA MAY BE RESTORED TO THE DISPLAY BY CALLING
- ROUTINE RSTRWIND. ROUTINE RSTRWIND MAY OPTIONALLY REMOVE
- THE "SAVED" DISPLAY AREA FROM WINDOW MEMORY.
- A SECOND ROUTINE, DELWIND, MAY BE USED TO REMOVE
- THE "SAVED" DISPLAY AREA FROM WINDOW MEMORY. THIS
- ROUTINE DOES NOT, HOWEVER, RESTORE THE "SAVED" DISPLAY
- AREA TO THE SCREEN. DO NOT CONFUSE THESE ROUTINES!!
- SEE THE DESCRIPTIONS FOR ROUTINES RSTRWIND AND DELWIND
- FOR DETAILS.
-
- LABEL$ is the text printed on the top
- border or in the title box (see BORDER%) of the window.
- By default the print starts on the second column. If
- the first character of LABEL$ ="@" the text will be
- centered. If LABEL$ is too long it will be truncated to
- fit on the top border or in the title box.
-
- TR% is the top row of the window. If TR% =
- 100 the window will be centered from top to bottom.
-
- LC% is the left column position of the win-
- dow. If LC% = 100 the window will be centered from left
- to right.
-
- WIDE% is the window's width. WIDE% must be
- greater than 2. WIDE% + LC% -1 must not be greater than
- 80. ( The displays width ).
-
- NR% is the number of rows in the window and
- must be greater than 2. NR% + TR% must not be greater
- than the display rows + 1 . If NR% is less than 5 a window
- title box is not permitted.
-
- ATTR% is the window's color and may be in
- the range of 0 to 255. The foreground ( window's label
- and border ) color equals ATTR% MOD 16. The background
-
-
-
- 13
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- color equals INT( ATTR% / 16 ). If the background color
- is greater than 7 the foreground flashes and the back-
- ground color equals background color - 8. If the fore-
- ground and background colors are the same the border and
- label will not be visible. ( SEE THE COLOR ATTRIBUTE
- CHART.) ATTR% becomes the print-to color for window W%.
-
- BORDER% sets the window's border and shadow
- and can be up to 3 digits in length.
-
- DIGIT = #3 #2 #1
- Example = 1 1 1 ( 111 )
-
- Digit #1 sets the border.
-
- 0 = No border
- 1 = Single line border
- 2 = Double line border
-
- Digit #2 sets the shadow.
-
- 0 = No shadow
- 1 = Right/Bottom shadow
- 2 = Left/Bottom shadow
- 3 = Left/Top shadow
- 4 = Right/top Shadow
-
- Digit #3 set the title box.
-
- 0 = No title box
- 1 = title box
-
- The example (111) has a 1 for each digit. The window
- will have a single lined border, a shadow on the right
- and bottom and a title box
-
- NOTE: IF BORDER% IS 100 OR GREATER AND THE NUMBER OF
- ROWS (NR%) IS LESS THAN 5 TITLE BOXES ARE NOT PERMITTED.
- SEE THE BORDER DESIGNATION CHART IN THE APPENDIX FOR
- FURTHER DETAILS.
-
- 1.02 CHNGWIND (W%)
-
- Description: Makes window, W%, the active window.
- W% must represent a window area in window memory.
-
- Argument: W% is the window number. It must range from
- 0 to 20. If W% does not represent a window saved by a
- previous call to MAKEWIND, CHNGWIND reports an error.
-
- NOTE: W% CAN NOT REPRESENT A WINDOW SAVED BY "SAVEWIND".
- IT MUST REPRESENT A WINDOW SAVED BY "MAKEWIND".
-
-
-
- 14
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 1.03 PRINTW (TEXT$, R%, LC%)
-
- Description: Prints text to the active window. Care
- must be used to assure the active window is visible
- as PRINTW will print predicated on the coordinates of
- the active window regardless of it's visibility. It is
- advisable, therefore, to print to a window immediately
- after it is made the active window. The text's color
- will be the print-to color of the active window. If
- no window is active when PRINTW is called an error will
- be reported.
-
- Arguments: TEXT$ is the text to be printed.
-
- R% is the row in the window were the text
- will print . If R%=1 the text will print in the first
- row below the border or title box. PRINTW may be used to
- print a label in the bottom border of the window by
- setting R% to the number or rows in the active window
- minus 1 ( minus 3 if a title box was specified ). An
- invalid value for R% will result in a reported error.
-
- LC% is the left column where TEXT$ starts
- printing. If LC%=100 the text will be centered left to
- right. IF LC% plus the length of TEXT$ is greater than
- the windows width minus 2 an error will be reported.
-
-
- 1.04 PRINTWHOT ( TEXT$, R%, LC%, HOTCHARPOS%, HOTATTR% )
-
- Description: Prints text to the active window. Prints
- one character ( the "hot character" ) in a different
- color. Care must be used to assure the active window is
- visible as PRINTWHOT will print predicated on the
- coordinates of the active window regardless of it's
- visibility. It is advisable therefore, to print to a
- window immediately after it is made the active window.
- The text's color ( excluding the "hot character" ) will be
- the print-to color of the active window. If no window is
- active when PRINTWHOT is called an error will be reported.
-
- Arguments: TEXT$ is the text to be printed. R% is the
- row in the window were the text will print . If R%=1 the
- text will print in the first row below the border or title
- box. PRINTW may be used to print a label in the bottom
- border of the window by setting R% to the number or rows
- in the active window minus 1 ( minus 3 if a title box was
- specified ). An invalid value for R% will result in a
- reported error.
-
- LC% is the left column where TEXT$ starts
- printing. If LC%=100 the text will be centered left to
-
-
-
- 15
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- right. IF LC% plus the length of TEXT$ is greater than
- the windows width minus 2 an error will be reported.
-
- HOTCHARPOS% is the position in TEXT$ of the
- "hot character".
-
- HOTATTR% is the color or the "hot
- character". ( SEE THE COLOR ATTRIBUTE CHART IN THE
- APPENDIX. )
-
-
- 1.05 SAVEWIND (W%, TR%, LC%, WIDE%, NR%)
-
- Description: Saves a portion of the screen in window
- memory. This procedure is the same as MAKEWIND except
- no window is made. The area designated by the arguments
- is saved. If the number assigned to W% represents a
- window area previously saved by MAKEWIND or SAVEWIND an
- error is reported. An area saved via SAVEWIND can be
- "popped" to the screen at appropriate times during
- program execution by RSTRWIND ( see description ). A
- screen area saved by SAVEWIND DOES NOT BECOME THE
- ACTIVE WINDOW. SAVEWIND differs from RESAVE in that it
- saves an area of the screen specified by it's
- arguments. RESAVE saves the area of the screen as
- designated by the coordinates of the active window.
-
-
- Arguments: W% must range from 1 to 20.
-
- See MAKEWIND for a description of the
- remaining arguments.
-
-
-
- 1.06 RESAVE
-
- Description: Saves the active window, it's interior,
- and shadow. As window number 0 can not be saved the
- active window can not be window number 0. If there is
- no active window or window number 0 is active when
- RESAVE is called an error will be reported.
-
- The screen area saved under the active window is removed
- from window memory and replaced with the active window
- and it's interior. After complex screens are made in
- the active window's interior, RESAVE can be used to save
- them. They can be restored to the screen using
- RSTRWIND. Use RESAVE immediately after a window is made
- and it's interior is filled as RESAVE will save the
- area of the screen determined by the active window's
- coordinates, even if it is not visible.
-
-
-
- 16
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Use RESAVE as follows;
-
- 1. Make a window number 1 to 20 via a call to MAKEWIND.
- This becomes the active window.
-
- 2. Print in the window using PRINTW, LINEW, or BOXW.
-
- 3. Call CHNGWIND to make the window number used in step
- 1 the active window. ( Only required if additional
- windows were made inside the original window. )
-
- 4. Call RESAVE to save active window.
-
- 5. Use RSTRWIND to "pop" the window and it's interior on
- the screen any time during program execution.
-
- 6. After the window is restored to the screen it may be
- printed in again provided it is the active window.
- This may require a call to CHNGWIND.
-
- Arguments: None.
-
-
- 1.07 RSTRWIND (W%, DELFLAG%)
-
- Description: Restores a window are previously saved
- by MAKEWIND, SAVEWIND or RESAVE. The window area (W%)
- must exist in window memory or RSTRWIND does nothing.
-
- NOTE: WHEN A WINDOW IS RESTORED IT IS THE PROGRAMMER'S
- RESPONSIBILITY TO ASSURE THE SCREEN MODE IS THE SAME AS
- IT WAS WHEN IT WAS MADE. IF A WINDOW IS MADE IN THE 43
- ROW SCREEN MODE IT MUST BE RESTORED IN SAME.
-
- Arguments: W% is the number ( 1 to 20 ) assigned to
- the saved window area to be restored to the screen. The
- window area is returned to it's original coordinates.
-
- DELFLAG% is set to zero to keep the
- windowed area in window memory. If the DELFLAG% is not
- zero the saved window area (W%) is deleted from window
- memory. If W% was the active window an active window
- will no longer exist.
-
-
- 1.08 DELWIND (W%)
-
- Description: Deletes a saved window area (W%) from
- window memory, if it exists in window memory. If the
- window is the active window an active window will no
- longer exist.
-
-
-
-
- 17
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- NOTE: DELWIND DOES NOT RESTORE THE "SAVED" WINDOW AREA
- TO THE DISPLAY. IT ONLY REMOVES THE "SAVED" WINDOW AREA
- FROM WINDOW MEMORY. ROUTINE RSTRWIND MUST BE USED TO
- RESTORE THE "SAVED" WINDOW AREA TO THE DISPLAY.
-
- Argument: W% is the window area number.
-
-
- 1.09 CLRWIND
-
- Description: Clears the interior of the active window.
- Care must be taken to assure that active window is
- visible as CLRWIND clears the area of the screen
- designated as the interior of the active window regard-
- less of the window's visibility. The window will be
- cleared with it's print-to color. If no window is
- active when CLRWIND is called, an error is reported.
-
- Arguments: None
-
-
- 1.10 NEWCOLOR ( ATTR% )
-
- Description: Changes the print-to color of the active
- window. Text printed in the window by PRINTW, lines
- printed in the window by LINEW, and boxes printed by BOXW
- will assume the new color specified by this routine. If
- the active window is cleared via a call to CLRWIND, it's
- interior will be cleared with the color specified by
- NEWCOLOR. The color designation will be retained and used
- by subsequent calls to PRINTW or LINEW for the window
- which was active when NEWCOLOR was called. If no window is
- active when NEWCOLOR is called, an error is reported.
-
- Argument: ATTR% is the new color attribute. SEE
- THE COLOR ATTRIBUTE CHART IN THE APPENDIX.
-
- 1.11 LINEW ( ROW%, TYP% )
-
- Description: Prints, or erases a line in the active
- window. If an active window does not exist an error is
- reported. The line will assume the print-to color of the
- active window. As the border characters are changed
- when a line is printed, the color of the border
- characters may change also. This will occur if the
- print-to color is not the same as the color of the
- border characters in the active window.
-
- Arguments: ROW% is the row, of the interior, of the
- active window where a line will print. If ROW% < 1 or
- ROW% greater then the number of rows in the interior of
- the active window an error will be reported.
-
-
-
- 18
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- TYP% is the type of line which will print
- and may be as follows;
-
- TYP% Line type
-
- 1 Single line
- 2 Double line
- 0 Erases a line and returns
- normal border characters.
- Other values Defaults to single line.
-
-
- NOTE: IF TYP% = 0 ANY TEXT ON LINE ( ROW% ) IN THE WINDOW
- WILL BE ERASED.
-
-
- 1.12 BOXW ( TR%, LC%, WD%, NR%, BORDER% )
-
- Description: Draws a box in the active window. The box is
- drawn in the "print-to" color. If an attempt is make to
- make a box that will not fit entirely within the active
- window an error will be reported. An active window must
- exist or an error will be reported.
-
- Arguments: TR% is the top row of the box relative to the
- active window's top interior row.
-
- LC% is the left column position of the box
- relative to the active window's left border.
-
- WD% specifies the boxes width.
- NR% specifies the number of rows for the box.
-
- BORDER% sets the boxes border and may be set
- as follows.
-
- BORDER% Border
-
- 0 no border - may be used to erase an
- existing box.
- 1 single line border.
- 2 double line border.
-
- Other values default to BORDER% = 1.
-
-
-
-
-
-
-
-
-
-
-
- 19
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 1.13 WAVAIL% ( WINDNUM% )
-
- Description: WAVAIL% is a function. It determines if a
- window is available. A window is available if it has
- never been used or if it has been used and subsequently
- deleted by routines RSTRWIND or DELWIND. AS WAVAIL% IS A
- FUNCTION IT IS IMPERATIVE IT IS DECLARED IN ANY MODULE
- USING IT. WAVAIL% equals 1 if a window is available.
- WAVAIL% equals 0 if a window is not available.
-
- Argument: WINDNUM% is the window number. It may range
- from 1 to 25. Windows 1 to 20 are used in the window
- management system. Window 22 is used for the get answer
- window in routine GETANS. The following applies to
- windows 21, 23, 24, AND 25.
-
- WINDOW# WAVAIL% MEANING
- =
- 21 0 There is an active input window. It
- may be deleted by routine RSTRINPT. A
- call to INPTWIND re-enters the active
- input window.
- 21 1 There is no active input window.
- Calling INPTWIND will make a new active
- input window.
-
- 23 0 There is an active pulldown window. It
- may be deleted by routine RSTRPULL. A
- call to PULLDOWN re-enters the active
- pulldown window.
- 23 1 There is no active pulldown window.
- Calling PULLDOWN will place the user at
- the first selection of the pulldown
- menubar.
-
- 24 0 There is an active pulldown menubar. It
- may be deleted by routine RSTRPULL. A
- call to pulldown will not save the
- display area occupied by the menubar.
-
- 24 1 There is no active pulldown menubar.
- Calling PULLDOWN will make an active
- menubar and save the display area
- occupied by same.
-
- 25 0 There is an active info-line. It may
- be deleted by routine RSTRINFO. Calls
- to PRINTINFO will print in the info-
- line.
- 25 1 There is no active info-line. Calling
- INFOLINE will make an active info-line
-
-
-
-
- 20
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 1.14 WINDSTATUS
-
- Description: This is a programming tool. Calling
- WINDSTATUS reports window 0 to 20's. number, top row,
- left column, width, number of rows, and attribute (color).
- The attribute refers to the original attribute specified
- by the call to MAKEWIND for each window. If the
- attribute is "SAVED" the window area was saved by a call
- to SAVEWIND, not MAKEWIND. WINDSTATUS also reports the
- active window and total window memory used to save
- window areas. Window number zero does not use window
- memory as the area under it is not saved. To use
- WINDSTATUS place a call to WINDSTATUS in the program at
- the location where it is desirable to view each windows
- parameters. The program will terminate and must be
- restarted. First remove the call to WINDSTATUS.
-
- NOTE: IF A WINDOW HAS A SHADOW IT'S WIDTH IS INCREASED
- BY TWO AND IT'S LENGTH IS INCREASED BY ONE.
-
- Arguments: None.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 21
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ***** PULLDOWN WINDOWS *****
-
- These procedures generate a maximum of 10 pulldown windows.
- The area covered by the pulldown windows is saved and restored as
- the window moves from one menubar item to the next. To select a
- menubar item the ARROW keys can be used or the first letter of
- the menubar item may be pressed. To select an item from any of
- the pulldown windows the ARROW keys, or "KEY CHARACTER" for the
- item may be pressed. If the ARROW keys are used the ENTER or
- RETURN key must be pressed to finalize the selection. If a
- letter is pressed, and it is found, the procedure is
- automatically exited without the need to press the ENTER or
- RETURN keys. The ESC and FUNCTION keys may optionally exit.
-
-
-
-
- 2.00 SETPULL ( TR%, LC% , WD%, PWIND$() )
-
- Description: Must be called to set up the routine
- PULLDOWN. Must be called prior to calling routines
- PULLDOWN or CHNGPULL.
-
- Arguments: TR% is the top row position of the menubar.
- If the top row position of the menubar is set too low not
- allowing a pulldown window to fit on the display an error
- will be reported ( WINDOW WON'T FIT or SHADOW WON'T FIT )
- when the pulldown window is accessed.
-
- LC% is the left column position of the
- menubar. It must range from 1 to 73. If the left column
- position of the menubar is set too high not allowing a
- pulldown window to fit on the display an error will be
- reported ( WINDOW WON'T FIT or SHADOW WON'T FIT ) when
- the pulldown window is accessed.
-
- WD% is the width of the menubar. WD% is
- self adjusting if it is set outside of the permissible
- range. The maximum width of the menubar is 81 - LC%.
- The minimum width of the menubar equals the width of the
- individuals items in the menubar plus two spaces between
- each item plus two preceding spaces and one trailing
- space. If WD% is set too low it self adjusts to the
- minimum width. If it is set too high it self adjusts to
- the maximum width. WD% only changes the length, by
- adding trailing spaces to the menubar, if it is greater
- then the minimum width and less then or equal to the
- maximum width of the menubar.
-
- PWIND$() is an array containing strings
- representing menubar selections, the data for the info-
- line for the menubar selections, and the individual
-
-
-
- 22
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- pulldown window selections. PWIND$() must be in the
- correct format. The last selection in each pulldown
- window must be followed by a "***" in PWIND$().
- "ENDPULL" in PWIND$() marks the end of all pulldown
- windows. PWIND$(1) must be the first string in the
- array, NOT PWIND$(0). The following represents an
- example of the required format for PWIND$() for a
- pulldown window ( the first pulldown window ).
-
- EXAMPLE:
-
- PWIND$(1) = "File" ' Menubar selection for
- ( SEE BELOW ) ' pulldown window one.
-
- PWIND$(2) = "File operations" ' This will print in
- NOTE: MUST = "" IF INFO-LINE ' the info-line for
- IS NOT USED. ' menubar selection 1
- PWIND$(3) = "Save" ' Selections for the
- PWIND$(4) = "Get" ' pulldown window.
- PWIND$(5) = "Delete"
-
- PWIND$(6) = "***" ' End of pulldown
- ' window.
-
- PWIND(7) = ........ ' Start over for next
- ' pulldown window.
-
- PWIND(?? - 1) = "***" ' End of last pulldown
- ' window.
-
- PWIND(??) = "ENDPULL" ' End of all pulldown
- data.
-
- In the above example PWIND$(1) holds the menubar selection
- for the first pulldown window. The menubar defaults to
- two spaces between selections. If PWIND$(1) = "File " two
- additions spaces will be inserted between "File" and the
- next menubar selection. Only trailing spaces are
- considered. Leading spaces are removed. PWIND$(2) holds
- the data for the info-line ( SEE ROUTINE INFOLINE ) for
- the first menubar selection, "File". For every menubar
- selection in PWIND$() the following element of PWIND$()
- MUST contain info-line data. If an info-line is not used
- set the appropriate elements of PWIND$ to equal "".
- Pulldown window selections follow the info-line data in
- PWIND$(). Each element of PWIND$() which represents a
- pulldown window selection has a "KEY CHARACTER". The key
- character is the character which is searched for when a
- key is pressed while in the PULLDOWN window environment.
- The key character defaults to the first character in each
- item. To designate the key character as a different
- character follow the character with a "@". THIS IS ONLY
-
-
-
- 23
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- APPLICABLE TO THE PULLDOWN WINDOW SELECTIONS. THE
- PULLDOWN MENUBAR SELECTIONS ALWAYS DEFAULT TO THE FIRST
- CHARACTER. IF A "@" IS PLACED IN A MENUBAR STRING IT WILL
- PRINT AS PART OF THE MENUBAR.
-
- EXAMPLES:
- PWIND$(3) = "Get File" ( Key character = "G")
- PWIND$(4) = "Save F@ile" ( Key character = "F")
-
- The "@" will not be displayed when the string is printed
- in the pulldown window. The description for KEYATTR%
- for the routine PULLDOWN describes how to make the key
- character a different color, or high intensity, enabling
- users to distinguish it as the key character.
-
- NOTE: DO NOT PLACE THE "@" IN POSITION ONE OR TWO OF THE
- STRING AS IT WILL PRINT IN THE PULLDOWN WINDOW. AS
- STATED THE KEY CHARACTER WILL DEFAULT TO POSITION ONE IF
- THE "@" IS OMITTED FROM THE STRING. THIS ELIMINATES THE
- NEED TO PLACE THE "@" IN POSITION TWO.
-
- If an element of PWIND$() = "-" and it is not the first
- or last item in a pulldown window it will segment the
- pulldown window by placing a line across the width of it.
- If the "-" is the first or last item in the pulldown
- window it will print as a "-".
-
- EXAMPLE: PWIND$(4) = "-" Providing PWIND$(4) is not
- last item in the pulldown window PWIND$(4) will
- print as a line across the window.
-
- --------------------------------------------------------
- EXAMPLE: SETPULL
-
- N%=30 ' USE THIS METHOD SO
- DIM PWIND$(N%) ' PWIND$() IS DYNAMIC.
- ' DON'T USE DIM PWIND$(30).
- TEMP%=0
- WHILE PWIND$(TEMP%) <> "ENDPULL"
- TEMP% = TEMP% + 1 ' TEMP% MUST START WITH 1.
- READ PWIND$(TEMP%) ' READ PULLDOWN WINDOW DATA.
- WEND
- TR%=1: LC%=1: WD%=80 ' MENUBAR'S LOCATION/WIDTH.
-
- CALL SETPULL ( TR%, LC%, WD%, PWIND$() ) 'SET PULLDOWN
- ERASE PWIND$ ' COMPLETELY ERASES PWIND$()
- ' IF IT IS DYNAMIC.
- DATA THIS :' MENUBAR SELECTION FOR PULL-
- :' DOWN WINDOW #1.
- DATA Sample window 1 :' INFO-LINE FOR MENUBAR
- :' SELECTION FOR WINDOW 1.
- DATA HELLO, JOE,*** :' WINDOW #1 SELECTIONS
-
-
-
- 24
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- DATA IS :' MENUBAR SELECTION - WINDOW 2.
- DATA Sample window 2 :' INFO-LINE FOR MENUBAR SELECTION.
- DATA HOW, ARE, -, YOU,*** :' WINDOW #2 SELECTIONS.
- :' LINE PRINTED IN ROW 3
-
- DATA A :' MENUBAR SELECTION - WINDOW 3.
- DATA Sample window 3 :' INFO-LINE FOR MENUBAR SELECTION.
- DATA I,AM@,FINE,*** :' WINDOW 3 SELECTIONS. "AM" HAS
- :' A KEY CHARACTER OF "M".
-
- DATA SAMPLE :' MENUBAR SELECTION - WINDOW 4.
- DATA Sample window 4 :' INFO-LINE FOR MENUBAR SELECTION.
- DATA BYE,*** :' WINDOW 4 SELECTION - ONE ITEM.
-
-
- DATA ENDPULL :' END OF DATA ( CASE SENSITIVE )
- --------------------------------------------------------
- Array PWIND$() is dimensioned to hold the pulldown menubar,
- info-line, and window data. This is only a temporary array
- to hold the data and is erased after SETPULL is called.
- The data is then read. The "***" signals the end of each
- pulldown window and MUST be entered exactly as shown. The
- "ENDPULL" signals the end for all pulldown windows and MUST
- be the last data item read. If the format is not exactly
- as shown an error will be reported or the windows will not
- be as expected. In the example shown the first menubar
- item is "THIS". It's associated pulldown window contains
- the two items "HELLO" and "JOE". When "THIS" is selected
- the info-line, if it is on, will display "Sample window 1".
- The last menubar item is "SAMPLE" and it's pulldown window
- contains one item "BYE". When "SAMPLE" is selected the
- info-line will display "Sample window 3". The menubar is
- located on line 1, column 1 ( TR%=1 and LC% = 1 ). It
- occupies the entire row as WD% = 80.
-
- NOTE: THE DATA MUST BE IN THE FORMAT SHOWN. THE CHAR-
- ACTERS "***" MARK THE END OF EACH INDIVIDUAL WINDOW AND
- THE WORD "ENDPULL" MARKS THE END OF ALL PULLDOWN WINDOWS.
-
-
- 2.01 PULLDOWN (INFO$(),BAR%,WIND%,EX$,RKEY%,ATTR%,KEYATTR%,BRDR%)
-
- NOTE 1: ROUTINE "SETPULL" MUST BE CALLED ONCE PRIOR TO
- CALLING THIS ROUTINE.
-
- NOTE 2: ROUTINE "RSTRPULL" MUST BE CALLED AFTER THIS
- ROUTINE IS EXITED TO DEACTIVATE THE ACTIVE PULLDOWN WINDOW
- AND RESTORE THE DISPLAY AREAS UNDER THE ACTIVE PULLDOWN
- WINDOW AND MENUBAR. IF "RSTRPULL" IS NOT CALLED THE
- ACTIVE PULLDOWN WINDOW AND MENUBAR REMAIN ACTIVE.
- ( *** SEE RSTRPULL *** )
- Description: Places the user in the pulldown window
-
-
-
- 25
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- environment. On entering PULLDOWN, the following occurs.
-
- 1. IF AN ACTIVE PULLDOWN WINDOW DOES NOT EXIST the scroll
- bar will be positioned over first selection in the
- pulldown menubar.
-
- 2. IF AN ACTIVE PULLDOWN WINDOW EXISTS the scroll bar will
- be positioned over the active pulldown selection in the
- active pulldown window ( SEE RSTRPULL ). This may be
- appropriate if a selection from a pulldown window is
- used to present the user with selections from another
- scroll window external to PULLDOWN. If the user
- presses ESC to exit the external scroll window PULLDOWN
- may be re-entered exactly where it was exited. IN THIS
- CASE THE ACTIVE PULLDOWN WINDOW MUST BE INTACT. IT
- WILL NOT BE COMPLETELY RE-PRINTED. If the user makes a
- selection from the external scroll window, the routine
- RSTRPULL may be used to restore the area under the
- pulldown window and deactivate the active pulldown
- window. The next call to PULLDOWN displays the pulldown
- menubar with the scroll bar positioned over the first
- item.
-
- IF AN ACTIVE PULLDOWN WINDOW UNKNOWINGLY EXISTS ON ENTRY
- TO PULLDOWN THE ACTIVE PULLDOWN WINDOW, IF NOT DISPLAYED,
- WILL HAVE IT'S INTERIOR PARTIALLY REPRINTED. THE WINDOW
- WILL NOT BE RE-PRINTED.
-
- Arguments: INFO$() is a string array holding the data
- for the info-line ( SEE ROUTINE INFOLINE ) for each
- pulldown windows's selections. Do not confuse this with
- the info-line data which is associated with the menubar
- selections as defined in routine SETPULL. The info-line
- provides instructions or descriptions for the selections
- in the pulldown windows. If pulldown window one holds
- five selections, INFO$(1) holds the data for the first
- selection in the window. INFO$(2) is the data for the
- second selection. Corresponding elements of INFO$() and
- the pulldown window's selections are related. A
- SEGMENTING LINE IN A PULLDOWN WINDOW MUST BE REPRESENTED
- BY A "" IN INFO$(). If pulldown window one contains
- five selections and pulldown window two contains ten
- selections, INFO$(6) will hold the data for the info-
- line for the first selection in the pulldown window two
- while INFO$(15) will hold the data for the info-line for
- the last selection. The elements of INFO$() will only
- be displayed in the info-line if it is "turned on" via
- routine INFOLINE. IF AN INFO-LINE IS NOT USED INFO$()
- MUST STILL BE A PREVIOUSLY DIMENSION ARRAY. DIMENSION
- INFO$() TO ZERO BEFORE CALLING PULLDOWN.
-
- EXAMPLE: DIM INFO$(0) 'IF INFO-LINE IS NOT USED
-
-
-
- 26
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
-
- Using the example for the pulldown windows defined in
- the call to SETPULL ( SEE - EXAMPLE: SETPULL ) the
- following could apply to INFO$()
-
- EXAMPLE: DIM INFO$(10) ' DO NOT ERASE THIS ARRAY!!!
-
- INFO$() ' RELATED PULLDOWN SELECTION
- ----------------------------------------------------
-
- INFO$(1) = "ONE" ' WINDOW 1 SELECTION "HELLO"
- INFO$(2) = "TWO" ' WINDOW 1 SELECTION "JOE"
-
- INFO$(3) = "THREE" ' WINDOW 2 SELECTION "HOW"
- INFO$(4) = "FOUR" ' WINDOW 2 SELECTION "ARE"
- INFO$(5) = "" ' WINDOW 2 -- LINE
- INFO$(6) = "FIVE" ' WINDOW 2 SELECTION "YOU"
- INFO$(7) = "SIX" ' WINDOW 3 SELECTION "I"
- INFO$(8) = "SEVEN" ' WINDOW 3 SELECTION "AM"
- INFO$(9) = "EIGHT" ' WINDOW 3 SELECTION "FINE"
-
- INFO$(10) = "NINE" ' WINDOW 4 SELECTION "BYE"
-
- The numbers ONE, TWO, THREE .... will print in the
- info-line when the corresponding pulldown window
- selection is covered by the scroll bar.
-
-
- BAR% is the sequential number (left to right)
- of selected menubar item . It is returned by the calling
- procedure, PULLDOWN. If the second item in the menubar is
- selected, BAR% will equal two. If ESC is pressed and
- ESC is an exit key BAR% will equal 0 on exit. If a
- function key is pressed and it is an exit key, BAR% will
- equal the highlighted menubar selection on exit.
-
- WIND% represents the row number of the
- selected pulldown window item. It is returned by the
- calling procedure. If the ESC pressed and ESC is an exit
- key, WIND% will equal 0 on exit. If a function key is
- pressed and it is an exit key, WIND% will equal the
- highlighted pulldown window selection ( interior row
- number ) on exit.
-
- NOTE: A SEGMENTING LINE IN A PULLDOWN WINDOW OCCUPIES A
- ROW POSITION.
-
- EX$ sets the keys which will, when pressed,
- exit PULLDOWN. The ENTER ( RETURN ) key always exits.
-
- EX$ can be used to simulate a selection from a pulldown
- window. ( SEE DESCRIPTION FOR ARGUMENT RKEY% ). EX$ may
-
-
-
- 27
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- be any combination of the following.
-
- "0" The F10 key will exit.
- "1" to "9" The F1 to F9 key will exit.
- "E" The ESC key will exit.
-
- EXAMPLE: EX$ = "E24" The ESC, F2, F4 and ENTER keys exit.
-
- RKEY% returns a numeric representation for
- the key which was pressed to cause the exit from PULLDOWN.
- On exit RKEY% may equal the following.
-
- 1 to 10 The F1 to F10 key caused the exit.
- 13 The ENTER key caused the exit.
- 27 The ESC key caused the exit.
-
-
- Arguments EX$ and RKEY% to may be used to simulate a
- selection from a pulldown window. To use the F1 key to
- simulate the first selection from the second pulldown
- window, argument EX$ must contain a "1" on entering
- PULLDOWN. Check to see if the F1 key caused the exit
- ( RKEY% = 1 ) from PULLDOWN. If it did set BAR% to 2
- simulating the second pulldown window. Set WIND% to 1 to
- simulate the first selection from the second pulldown
- window.
-
- NOTE: IF ROUTINE CHNGPULL IS USED TO DISABLE A PULLDOWN
- WINDOW'S SELECTION AND THE SELECTION MAY ALSO BE SIMULATED
- BY AN EXIT KEY, ARGUMENT EX$ MUST BE ADJUSTED ACCORDINGLY
- TO PREVENT THE EXIT KEY FROM SIMULATING THE DISABLED
- SELECTION.
-
- ATTR% is the color. It follows the same
- rules as described in MAKEWIND except a flashing
- foreground is not permitted. Any value over 127 is
- changed to ATTR% MOD 128.
-
- KEYATTR% is the color of the key character
- for selections in the pulldown windows. If KEYATTR% = 0
- the key character will be the same color as the other
- characters in each window selections. This would be
- appropriate if the first character in each selection is
- ALWAYS the key character. Setting KEYATTR% to a different
- color, or high intensity, allows users to distinguish the
- character as the key character for each item in the list.
- Any value for KEYATTR% over 127 is changed to KEYATTR%
- MOD 128.
-
- BRDR% is the pulldown window's border
- designation. BRDR% can equal 0, 1, 2, 10, 11 or 12 for
- pulldown windows. Any other value for BRDR% will
-
-
-
- 28
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- result in an error. SEE THE BORDER DESIGNATION CHART.
-
- 2.02 RSTRPULL ( RSTRMENUBAR% )
-
- Description: Restores the display area under and
- deactivates the active pulldown window. The active
- pulldown window is the displayed pulldown window when
- routine PULLDOWN is exited. Normally a call to RSTRPULL
- will be made when PULLDOWN is exited. There may be times,
- however, when it is desirable to leave the active pulldown
- window and menubar displayed. If this is the case
- RSTRPULL should not be called after PULLDOWN is exited.
-
- If RSTRPULL is NOT called after PULLDOWN is exited the
- following will occur:
-
- 1. The pulldown window which was active when PULLDOWN
- was exited will remain displayed.
-
- 2. The pulldown window which was active when PULLDOWN was
- exited remains the active pulldown window. The next
- call to PULLDOWN will return to the active pulldown
- window with the previous ( active ) selection from the
- pulldown window covered by the scroll bar.
-
- NOTE: WHEN PULLDOWN IS RE-ENTERED UNDER THESE THE
- ROUTINE, PULLDOWN, EXPECTS THE ACTIVE PULLDOWN WINDOW
- AND MENUBAR TO BE INTACT. IF IT IS NOT, THE PULLDOWN
- WINDOW WILL NOT BE DISPLAYED AS EXPECTED. IT IS
- IMPORTANT THAT NO PORTION OF ACTIVE PULLDOWN WINDOW OR
- MENUBAR IS "PRINTED OVER" PRIOR TO RE-ENTERING
- PULLDOWN.
-
- Argument: RSTRMENUBAR% determines if the area under the
- menubar is restored to the display when RSTRPULL is
- called. If RSTRMENUBAR% = 0 the menubar will remain
- displayed after RSTRPULL is called and the menubar will
- remain active. Subsequent calls to PULLDOWN DO NOT save
- the area under the menubar. PULLDOWN expects the menubar
- to be intact. If RSTRMENUBAR% = 1 the area under the
- menubar is restored to the display and the menubar is
- deactivated. Subsequent calls to PULLDOWN save the area
- under, and display a new menubar. By virtue of a call to
- RSTRPULL the area under the active pulldown window is
- restored and the active pulldown window is deactivated.
- The status of argument RSTRMENUMAR% has no affect on the
- status of the active pulldown window. It only restores
- and deactivates the menubar or allows same to remain
- active. In either case the next call to PULLDOWN will
- position the scroll bar over the first selection of the
- menubar after a call to RSTRPULL.
- NOTE: THE SAVED DISPLAY AREA FOR THE ACTIVE PULLDOWN
-
-
-
- 29
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- WINDOW RESIDES IN WINDOW NUMBER 23. FUNCTION WAVAIL% CAN
- DETERMINE IF A PULLDOWN WINDOW IS ACTIVE.
-
- EXAMPLE: IF WVAIL%(23) = 0 ' A pulldown window is active.
- IF WVAIL%(23) = 1 ' A pulldown window is not
- ' active.
-
- THE SAVED DISPLAY AREA FOR THEN MENUBAR RESIDES IN WINDOW
- NUMBER 24. FUNCTION WVAIL% CAN DETERMINE IF THE MENUBAR
- IS ACTIVE.
-
- EXAMPLE: IF WAVAIL%(24) = 0 ' The menubar is active.
- IF WAVAIL%(24) = 1 ' the menubar is not active.
-
-
-
-
- 2.03 CHNGPULL ( BARITEM%, WINDITEM%, ATTR% )
-
- NOTE: ROUTINE SETPULL MUST BE CALLED ONCE IN EVERY PROGRAM
- BEFORE ANY CALLS TO THIS ROUTINE.
-
- Description: Disables or enables the ability to select
- an selection or all selections, and changes the selection's
- color, in a pulldown window.
-
- Arguments: BARITEM% is the sequential number ( left
- to right ) of the menubar selection associated with the
- item's pulldown window.
-
- WINDITEM% is the row position of the item
- in the pulldown window's interior. If WINDITEM% = -1
- all selections in the pulldown window are affected.
-
- NOTE: A LINE IN A PULLDOWN WINDOW OCCUPIES A ROW
- POSITION.
-
- ATTR% serves two purposes.
-
- If ATTR% > 0 it changes the color of the item
- specified by BARITEM% and WINDITEM% to ATTR% ( SEE THE
- COLOR ATTRIBUTE CHART ). The key character in the item
- also assumes the color specified by ATTR%. The ability
- to select the item from the pulldown window is disabled.
- Any value for ATTR% over 127 is changed to ATTR% MOD 128.
- If ATTR% = 0 the color of the item, and it's key char-
- acter is returned to it's original status as defined in
- the original call to PULLDOWN. The ability to select
- the item is enabled.
-
-
-
-
-
-
- 30
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ***** SCROLL WINDOWS *****
-
- SCRLWIND places a scrollable list in the active window. A
- highlight ( scroll ) bar is placed over a specified item in
- the list and can be moved by the user via the UP and DOWN
- ARROW keys or MOUSE. Pressing the ENTER key or MOUSE on a
- selection returns the sequential item number covered by the
- scroll bar. The HOME, END, PG UP, and PG DN keys move the
- scroll bar as indicated. When a key is pressed SCRLWIND checks
- to see if the key matches the KEY CHARACTER of any selection in
- the list. If a match is found the scroll bar moves to that
- position in the list.
-
- Based on the number of buttons ( SEE ARGUMENT BUT% ), the
- minimum size of the window used for the scroll window varies as
- follows;
-
- # BUTTONS 0 1 2
- (OK ) ( OK/CANCEL )
- MIN. WINDOW WIDTH 5 11 18
- MIN. ROWS WITH TITLEBOX 5 9 9
- MIN. ROWS WITHOUT TITLEBOX 3 7 7
-
- The size of the scrollable rows is reduced by four and the size
- of the scrollable width is reduced by six if buttons are used.
- The scrollable width must be consider if a STRING WON'T FIT
- error is encountered.
-
-
- 3.00 SCRLWIND (LIST$(), INFO$(), TL$, ENTRIES%, KIND$, RTRN%,
- LI%, FC% RKEY%, KEYATTR%, SCROLLBAR%, BUT%)
-
- NOTE1: THE ABOVE MUST BE ON ONE LINE IN THE QB/QBX/VBDOS
- ENVIRONMENT.
-
- NOTE2: FOR ADVANCED FEATURES SEE ROUTINE B4SCRL. THESE
- FEATURES INCLUDE THE ABILITY TO;
-
- 1. EXIT THIS ROUTINE USING DEFINABLE "EXIT KEYS".
- 2. SET MARKED ( TAGGED ) SELECTIONS ON ENTRY.
- 3. CHANGE THE COLOR OF THE "TAG" DESIGNATOR.
- 4. SUPPRESS REFRESHING OF THE SCROLL WINDOW
- ON ENTRY TO THIS ROUTINE.
-
- Description: Places a list ( LIST$() ) in the active
- window. The list is ENTRIES% long. There are two classes
- of scroll windows.
-
- 1. Non-virtual scroll windows. If argument KEYATTR% does
- not equal zero the scroll window is a non-virtual
- scroll window. On entry, SCRLWIND, verifies each
- element of LIST$() will fit in the scroll window with a
-
-
-
- 31
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- leading and trailing space added to the string. If any
- item will not fit an error is reported. Non-virtual
- scroll windows may be ( SEE ARGUMENT KIND$ ) regular,
- auto-exit, multiple mark, single mark, or list scroll
- windows.
-
- 2. Virtual scroll windows. If argument KEYATTR% equals
- zero, the scroll window is a virtual scroll window.
- Virtual scroll windows allow horizontal and vertical
- scrolling. The LEFT ARROW and RIGHT ARROW key become
- active. A differently colored "key character" is not
- permitted in a virtual scroll window as the character
- would not be visible when it is scrolled out if the
- window. No checks are made to verify the string length
- in a virtual scroll window. Virtual scroll windows may
- be ( SEE ARGUMENT KIND$ ) regular, auto-exit, multiple
- mark, single mark, or list scroll windows. If argument
- KEYATTR% equals zero and all elements of the list will
- fit in the window's width the scroll window assumes the
- properties of a non-virtual scroll window making the
- RIGHT ARROW and LEFT ARROW keys inactive.
-
- NOTE: ARGUMENT KEYATTR% DETERMINES IF A SCROLL WINDOW IS
- A VIRTUAL OR NON-VIRTUAL SCROLL WINDOW. SEE THE
- DESCRIPTION FOR KEYATTR% FOR MORE INFORMATION.
-
- Arguments: LIST$() is the array holding the strings to
- be placed in the scroll window. Each element of the
- array is a line in the scroll window. If the length of
- any element is greater then the width of the window - 4
- and the scroll window is a non-virtual scroll window
- ( KEYATTR% <> 0 ) an error is reported. LIST$(1) must be
- the first string in the array, NOT LIST$(0).
-
- Each selectable item in LIST$() has a "KEY CHARACTER".
- The key character is the character which is searched for
- when a key is pressed while in the SCRLWIND environment.
- The key character defaults to the first character in
- each item. To designate the key character as a
- different character follow the character with a "@" in
- the string.
-
- EXAMPLE: LIST$(1) = "Get File" ( Key character = "G")
- LIST$(2) = "Save F@ile"( Key character = "F")
-
- The "@" will not be displayed when the string is printed
- in the scroll window. The description for KEYATTR% for
- this routine describes how to make the key character a
- different color, or high intensity, enabling users to
- distinguish it as the key character.
-
-
-
-
-
- 32
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- NOTE1: DO NOT PLACE THE "@" IN POSITION ONE OR TWO OF THE
- STRING AS IT WILL PRINT IN THE SCROLL WINDOW. AS STATED
- THE KEY CHARACTER WILL DEFAULT TO POSITION ONE IF THE
- "@" IS OMITTED FROM THE STRING. THIS ELIMINATES THE
- NEED TO PLACE THE "@" IN POSITION ONE OR TWO.
-
- NOTE2: IF ROUTINE B4SCRL IS USED TO SET A SCROLL WINDOW'S
- EXIT CRITERIA, AND ROUTINE B4SCRL'S ARGUMENT, EXIT$,
- CONTAINS AN "X" THE "KEY CHARACTER" SEARCH FEATURE IS
- DISABLED. DO NOT USE KEY CHARACTERS IF THIS IS THE CASE.
- ( SEE ROUTINE B4SCRL )
-
- If an element of LIST$() = "-" and it is not the first
- item in the list or the last item in the list and all of
- the items in LIST$() will fit in the window's interior
- the scroll window will be segmented. A line will print
- across the window as determined by the position of the
- "-" in LIST$(). If the previous conditions are not met
- the string will print as a "-".
-
- EXAMPLE: LIST$(2) = "-" ( Provided LIST$(2) is not
- the last item in the list and the number of
- interior rows in the window is greater than
- two, LIST$(2) will print as a line.)
-
- INFO$() is an array holding the individual
- strings used for the information line for each entry in
- the scroll window ( SEE ROUTINE INFO-LINE ). As the
- scroll bar moves from entry to entry the message in the
- info-line changes based on the element of INFO$() which
- corresponds to the selected entry in the scroll window.
- If the scroll bar is over the third entry in the scroll
- window INFO$(3) will print in the info-line, provided the
- info-line is on. A SEGMENTING LINE IN THE SCROLL WINDOW
- MUST BE REPRESENTED BY AN ELEMENT IN INFO$(). IF A
- SEGMENTING LINE OCCUPIES THE FOURTH ROW OF THE SCROLL
- WINDOW INFO$(4) MUST EQUAL "". If the info-line is not
- going to be used or if a fixed info-line message is to be
- printed for all entries in the scroll window INFO$() must
- still be a dimensioned array prior to calling SCRLWIND.
- FOR NO INFO-LINE OR A FIXED INFO-LINE MESSAGE INFO$() MUST
- BE DIMENSIONED TO ZERO ( EX: DIM INFO$(0) ).
-
- TL$ is a string which will print in the title
- box of the scroll window. TL$ is ignored if the scroll
- window does not have a title box. TL$ is useful for
- virtual scroll windows. When a virtual scroll window
- scrolls up and down, TL$ does not move. When a virtual
- scroll window scrolls left and right TL$ scrolls with the
- window's interior. TL$ can, therefore, be longer than the
- window's width when used with a virtual scroll window.
- Although TL$ may be used in other ( non-virtual ) scroll
-
-
-
- 33
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- windows, the title for the scroll window can be generated
- in the call to MAKEWIND for the scroll window.
-
- ENTRIES% is the number of elements in the
- array ( LIST$() ) to use in the scroll window.
-
- KIND$ specifies the type of scroll window
- and may be any of the following.
-
- KIND$ DESCRIPTION ( Detail descriptions follow )
-
- "A" "AN" Auto-exit scroll window.
- "M" "MN" Multiple mark ( tag ) scroll window.
- "S" Single mark ( tag ) scroll window.
- "L" List scroll window. No scroll bar.
- "V", "SV" View scroll window/ Single mark view.
- "N" Regular - scroll bar erased on exit.
- Any other value for KIND$ generates a regular scroll
- window.
-
- NOTE: AN "N" IN KIND$ ERASES THE SCROLL BAR ON EXIT.
-
- AUTO-EXIT SCROLL WINDOW ( KIND$ = "A" ) -- When in the
- scroll window environment if a key pressed matches the key
- character of an item in the scroll window the routine will
- be exited. The scroll bar moves to the item found. The
- position of the selected item in LIST$() will be returned
- in RTRN%. If RTRN% = 2, LIST$(2) was selected. SCRLWIND
- will exit with RKEY% equal to 13 simulating exit via the
- ENTER (RETURN) key.
-
- NOTE: IF ROUTINE B4SCRL IS USED TO SET A SCROLL WINDOW'S
- EXIT CRITERIA AND ROUTINE B4SCRL'S ARGUMENT EXIT$ CONTAINS
- AN "X" THE AUTO-EXIT FEATURE IS DISABLED. ( SEE ROUTINE
- B4SCRL )
-
- MULTIPLE MARK SCROLL WINDOW ( KIND$ = "M" ) -- Pressing
- the <+> or INSERT key marks the item covered by the scroll
- bar. A right arrow to the left of the item in the scroll
- window signifies it has been marked. The color of this
- arrow may be changed by routine B4SCRL. Pressing the <->
- or DELETE key un-marks an item if it was marked. Striking
- the PRINT ( not all systems ) key or SPACE BAR marks all
- items, unless they were all previously marked, in which
- case the PRINT ( not all systems ) key or SPACE BAR will
- un-mark all items. Pressing the ENTER or RETURN key
- returns a coded string in KIND$ which represents the
- marked items. If KIND$ ="" no items were marked. If any
- items were marked KIND$ will be ENTRIES% long. Each
- character in KIND$ will correspond to an element in
- LIST$(). If the first character of KIND$=" " LIST$(1) was
- not marked. If the second character, in KIND$ = CHR$(16),
-
-
-
- 34
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- LIST$(2) was marked. Each un-marked element of LIST$()
- will have a corresponding space (" ") in KIND$ while each
- marked element will have a corresponding right arrow
- ( CHR$(16) ) in KIND$. See the description for function
- MARKED% for a method of decoding KIND$. The multiple mark
- feature is disabled if a scroll window is also defined as
- a list scroll window or a single mark scroll window.
-
- NOTE: THE USE OF ROUTINE B4SCRL AFFECTS MULTIPLE MARK
- SCROLL WINDOWS AS FOLLOWS:
-
- 1. IF THE INSERT OR DELETE KEYS ARE SET AS EXIT KEYS BY
- ROUTINE B4SCRL THE INSERT AND DELETE KEYS WILL NO
- LONGER MARK AND UN-MARK ENTRIES. THE "+" AND "-" KEYS
- WILL STILL MARK AND UN-MARK ENTRIES.
-
- 2. IF B4SCRL'S ARGUMENT EXIT$ CONTAINS AN "X" THE SPACE
- BAR DOES NOT MARK/UN-MARK ALL ENTRIES.
-
- SINGLE MARK SCROLL WINDOW ( KIND$ = "S" ) --- Provided
- there is more than one item ( ENTRIES% > 1 ) in the scroll
- window, one item will be marked as in the preceding
- example for a "MULTIPLE MARK" scroll window. Only one
- item can be marked, however. The marked item follows the
- scroll bar. Pressing TAB, SHIFT TAB, ENTER, RETURN or ESC
- will exit the scroll window with the selected item in
- RTRN% and a representation of the "exit key" in RKEY%. If
- the scroll bar is over LIST$(2), RTRN% = 2 was selected.
-
- VIEW ONLY SCROLL WINDOW ( KIND$ = "V" OR "SV" ) --- The
- window will be filled with the strings in LIST$() and the
- routine will be exited. IF KIND$ = "SV" the scroll window
- is "VIEW ONLY -SINGLE MARK" scroll window. If ENTRIES% > 1
- the item designated by the value of RTRN% will be marked.
- ( See description for RTRN%. )
-
- LIST SCROLL WINDOW ( KIND$ = "L" ) --- This generates a
- list scroll window. There is no scroll bar. This may be
- useful for viewing virtual scroll windows. It may be used
- for regular scroll windows also.
-
- Any other value for KIND$ when entering SCRLWIND results
- in a "REGULAR" scroll window. After the scroll bar is
- moved to the selected item, pressing the ENTER or RETURN
- key returns the selected item in RTRN%. Routine B4SCRL
- provides alternate means to exit SCRLWIND.
-
-
- RTRN% serves two purposes. One is to place
- the scroll bar over the item specified by RTRN% when
- entering SCRLWIND. If RTRN% < 1 or RTRN% > ENTRIES%,
-
-
-
-
- 35
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- RTRN% defaults to 1 and the scroll bar will be positioned
- over the first item in the window.
-
- EXAMPLE: RTRN% = 2 -- If there are a minimum of two
- items in the scroll window ( ENTRIES% > 1 ) the scroll
- bar will be over LIST$(2) when entering SCRLWIND.
-
- RTRN% also returns the selected item when exiting
- SCRLWIND. If RTRN% = 2, LIST$(2) was selected when
- SCRLWIND was exited. If routine B4SCRL is used prior to
- calling SCRLWIND it is possible to exit SCRLWIND on any
- attempt to scroll before the first entry in the scroll
- window or past the last entry in the scroll window. This
- feature affects the value of RTRN% ( SEE ROUTINE B4SCRL).
-
- NOTE: THE ITEM SELECTED IN LIST$(), AS INDICTED BY THE
- VALUE OF RTRN%, MAY CONTAIN A "@" TO INDICATE THE KEY
- CHARACTER. IF IT IS NECESSARY TO PRINT THE ITEM THE "@"
- CAN BE REMOVED FROM IT USING THE FOLLOWING FUNCTION.
-
- ' FUNCTIONS MUST BE DECLARED. RTRN% = ITEM # SELECTED
- ' FROM LIST$().
-
- DECLARE FUNCTION NO$( ITEM$ )
- '( Place this at the start of the module.)
- ' IF RTRN% = 2 AND LIST$(RTRN%) = "Save F@ile", LIST$(2)
- ' CAN BE PRINTED AS "Save File" as follows.
-
- PRINT NO$( LIST$(RTRN%) )
-
- ----------------------------------------------------------
- ' INCLUDE THIS FUNCTION IN YOUR PROGRAM
-
- FUNCTION NO$ ( ITEM$ )
- A% = INSTR ( ITEM$, "@" )
- IF A% < 3 THEN ' "@" SHOULD NOT BE IN POSITION
- NO$ = ITEM$ ' 1 OR 2, OR NO "@" IS IN ITEM$.
- ELSE
- NO$ = LEFT$(ITEM$, A% - 1) + MID$(ITEM$, A% + 1)
- END IF
- END FUNCTION
- ----------------------------------------------------------
-
- LI%, on entry to routine SCRLWIND, specifies
- which row ( of the interior of the scroll window ) to
- place the scroll bar on. It is used, on entry, with
- argument RTRN% to place the scroll bar over a specific
- entry on a specific row. This is useful if it is
- necessary to exit a scroll window and re-enter it with the
- scroll bar over the same entry and on the same line as on
- the previous exit. Set this argument to one if it is not
- required . The following restrictions apply.
-
-
-
- 36
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 1. If LI% is less than one or LI% is greater than the
- number of entries ( ENTRIES% ) LI% is indeterminate.
- The scroll bar will be positioned over the entry
- specified by argument RTRN%.
-
- 2. Argument RTRN% determines the line the scroll bar will
- occupy ( argument LI% is ignored ) if an attempt is
- made to place an entry on a line greater than the
- subscript of the entry. For example, LIST$(2) can not
- be placed on line 3 of the scroll window. This would
- cause line one to be blank. If RTRN% = 2 on entry, LI%
- defaults to 2 also, if LI% is set to a number higher
- than 2.
-
- 3. If all of the entries fit in the scroll window argument
- LI% is ignored on entry. The scroll bar will occupy
- the line based on the value of RTRN%. If RTRN% = 3 the
- scroll bar will be positioned on line 3 regardless of
- the value of LI%
-
- 4. If there are more entries than interior rows in the
- scroll window, the last "interior rows" of entries fill
- in from the bottom of the scroll window. For example,
- assuming a scroll window has 10 interior rows and 20
- entries, the 20th entry can be positioned no higher
- than the 10th interior row, the 19th entry can be
- positioned no higher than the ninth interior row, and
- so on. If one of the last "interior rows" of entries
- is specified by argument RTRN% on entry, and LI%
- attempts to place the entry on row higher than outlined
- above, LI% is adjusted appropriately.
-
- On exit from routine SCRLWIND, LI% equals the interior row
- number of the scroll window that the scroll bar occupied
- prior to the exit.
-
- FC% is used with virtual scroll windows to
- position a specified string position for the entries in
- the scroll window on the first useable column (2) of the
- scroll window. On entry to SCRLWIND, FC% sets the string
- position for the first column of the scroll window. On
- exit FC% points to the string position occupying column
- two. FC% IS ONLY APPLICABLE TO VIRTUAL SCROLL WINDOWS.
- FC% has one purpose. It allows re-entry into a virtual
- scroll window exactly as it was displayed on exit if used
- with arguments RTRN% and LI% on re-entry. Set this
- argument to one if it is not required.
-
- EXAMPLE: On entry FC% = 5 and LIST$(1) ="12345678901234".
- "5678901234" will be displayed in a virtual
- scroll window. The first displayed character
- in LIST$(1) will be "5".
-
-
-
- 37
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- RKEY% represents the key or action used to
- exit SCRLWIND.
-
- RKEY% may equal any of the following.
-
- RKEY% EXIT KEY/ACTION KIND$
-
- ** 1 to 10 F1 to F10 ALL
-
- ** 11 PAGE UP ALL ( *EXTENDABLE )
- ** 12 PAGE DOWN ALL ( *EXTENDABLE )
-
- 13 ENTER ( RETURN ) or ALL
- 13 AUTO-EXIT FEATURE.
- ** 13 MOUSE SELECTION ( Single
- or double click ) ALL
-
- < OK > SELECTED ALL ( > 0 BUTTONS )
-
- ** 14 SHIFT TAB ALL
- ** 14 LEFT ARROW ALL ( NON-VIRTUAL )
-
- ** 15 TAB ALL
- ** 15 RIGHT ARROW ALL ( NON-VIRTUAL )
-
- ** 16 UP ARROW/MOUSE ALL (**EXTENDABLE )
- ** 19 DOWN ARROW/MOUSE ALL (**EXTENDABLE )
-
- 27 ESC ALL
- < CANCEL > SELECTED ALL ( 2 BUTTONS )
-
- ** 30 HOME ALL (**EXTENDABLE )
- ** 35 END ALL (**EXTENDABLE )
- ** 40 INSERT ALL
- ** 45 DELETE ALL
-
- ** 50 MARK an entry "M" (**EXTENDABLE )
- ** 55 UN-MARK an entry "M" (**EXTENDABLE )
-
- ** 200 Mouse pressed outside ALL ( NO BUTTONS )
- of scroll window.
-
- ** Requires calling routine B4SCRL prior to calling
- routine SCRLWIND. ( SEE ROUTINE B4SCRL ).
-
- KEYATTR% is the color of the key character
- for each item in the scroll window. If KEYATTR% = 0
- the key character will be the same color as the other
- characters for each window item. This would be
- appropriate if the first character in each item is ALWAYS
- the key character. KEYATTR% MUST EQUAL ZERO FOR A SCROLL
- WINDOW TO BE A VIRTUAL SCROLL WINDOW. IF KEYATTR% = 0 THE
-
-
-
- 38
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- SCROLL WINDOW IS TREATED AS A VIRTUAL SCROLL WINDOW.
- CHECKS TO DETERMINE IF THE ELEMENTS OF LIST$() ARE TOO
- LONG TO FIT IN THE WINDOW ARE NOT MADE. Setting KEYATTR%
- to a different color, or high intensity, allows users to
- distinguish the character as the key character for each
- item in the list. KEYATTR% has no effect on the
- background color of an item when it is covered by the
- scroll bar. It can effect the background color for the
- key character. This is useful for computers without high
- intensity or color capabilities. IF KEYATTR% <> 0 AND ANY
- SELECTION IN THE LIST WILL NOT FIT IN THE SCROLL WINDOW
- ALLOWING A LEADING AND TRAILING SPACE AN ERROR WILL BE
- REPORTED. SCROLL WINDOWS WITH BUTTONS ARE, IN EFFECT,
- REDUCED IN WIDTH BY SIX SPACES. THEREFORE, IF KEYATTR% <>
- 0 THE SCROLL WINDOW MAY NOT BE A VIRTUAL SCROLL WINDOW.
-
- SCROLLBAR% determines if scroll bars on the
- right and bottom border are displayed. Pressing the mouse
- on a scroll bar arrow simulates pressing the corresponding
- arrow key. If SCROLLBAR% > 0 the scroll bars will be
- displayed with the following exceptions.
-
- 1. If the scroll window has less than 3 interior rows the
- vertical scroll bar is not displayed. The scroll
- arrows will, however, be displayed on scroll windows
- with two interior rows.
-
- 2. If the scroll window is made an "EXTENDABLE" scroll
- window by a previous call to routine B4SCRL the
- vertical bar is not appropriate and not displayed.
-
- 3. If the scroll window is NOT a virtual scroll window the
- horizontal scroll bar is not necessary and is not
- displayed.
-
- BUT% allows < OK > and < CANCEL > buttons for
- the scroll window. Buttons are selected by moving the
- cursor to the button using the tab or shift tab keys. If
- ENTER or the SPACE BAR is pressed and the cursor is on a
- button , the button is selected. If the mouse is released
- with the mouse cursor over a button, the button is
- selected. If BUT% = 1 the < OK > button is displayed. If
- BUT% = 2 the < OK > and < CANCEL > buttons are displayed.
- Selecting the < OK > button simulates pressing the ENTER
- key on a selection (RKEY% = 13). Selecting the < CANCEL >
- button simulates pressing ESC (RKEY% = 27). IF BUT% = 1
- the ESC key will not exit unless an "E" is included in
- routine B4SCRL's argument EXIT$. Using buttons reduces
- the interior rows of the scroll window by four and the
- interior width of the scroll window by six. This is
- required to "make room" for the buttons.
-
-
-
-
- 39
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- NOTE: ALTHOUGH BUTTONS ARE ALLOWED WITH "EXTENDABLE" ( SEE
- ROUTINE B4SCRL ) SCROLL WINDOWS, PERFORMANCE ( ESPECIALLY
- IN 286 OR SLOWER PROCESSORS) IS SACRIFICED. IT IS
- SUGGESTED EXTENDABLE SCROLL WINDOWS ARE USED WITHOUT
- BUTTONS. IF BUTTONS ARE REQUIRED SPEED CAN BE ENHANCED BY
- USING FUNCTION CHOICEBAR, FOR THE BUTTONS, WITH ROUTINE
- SCRLWIND, TO OBTAIN THE BUTTON EFFECT. THIS WILL REQUIRE
- USING A "T" IN ROUTINE B4SCRL'S ARGUMENT EXIT$ TO ALLOW
- THE TAB AND SHIFT/TAB KEYS TO EXIT FROM THE SCROLL WINDOW
- AND ENTER FUNCTION CHOICBAR. IT WILL ALSO REQUIRE AN "O"
- IN ROUTINE B4SCRL'S ARGUMENT EXIT$. THIS WILL EXIT
- ROUTINE SCRLWIND IF THE MOUSE IS PRESSED OUTSIDE OF SAME.
- A CHECK CAN BE MADE WHEN THE MOUSE IS PRESSED OUTSIDE OF
- THE SCROLL WINDOW TO DETERMINE IF IT IS PRESSED ON A
- CHOICEBAR BUTTON. SEE THE SAMPLE FILE SCRLRAND.BAS.
-
-
- -------------------------------------------------------
- 'EXAMPLE OF A CALL TO SCRLWIND - AUTO EXIT SCROLL WINDOW
-
- DIM LIST$(11), INFO$(11)
- FOR X% = 1 TO 11 'ALWAYS START WITH 1.
- READ LIST$(X%)
- READ INFO$(X%) 'ONLY INCLUDE IF INFO-LINE
- NEXT 'IS USED.
-
-
- CALL MAKEWIND(15, "", 1, 1, 20, 17, 112, 2)
- KIND$ = "A" : RTRN% = 3: KEYATTR% = 116: LI%=1: FC%=1
- CALL SCRLWIND (LIST$(), INFO$(), "", 11, KIND$, RTRN%, LI%,
- FC%, RKEY%, 116, 1, 1)
-
- ' THE ABOVE CALL TO SCRLWIND MUST BE TYPED ON ONE LINE IN
- ' QB/QBX.
-
- DATA ONE : 'LIST$(1)
- DATA INFO-LINE FOR ONE : 'INFO$(1)
- DATA TW@O : 'LIST$(2)
- ' FOR ABOVE KEY CHAR. = "W"
- DATA INFO-LINE FOR TWO : 'INFO$(2)
- DATA TH@REE
- ' FOR ABOVE KEY CHAR. = "H"
- DATA INFO-LINE FOR THREE
- DATA FOUR
- DATA INFO-LINE FOR FOUR
- DATA FIV@E
- ' FOR ABOVE KEY CHAR. = "V"
- DATA INFO-LINE FOR FIVE
- DATA "-" : 'LIST$(5)
- ' ABOVE DATA STATEMENT PUTS A SEGMENTING LINE IN ROW 6
- DATA ""
- : 'NULL IN INFO$(5)
-
-
-
- 40
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- DATA SIX@
- ' FOR ABOVE KEY CHAR. = "X"
- DATA INFO-LINE FOR SIX
- DATA SEVEN
- DATA INFO-LINE FOR SEVEN
- DATA EIGHT
- DATA INFO-LINE FOR EIGHT
- DATA NINE
- DATA INFO-LINE FOR NINE
- DATA TEN : 'LIST$(11)
- DATA INFO-LINE FOR TEN : 'INFO$(11)
- -------------------------------------------------------
- The scroll window is the window defined by the call to
- MAKEWIND as it is the active window when SCRLWIND is
- called. The entries in the scroll window and the text for
- the info-line are the items in the data statements, as
- they are read into LIST$() and INFO$(). The fourth
- parameter in the call to SCRLWIND is the number of items
- in the list ( 11 ). As KIND$ ="A" before calling
- SCRLWIND, the scroll window is an "AUTO-EXIT SCROLL"
- window. Since RTRN% = 3 when entering SCRLWIND the scroll
- bar will start over the third item ( THREE ). The sixth
- DATA item for LIST$() loads LIST$(6) with "-". Therefore,
- a line will print in row six of the scroll window. The
- key character for each item will be red (KEYATTR% = 116 ).
- RTRN% will equal the selected item, and RKEY% will
- represent the exit key when SCRLWIND is exited. As
- reading the data takes time, quicker scroll windows will
- be generated if all arrays used in scroll windows are
- filled using READ and DATA statement during program
- initialization.
-
-
-
- 3.01 B4SCRL ( EXIT$, MARK$, TAGCOL%, NOREFRESH% )
-
- Description: Sets the "exit keys" or "exit circumstances",
- the marked ( tagged ) selections on entry, and
- marked selection arrow color for subsequent call to
- SCRLWIND. May also be used to suppress the "refreshing"
- of a scroll window on entry.
-
- NOTE1: IT IS NOT NECESSARY TO CALL B4SCRL PRIOR TO CALLING
- SCRLWIND UNLESS ONE OF B4SCRL'S FEATURES ARE REQUIRED.
-
- NOTE2: B4SCRL ONLY AFFECTS THE NEXT CALL TO SCRLWIND FOR
- ALL ARGUMENTS. THEREFORE, IF B4SCRL IS REQUIRED FOR A
- PARTICULAR SCROLL WINDOW IT MUST ALWAYS BE CALLED PRIOR TO
- CALLING SCRLWIND FOR THAT SCROLL WINDOW.
- ALWAYS PLACE A CALL TO B4SCRL, IF IT IS REQUIRED,
- IMMEDIATELY BEFORE THE CALL TO SCRLWIND.
-
-
-
-
- 41
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- EXAMPLE: CALL B4SCRL (...... ' IF B4SCRL IS REQUIRED
- CALL SCRLWIND (..... ' IT MUST PRECEDE SCRLWIND.
- CALL SCRLWIND (.......' THE PREVIOUS CALL TO
- ' B4SCRL DOES NOT AFFECT
- ' THIS CALL TO SCRLWIND.
-
- Arguments: EXIT$ sets the exit keys or exit
- circumstances for a subsequent call to SCRLWIND.
- Normally SCRLWIND exits via the ESC or ENTER keys. There
- is no need to use B4SCRL to provide alternate means to
- exit unless the scroll window requires same. EXIT$ may be
- any combination of the following.
-
- "E" The ESC key will exit SCRLWIND.
- "R" The ENTER (RETURN) key will exit SCRLWIND.
-
- "0" The F10 key will exit SCRLWIND.
- "1" to "9" The F1 to F9 keys will exit SCRLWIND.
-
- "I" The INSERT key will exit SCRLWIND.
- "D" The DELETE key will exit SCRLWIND.
-
- "T" TAB and SHIFT/TAB keys will exit SCRLWIND
- provided the scroll window has no buttons.
-
- "A" RIGHT ARROW and LEFT ARROW keys will exit
- SCRLWIND. SCRLWIND must be NON-VIRTUAL.
-
- "M" The mouse will exit SCRLWIND if it is
- RELEASED with the cursor on a valid
- selection. ( Single click )
-
- "MC" Double clicking the mouse on a selection
- will exit.
-
- "O" The mouse will exit SCRLWIND if it is
- pressed outside of the scroll window AND the
- scroll window has no buttons.
-
- "X" This makes the scroll window an "EXTENDABLE"
- scroll window. Any attempt to scroll past
- the last entry ( PAGE DOWN, DOWN ARROW OR
- MOUSE ) in the scroll window or scroll
- before the first entry ( PAGE UP, UP ARROW
- OR MOUSE ) in the scroll window will exit
- SCRLWIND. The HOME or END keys exit
- SCRLWIND. If the scroll window is a
- multiple mark scroll window ( argument KIND$
- for routine SCRLWIND equals "M" ) any change
- in mark status of an entry will exit
- SCRLWIND. ( FURTHER EXPLANATION AND
- RESTRICTIONS FOLLOW. )
-
-
-
- 42
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- EXAMPLE: EXIT$ = "12DR" The F1, F2, DELETE, and ENTER
- keys exit routine SCRLWIND.
-
- NOTE1: IF EXIT$ CONTAINS AN "X" THE SCROLL WINDOW IS AN
- "EXTENDABLE" SCROLL WINDOW. ALL ENTRIES MUST FIT IN THE
- SCROLL WINDOW OR AN ERROR WILL BE REPORTED. IF THERE ARE
- 10 INTERIOR ROWS IN THE SCROLL WINDOW THE NUMBER OF
- ENTRIES ( ARGUMENT ENTRIES% FOR ROUTINE SCRLWIND ) MUST BE
- EQUAL TO, OR LESS THAN, 10.
-
- NOTE2: IF THE INSERT OR DELETE KEYS ARE USED AS EXIT KEYS
- AND THE SCROLL WINDOW IS A MULTIPLE MARK, EXTENDABLE,
- SCROLL WINDOW THE INSERT AND DELETE KEYS WILL NO LONGER
- MARK AND UN-MARK ENTRIES. THE "+" AND "-" KEYS WILL STILL
- MARK AND UN-MARK ENTRIES, HOWEVER.
-
- Placing an "X" in EXIT$ makes the scroll window an
- "EXTENDABLE" scroll window. This provides the ability to
- scroll through records in large random access, binary,
- ISAM, BTRIEVE, or many other data files. On entry to
- SCRLWIND memory constraints may prohibit placing all
- records in a database in a scroll window. With
- "EXTENDABLE" scroll windows, the first 15 records of a
- data file may be placed in a scroll window with 15
- interior rows.
-
- NOTE: THE NUMBER OF INTERIOR ROWS IN A SCROLL WINDOW IS
- EQUAL TO THE NUMBER OF ROWS IN THE WINDOW ( AS SET BY THE
- CALL TO MAKEWIND FOR THE SCROLL WINDOW ) MINUS 2 IF THE
- CALL TO MAKEWIND DID NOT SPECIFY A TITLE BOX. IF THE CALL
- TO MAKEWIND SPECIFIED A TITLE BOX THE NUMBER OF INTERIOR
- ROWS EQUALS THE ROWS SET BY THE CALL TO MAKEWIND MINUS 4.
- IF BUTTONS ARE USED THE NUMBER OF INTERIOR ROWS IS REDUCED
- BY AN ADDITIONAL 4 ROWS. USING BUTTONS IN "EXTENDABLE"
- SCROLL WINDOWS IS NOT RECOMMENDED AS A NOTICEABLE ( ESP-
- ECIALLY ON 286 OR SLOWER MICROPROCESSORS ) DEGRADATION
- WILL BE OBVIOUS.
-
- An attempt to scroll past the 15th record in the scroll
- window or before the first record in the scroll window
- causes SCRLWIND to be exited. Argument RKEY% ( from
- routine SCRLWIND ) can be used to determine the key or
- circumstance which caused the exit. The following lists
- the values returned by SCRLWIND's argument RKEY% which are
- unique to "EXTENDABLE" scroll windows.
-
- - RKEY% = 19 -- The DOWN ARROW was pressed or the MOUSE
- was pressed on the windows bottom border ( SEE FOLLOWING
- NOTE ) with the scroll bar on the last entry in the
- scroll window. An attempt is being made to access the
- next record ( relative to the last record in the scroll
- window ) in the data file. On exit, a check should be
-
-
-
- 43
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- made to determine if the last record in the scroll
- window is not the last record in the data file. If it
- is not, all records in SCRLWIND's arguments LIST$()
- should be shifted to the preceding element of LIST$().
- The last element of LIST$() should be filled with the
- next record.
-
- ( FILEPOINTER MUST = LAST RECORD IN SCROLL WINDOW )
- ( MAX = NUMBER OF RECORDS IN FILE )
- ( ENTRIES% = NUMBER OF ENTRIES IN THE WINDOW )
-
- IF FILEPOINTER < MAX THEN
- FILEPOINTER = FILEPOINTER + 1
- FOR X% = 1 TO ENTRIES% - 1
- SWAP LIST$(X%), LIST$(X% + 1)
- NEXT
- ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
- ' POSITION FILEPOINTER.
- LIST$(ENTRIES%) = THE RECORD
- END IF
-
- The scroll window should then be re-entered.
- FILEPOINTER POINTS TO THE LAST RECORD IN THE SCROLL
- WINDOW.
-
- NOTE: RKEY% MAY ALSO EQUAL 19 IF THE SCROLL WINDOW IS A
- MULTIPLE MARK, EXTENDABLE, SCROLL WINDOW AND A MARK KEY
- ( INS, DEL, +, or - ) IS PRESSED WITH THE SCROLL BAR ON
- THE LAST ENTRY. IF THE ENTRY DOES NOT CHANGE "MARK"
- STATUS RKEY% WILL EQUAL 19 EMULATING THE DOWN ARROW KEY.
- IF THE ENTRY CHANGES "MARK" STATUS RKEY% WILL EQUAL 50 OR
- 55. SEE DESCRIPTIONS FOR RKEY% = 50 AND RKEY% = 55 TO SEE
- HOW TO MOVE TO THE NEXT RECORD WHEN RKEY% = 50 OR RKEY% =
- 55.
-
- - RKEY% = 16 -- The UP ARROW was pressed or the MOUSE was
- pressed on the top border with the scroll bar on the
- first entry in the scroll window. An attempt is being
- made to access the preceding record ( relative to the
- first record in the scroll window ) in the data file.
- On exit, a check should be made to determine if the
- first record in the scroll window is not the first
- record in the data file. If it is not, all records in
- SCRLWIND's arguments LIST$() should be shifted to the
- next element of LIST$().
-
- ( FILEPOINTER MUST = FIRST RECORD IN SCROLL WINDOW )
- ( MAX = NUMBER OF RECORDS IN FILE )
- ( ENTRIES% = NUMBER OF ENTRIES IN THE WINDOW )
-
- IF FILEPOINTER > 1 THEN
- FILEPOINTER = FILEPOINTER - 1
-
-
-
- 44
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- FOR X% = ENTRIES% TO 2 STEP - 1
- SWAP LIST$(X%), LIST$(X% - 1)
- NEXT
- ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
- ' POSITION FILEPOINTER .
- LIST$(1) = THE RECORD
- END IF
-
- The scroll window should then be re-entered.
- FILEPOINTER POINTS TO THE FIRST ENTRY IN THE SCROLL
- WINDOW.
-
- - RKEY% = 11 -- The PAGE UP key was pressed. A check
- should be made to determine if the are enough preceding
- records in the data file to update LIST$(1) to
- LIST$( INTERIOR ROWS IN THE SCROLL WINDOW ) with
- preceding records ( relative to the first record in the
- scroll window). If there are, LIST$() should be
- refreshed with those records.
-
- ( FILEPOINTER MUST = FIRST RECORD IN SCROLL WINDOW )
- ( ROWS% = INTERIOR ROWS IN SCROLL WINDOW )
- ( MAX = NUMBER OF RECORDS IN FILE )
-
- ENTRIES% WILL BE USED BY THE NEXT CALL TO SCRLWIND
- TO SET THE NUMBER OF ENTRIES IN THE SCROLL WINDOW.
-
- RTRN% WILL BE DETERMINE WHICH ENTRY WILL BE
- HIGHLIGHTED ON THE NEXT CALL TO SCRLWIND.
-
- FILEPOINTER = FILEPOINTER - ROWS%
-
- ( If there are not enough preceding records in the
- scroll window FILEPOINTER should be set to the first
- record. )
-
- IF FILEPOINTER < 1 THEN FILEPOINTER = 1
-
- ENTRIES% = 0
- WHILE ENTRIES% < ROWS% AND ENTRIES% < MAX
- ENTRIES%=ENTRIES% + 1
- ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
- ' POSITION FILEPOINTER .
- LIST%(ENTRIES%)= THE RECORD
- FILEPOINTER = FILEPOINTER + 1
- WEND
- FILEPOINTER = FILEPOINTER - 1
- RTRN% = 1 ' HIGHLIGHT FIRST SCROLL WINDOW ENTRY.
-
- The scroll window should then be re-entered.
- FILEPOINTER POINTS TO THE LAST ENTRY IN THE SCROLL
- WINDOW.
-
-
-
- 45
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- - RKEY% = 12 -- The PAGE DOWN key was pressed. A check
- should be made to determine if the are enough records
- ( relative to the last record in the scroll window ) in
- the data file to update LIST$(1) to LIST$( INTERIOR ROWS
- IN THE SCROLL WINDOW ) with new records ( relative to
- the last record in the scroll window ). If there are,
- LIST$() should be refreshed with these records.
-
- ( FILEPOINTER MUST = LAST RECORD IN SCROLL WINDOW )
- ( ROWS% = INTERIOR ROWS IN SCROLL WINDOW )
- ( MAX = NUMBER OF RECORDS IN FILE )
-
- ENTRIES% WILL BE USED BY THE NEXT CALL TO SCRLWIND
- TO SET THE NUMBER OF ENTRIES IN THE SCROLL WINDOW.
-
- RTRN% WILL BE DETERMINE WHICH ENTRY WILL BE
- HIGHLIGHTED ON THE NEXT CALL TO SCRLWIND.
-
- IF FILEPOINTER + ROWS > MAX THEN
- FILEPOINTER = ( MAX - ROWS% + 1 )
- IF FILEPOINTER < 1 THEN FILEPOINTER = 1
- ELSE
- FILEPOINTER = FILEPOINTER + 1
- END IF
-
- ENTRIES% = 0
- WHILE ENTRIES% < ROWS% AND ENTRIES% < MAX
- ENTRIES%=ENTRIES% + 1
- ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
- ' POSITION FILEPOINTER.
- LIST%(ENTRIES%) = THE RECORD
- FILEPOINTER = FILEPOINTER + 1
- WEND
- FILEPOINTER = FILEPOINTER - 1
- RTRN% = ENTRIES%
-
- The scroll window should then be re-entered.
- FILEPOINTER POINTS TO THE LAST ENTRY IN THE SCROLL
- WINDOW.
-
- - RKEY% = 30 -- The HOME key was pressed. The scroll
- window should be filled with the first records in the
- data file.
-
- ( FILEPOINTER MUST = FIRST RECORD IN THE DATA FILE )
- ( ROWS% = INTERIOR ROWS IN SCROLL WINDOW )
- ( MAX = NUMBER OF RECORDS IN FILE )
-
- ENTRIES% WILL BE USED BY THE NEXT CALL TO SCRLWIND
- TO SET THE NUMBER OF ENTRIES IN THE SCROLL WINDOW.
-
- RTRN% WILL BE DETERMINE WHICH ENTRY WILL BE
-
-
-
- 46
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- HIGHLIGHTED ON THE NEXT CALL TO SCRLWIND.
-
- FILEPOINTER = 1
- ENTRIES% = 0
- WHILE ENTRIES% < ROWS% AND ENTRIES% < MAX
- ENTRIES%=ENTRIES% + 1
- ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
- ' POSITION FILEPOINTER .
- LIST%(ENTRIES%)=RECORD
- FILEPOINTER = FILEPOINTER + 1
- WEND
- FILEPOINTER = FILEPOINTER - 1
- RTRN% = 1 ' HIGHLIGHT FIRST SCROLL WINDOW ENTRY.
-
- The scroll window should then be re-entered.
- FILEPOINTER POINTS TO THE LAST RECORD IN THE SCROLL
- WINDOW.
-
- - RKEY% = 35 -- The END key was pressed. The scroll
- window should be filled with the last records in the
- data file.
-
- ( FILEPOINTER MUST BE SET TO THE CORRECT RECORD )
- ( ROWS% = INTERIOR ROWS IN SCROLL WINDOW )
- ( MAX = NUMBER OF RECORDS IN FILE )
-
- ENTRIES% WILL BE USED BY THE NEXT CALL TO SCRLWIND
- TO SET THE NUMBER OF ENTRIES IN THE SCROLL WINDOW.
-
- RTRN% WILL BE DETERMINE WHICH ENTRY WILL BE
- HIGHLIGHTED ON THE NEXT CALL TO SCRLWIND.
-
- FILEPOINTER = MAX - ROWS% + 1
- IF FILEPOINTER < 1 THEN FILEPOINTER = 1
-
- ENTRIES% = 0
- WHILE ENTRIES% < ROWS% AND ENTRIES% < MAX
- ENTRIES%=ENTRIES% + 1
- ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
- ' POSITION FILEPOINTER .
- LIST%(ENTRIES%)=RECORD#
- FILEPOINTER = FILEPOINTER + 1
- WEND
- FILEPOINTER = FILEPOINTER - 1
- RTRN% = ENTRIES% ' HIGHLIGHT LAST ENTRY.
-
- The scroll window should then be re-entered.
- FILEPOINTER POINTS TO THE LAST RECORD IN THE SCROLL
- WINDOW AND IN THE DATA FILE.
-
- - RKEY% = 50 -- The scroll window is a "MARK", extendable,
- scroll window. An un-marked entry was marked. ( SEE
-
-
-
- 47
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- DESCRIPTION FOR ARGUMENT MARK$ FOR THIS ROUTINE ). To
- determine which record was marked;
-
- ( FILEPOINTER MUST = FIRST RECORD IN SCROLL WINDOW )
- ( RTRN% IS RETURNED BY ROUTINE SCRLWIND. IT
- POINTS TO THE "MARKED" ENTRY )
-
- ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
- ' POSITION FILEPOINTER + RTRN% - 1.
-
- ' UPDATE THE RECORD TO SHOW IT IS MARKED.
-
- RTRN% = RTRN% + 1 ' MOVE TO THE NEXT ENTRY
-
- IF RTRN% > ENTRIES% -- GO TO THE ROUTINE USED FOR
- THE DOWN ARROW ( RKEY% = 16 )
-
- The scroll window should then be re-entered.
- FILEPOINTER POINTS TO THE FIRST RECORD IN THE SCROLL
- WINDOW.
-
- - RKEY% = 55 -- The scroll window is a "MARK" ( and
- "EXTENDABLE" ) scroll window. An marked entry was un-
- marked. ( SEE DESCRIPTION FOR ARGUMENT MARK$ FOR THIS
- ROUTINE). To determine which record was marked;
-
- ( FILEPOINTER MUST = FIRST RECORD IN SCROLL WINDOW )
- ( RTRN% IS RETURNED BY ROUTINE SCRLWIND. IT
- POINTS TO THE "MARKED" ENTRY )
-
- ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
- ' POSITION FILEPOINTER + RTRN% - 1.
-
- ' UPDATE THE RECORD TO SHOW IT IS NOT MARKED.
-
- RTRN% = RTRN% + 1 ' MOVE TO THE NEXT ENTRY
-
- IF RTRN% > ENTRIES% -- GO TO THE ROUTINE USED FOR
- THE DOWN ARROW ( RKEY% = 16 )
-
- The scroll window should then be re-entered.
- FILEPOINTER POINTS TO THE FIRST RECORD IN THE SCROLL
- WINDOW.
-
- NOTE: "EXTENDABLE" SCROLL WINDOWS ONLY EXIT WITH RKEY%
- EQUAL TO 50 OR RKEY% EQUAL TO 55 IF A CHANGE IN "MARK"
- STATUS FOR AN ENTRY OCCURS. AN ATTEMPT TO MARK A
- PREVIOUSLY MARKED ENTRY OR UN-MARK A PREVIOUSLY UN-
- MARKED ENTRY WILL NOT EXIT ROUTINE SCRLWIND.
-
- - RKEY% = 1 TO 10, 13-15, 27, 40, 45, or 200 -- These
- values for RKEY% are not unique to an "EXTENDABLE" scroll
-
-
-
- 48
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- window. They remain available as a means to exit an
- "EXTENDABLE" scroll window, however. SEE ARGUMENT RKEY%
- FOR ROUTINE SCRLWIND.
-
- NOTE: WHEN A SCROLL WINDOW IS AN EXTENDABLE SCROLL WINDOW
- IT'S OPTIONS ARE AFFECTED AS FOLLOWS:
-
- 1. PRESSING THE FIRST LETTER OF AN ENTRY OR "KEY
- CHARACTER" OF AN ENTRY DOES NOT MOVE THE SCROLL BAR TO
- THE ENTRY. AS THE SEARCH IS CONFINED TO THE ENTRIES IN
- THE SCROLL WINDOW, AND ALL OF THE RECORDS ARE NOT IN
- THE SCROLL WINDOW, "KEY CHARACTERS", ARE USELESS.
-
- 2. AUTO-EXIT SCROLL WINDOWS ARE NOT PERMITTED ALSO, FOR
- THE SAME REASON. TO SEARCH FOR A RECORD, THE F1 KEY,
- FOR EXAMPLE, CAN BE USED TO EXIT SCRLWIND AND PROMPT
- THE USER FOR A SEARCH CRITERIA. THE DATABASE CAN BE
- SEARCHED, AND IF A MATCH IS FOUND, SCRLWIND MAY BE RE-
- ENTERED DISPLAYING THE "FOUND" RECORD.
-
- 3. THE OPTIONAL SCROLLBAR ON THE RIGHT BORDER OF THE
- SCROLL WINDOW IS DISABLED FOR THE CALL TO SCRLWIND.
-
- 4. THE SPACE BAR ( PRINT KEY ON SOME SYSTEMS ) DOES NOT
- MARK/UN-UNMARK ALL ENTRIES IN MULTIPLE MARK SCROLL
- WINDOWS.
-
- MARK$ is a string representing those entries,
- on entering SCRLWIND, to be marked. This is only
- appropriate if the scroll window is a multiple mark scroll
- window ( SCRLWIND's argument KIND$ = "M" ). MARK$ must be
- the exact length as the number of entries in the scroll
- window. IF IT IS NOT IT IS IGNORED! On entry to routine
- SCRLWIND a space ( CHR$(32) ) in MARK$ is decoded as an
- un-marked entry. If the first character of MARK$ = " "
- the first entry in the scroll window will not be marked.
- An arrow ( CHR$(16) ) in MARK$ is decoded as a marked
- entry. If the second character of MARK$ = CHR$(16) the
- second entry in the scroll window is marked. Each
- character in MARK$ represents a marked or un-marked entry
- in the scroll window. On exit from routine SCRLWIND,
- SCRLWIND's argument KIND$ holds the string representation
- for those marked and un-marked items. B4SCRL's argument
- MARK$ holds the string representation on entry only. If
- the scroll window is to be re-entered it is necessary to
- refresh MARK$. The following example demonstrates this.
-
- REENTER:
- KIND$ = "M" ' MAKE A MULTIPLE MARK SCROLL WINDOW
- CALL B4SCRL ("", MARK$ ) ' ENTER WITH SOME ENTRIES
- ' MARKED.
-
-
-
-
- 49
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ' WHILE IN THE SCROLL WINDOW ENVIRONMENT THE MARKED
- ' ENTRIES MAY CHANGE.
- CALL SCRLWIND ( L$(), I$(), TL$, ENTRIES%, KIND$ ........
- ' KIND$ REPRESENTS THE MARKED ENTRIES ON EXIT
-
- MARK$ = KIND$ ' MARK$ MUST BE REFRESHED IF THE SCROLL
- ' WINDOW IS TO BE RE-ENTERED
-
- ' KIND$ = "" IF NOTHING WAS MARKED. IF LENGTH OF MARK$ IS
- ' NOT ENTRIES% LONG IT IS IGNORED, THEREFORE ON RE-ENTRY
- ' NO ENTRIES ARE MARKED.
-
- GOTO REENTER
-
- NOTE: IT IS THE PROGRAMMER'S RESPONSIBILITY TO ASSURE
- MARK$ CONTAINS SPACES ( " " ) AND ARROWS ( CHR$(16) )
- ONLY. ANY OTHER CHARACTERS WILL MARK ENTRIES WITH THAT
- CHARACTER ON ENTRY ONLY. IF THE ENTRY IS UN-MARKED AND
- RE-MARKED IN THE SCROLL WINDOW ENVIRONMENT THE NORMAL MARK
- CHARACTER IS USED.
-
- TAGCOL% sets the color of the marked "tagged"
- selection arrow for mark scroll windows. If TAGCOL% = 0
- the arrow assumes the same color as the text in the scroll
- window. TAGCOL% is adjusted to TAGCOL% AND 15 if it is
- set over 15. It only affects the arrow's foreground color.
-
- NOREFRESH% can be used to re-enter a scroll
- window without re-printing the text in same. It is used
- to enhance the speed on re-entry and avoid any flicker by
- needlessly re-printing the text. If NOREFRESH% = 0 ( the
- default without calling B4SCRL ) the scroll window is
- refreshed on entry. If NOREFRESH% = 1 the scroll window
- is not refreshed on entry.
-
- MOTE: SETTING NOREFRESH% TO ONE IS ONLY APPROPRIATE IF:
-
- 1. The scroll window is already displayed.
-
- 2. The scroll window is being re-entered in the same
- state as it was exited.
-
- 3.02 MARKED% (KIND$, START%)
-
- Description: MARKED%(KIND$, START%) is a function used
- to decode SCRLWIND's argument KIND$ after a multiple mark
- scroll window is exited. MARKED%(KIND$, START%) will equal
- the next position in KIND$ starting from position START%
- which contains a CHR$(16). If the third element (item)
- in LIST$() was marked in the call to SCRLWIND and START%
- =1, THEN: MARKED%(KIND$,START%) = 3.
-
-
-
-
- 50
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Arguments: KIND$ is the string returned by calling
- SCRLWIND with the MARKED option ON. KIND$ = "" if no
- items were marked.
-
- START% is the position in KIND$ to start
- searching for a CHR$(16). A CHR$(16) in KIND$
- represents a marked element in the string array LIST$()
- used in SCRLWIND. Every time a position in KIND$ is
- found which corresponds to a marked element of LIST$(),
- START% is set to a new value which is equal to the
- "marked" position in KIND$ + 1. This is the next
- position in KIND$ where the search will start for
- another "marked" position. If MARKED% =0 there are no
- more "marked" positions in KIND$ or KIND$ = "".
- -------------------------------------------------------
- 'EXAMPLE USING THE FUNCTION MARKED% (KIND$,START%) THIS
- 'EXAMPLE PRINTS THE MARKED ITEMS IN LIST$() AFTER A CALL
- 'TO SCRLWIND.
-
- 'GIVEN: SCRLWIND HAS BEEN CALLED. THE FOURTH AND TENTH
- 'ELEMENTS OF LIST$() WERE MARKED. KIND$ WAS RETURNED BY
- 'A PREVIOUS THE CALL TO SCRLWIND.
-
- DECLARE FUNCTION MARKED% (KIND$, START%) ' MUST BE IN
- '(Put this at the start of the module) ' MODULE USING
- ' FUNC. MARKED%.
-
- START%=1 ' START THE SEARCH AT POSITION 1 OF KIND$.
- DO ' MARKED% = 0 AFTER
- A% = MARKED%(KIND$, START%) ' ALL MARKED ITEMS
- IF A% = 0 THEN EXIT DO ' ARE FOUND OR IF
- PRINT LIST$(A%)
- END IF
- LOOP
- -------------------------------------------------------
- The first time through the loop, MARKED% (KIND$, START%)
- will equal 4, and LIST$(4) will print. START% is auto-
- matically set to 5, the next position to start searching
- KIND$ for a "marked" position in KIND$. The second loop
- will set MARKED% (KIND$,START%) to 10 and LIST$(10) will
- print. As there are no more marked positions, MARKED% =
- 0 and the loop be exited.
-
-
-
-
-
-
-
-
-
-
-
-
-
- 51
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ****** INPUT ROUTINES ******
-
- Input routines provide the ability to generate a single
- character input field ( GETANS ), a single input field
- ( INPTWIND ), or multiple input fields ( MULTINPT ). Full
- editing is provided within each field. Up to 10 multiple input
- screens may be used, with each screen capable of supporting up
- to 150 fields. Fields may be defined as numeric, alpha/numeric,
- or date. Numeric fields may be designated 0 to 6 decimal
- places and optionally padded with leading zeros. Numerous
- additional options are available. Two additional input
- routines provide input in the form of displayed choices.
- Function CHOICEBAR% provides up to 10 choices displayed on
- a "choicebar". Function CHOICEWIND% generates a text filled
- window with a choicebar in same.
-
- 4.00 INPTINIT ( DATEFORMAT%, ISDOT%, AT1%, BLANK%, SND% )
- See: Example - Input window
-
- Description: Initialization routine for input routines
- INPTWIND, MULTINPT, CHOICEWIND%, and CHOICEBAR%. Function
- CHOICEBAR% is used by routine SCRLWIND for the < OK > and
- < CANCEL > buttons. INPTINIT MUST BE CALLED ONCE IN EVERY
- PROGRAM BEFORE ANY CALLS TO THESE ROUTINES (INCLUDING
- SCRLWIND WITH BUTTONS).
-
- NOTE: IF A CLEAR STATEMENT IS EXECUTED BY THE PROGRAM
- INPUT INITIALIZATION MEMORY IS LOST. INPTINIT MUST BE
- CALLED AFTER A CLEAR STATEMENT TO RE-INITIALIZE INPUT
- INITIALIZATION MEMORY.
-
- Arguments: DATEFORMAT% sets the valid date format for
- input routines INPTWIND and MULTINPT. If a field in
- either input routine is designated a date field, the field
- can not be exited if the entered date does not match the
- date format as specified by DATEFORMAT%. The valid date
- format varies predicated on the specified field width for
- the date field. If set outside it's allowable range,
- DATEFORMAT% defaults to 1. Listed are valid values for
- DATEFORMAT% and the corresponding valid date formats.
-
- DATEFORMAT% DATE FORMAT DATE FORMAT
- (FIELD WIDTH = 10) (FIELD WIDTH = 8)
-
- 1 MM-DD-YYYY MM-DD-YY
- 2 MM/DD/YYYY MM/DD/YY
- 3 DD-MM-YYYY DD-MM-YY
- 4 DD/MM/YYYY DD/MM/YY
- 5 DD.MM.YYYY DD.MM.YY
-
-
-
-
-
-
- 52
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ISDOT% sets a period or comma for the decimal
- designator. If ISDOT% = 1 the decimal designator is a
- period. If ISDOT% = 0 the decimal designator is a comma.
- This is appropriate for some users outside of the USA.
-
- AT1% determines if the cursor will enter
- input fields used in routines INPTWIND and MULTINPT on the
- first character of text in the field or after the last
- character of text in the field. If AT1% = 1 the cursor
- will enter a field on the first character of text in the
- field. If AT1% = 0 the cursor will enter fields at the
- position after the last character of text in the field.
-
- NOTE: NON-INPUT FIELDS DEFINED IN CALLS TO ROUTINE
- MAKEFIELD FOR ROUTINE MULTINPT MAY HAVE THE CURSOR SET TO
- ANY POSITION IN THE FIELD VIA THE CALL TO MAKEFIELD FOR
- AN INDIVIDUAL FIELD.
-
- BLANK% allows text in input fields used in
- routines INPTWIND and MULTINPT to be erased when the FIRST
- valid key is pressed. If BLANK% = 1 the text in a field
- will be erased when a valid key is pressed and the
- character represented by the key will be the first text
- character in the field. If BLANK% = 0 the character
- represented by a valid key, when it is pressed, will be
- added to any text previously in the field. The FIRST
- valid key pressed will not erase the field's text.
-
- NOTE: MANY FIELDS USED BY ROUTINE MULTINPT ARE NON-INPUT
- FIELDS. THE VALUE OF BLANK% DOES NOT AFFECT THESE FIELDS.
-
- SND% allows the default sound, as set by
- routine SETWIND, to be generated when and invalid
- key is pressed in routines INPTWIND and MULTINPT. If
- SND% = 1 pressing an invalid character will make the
- default sound. If SND% = 0 pressing an invalid character
- makes no sound.
-
-
- 4.01 B4INPT (INPUTEXIT$, RESTRICT$)
-
- Description: Sets "exit keys" and the field restrict
- string for a subsequent call to INPTWIND.
-
- NOTE1: CALLING ROUTINE B4INPT BEFORE A CALL TO ROUTINE
- INPTWIND IS NOT REQUIRED UNLESS ONE OF B4INPT'S SPECIAL
- FEATURES ARE REQUIRED.
-
- NOTE2: A CALL TO B4INPT ONLY AFFECTS THE NEXT CALL TO
- INPTWIND. CALLS TO B4INPT SHOULD BE PLACED DIRECTLY
- BEFORE CALLS TO INPTWIND.
-
-
-
-
- 53
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- EXAMPLE: CALL B4INPT (.......
- CALL INPTWIND (..... ' this is affected by
- ' the call to B4INPT.
- CALL INPTWIND (..... ' this is not affected
- ' by the call to B4INPT.
-
- Arguments: INPUTEXIT$ sets the keys which will exit
- input routine INPTWIND. INPUTEXIT$ does not affect input
- routine MULTINPT. Routine SETINPT is used to set exit
- keys for individual MULTINPT screens. If INPUTEXIT$ = ""
- the default keys will exit INPTWIND. The default exit
- keys are dependent on the number of buttons used by
- INPTWIND.
- DEFAULT EXIT KEYS
- NO BUTTONS -------------------- ENTER and ESC
- ONE BUTTON < OK > ------------- ENTER
- TWO BUTTONS < OK >< CANCEL > -- ENTER AND ESC
-
- ENTER exits INPTWIND returning the edited text. ENTER
- always exits all input windows, even if INPUTEXIT$ defines
- new exit keys. ESC always exits two button input windows.
- If INPUTEXIT$ defines new exit keys for input windows
- without buttons, ESC will not exit unless an "E" is
- included in INPUTEXIT$. If ESC is not an exit key the
- field's text is returned to it's pre-edited state and
- INPTWIND is not exited if ESC is pressed. If ESC is an
- exit key, and it is pressed, INPTWIND is exited returning
- the EDITED text. Using INPUTEXIT$ allows additional or
- different keys to exit INPTWIND. INPUTEXIT$ may consist
- of any combination of the following characters.
-
- Character "Exit" key.
- "0" F10
- "1","2","3","4","5","6","7","8","9" F1 to F9
- "E" ESC
- "U" PGUP
- "D" PGDN
-
- "VIEW" -- This causes the input window to be displayed and
- exited. The input window remains active.
-
- NOTE: THE FOLLOWING APPLY FOR NO BUTTON INPUT WINDOWS.
-
- "O" - The mouse is pressed outside of the input window.
- "T" - The TAB or SHIFT/TAB keys exit.
-
- NOTE: THE MOUSE "BELONGS" TO ROUTINE INPTWIND IF IT HAS
- BUTTONS. INPTWIND CAN NOT BE EXITED IF THE LEFT MOUSE
- BUTTON IS PRESSED OUTSIDE OF THE FIELD. TO USE INPUT
- FIELDS AND DETECT THE IF THE LEFT MOUSE BUTTON IS PRESSED
- OUTSIDE OF A FIELD ROUTINE "NO BUTTON INPUT WINDOWS" OR
- MULTINPT MUST BE USED.
-
-
-
- 54
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Example: If INPUTEXIT$ = "02E" the F10, F2, ESC, and
- RETURN (ENTER) keys will exit INPTWIND. see the
- description for routine INPTWIND ( argument RKEY% ).
-
- The following eliminates ENTER as exit key.
-
- DO
- CALL B4INPT ("12","") ' F1 / F2 = exit keys
- CALL INPTWIND (........ RKEY% ' SEE ROUTINE INPTWIND
- LOOP WHILE RKEY% = 13 ' RKEY% = 13 for ENTER
- CALL RSTRINPT (1) ' SEE ROUTINE RSTRINPT
-
- NOTE: IF THE ESC KEY IS NOT AN EXIT KEY AND INPUTEXIT$
- DOES NOT EQUAL "" THE ESC KEY WILL RETURN THE TEXT IN THE
- INPUT FIELD TO IT'S PRE-EDITED STATE. INPTWIND WILL NOT BE
- EXITED. IF THE ESC KEY IS AN EXIT KEY INPTWIND IS EXITED
- RETURNING THE EDITED TEXT, WHEN ESC IS PRESSED.
-
- RESTRICT$ is the field's restrict string. It
- holds the allowable characters which can be entered in the
- input field for a subsequent call to INPTWIND. RESTRICT$
- IS IGNORED IF THE FIELD IS NOT AN ALPHA/NUMERIC FIELD.
- Only use RESTRICT$ if necessary. For example if RESTRICT$
- = "1234567890()-" only the characters included in a phone
- number can be entered in the field. If RESTRICT$ = "" for
- an alpha/numeric field all valid alpha/numeric characters
- may be entered in the field.
-
-
- 4.02 INPTWIND ( P$, CODE$, TR%, LC%, WD%, WATTR%, FATTR%,
- RTRN$, RKEY%, BUT%, BRDR%)
- See: Example - Input window
-
- NOTE1: PLACE THE ABOVE CALL TO INPTWIND ON ONE LINE IN THE
- QB/QBX ENVIRONMENT.
-
- NOTE2: ROUTINES INPTINIT AND SETWIND MUST BE CALLED AT LEAST
- ONCE IN ANY PROGRAM PRIOR TO CALLING THIS ROUTINE.
-
- NOTE3: WHEN AN INPUT WINDOW ( OR LINE ) IS MADE IT BECOMES
- THE ACTIVE INPUT WINDOW UNTIL IT IS DEACTIVATED BY A CALL
- TO ROUTINE RSTRINPT. ON ENTRY THIS ROUTINE WILL MAKE A
- NEW INPUT WINDOW IF THERE IS NO ACTIVE INPUT WINDOW. IF
- THERE IS AN ACTIVE INPUT WINDOW THIS ROUTINE SIMPLY RE-
- ENTERS IT. A NEW INPUT WINDOW IS NOT MADE. AN
- UNDERSTANDING OF ROUTINE RSTRINPT IS NECESSARY TO FULLY
- UNDERSTAND THIS ROUTINE.
-
- Description: On entry this routine will do one of the
- following.
-
- 1. IF THERE IS NO ACTIVE INPUT WINDOW this routine makes
-
-
-
- 55
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- an input field, which may optionally be windowed. The
- area under the field or window is automatically saved.
- The input window becomes the active input window.
- The area under the window ( or line ) can be restored
- after exiting INPTWIND by calling routine RSTRINPT.
- RSTRINPT also deactivates the active input window.
-
- 2. IF THERE IS AN ACTIVE INPUT WINDOW calling INPTWIND re-
- enters it. Arguments for top row (TR%), left column
- (LC%), field width (WD%) and color (ATTR%) are ignored.
- A new input window is NOT made. The active input
- window ( from a previous call to INPTWIND ) is used and
- MUST be intact. The following outlines the suggested
- use for routines INPTWIND and RSTRINPT.
-
- A. Call INPTWIND. Enter data and exit.
-
- B. Check the data.
-
- C. If the data is good proceed to step D. If the data
- is not good go back to step A. As RSTRINPT has not
- been called the input window is still active. A
- new input window will not be made. The existing
- active input window is simply re-entered.
-
- D. Call RSTRINPT. The active input window made in
- step A is deactivated by RSTRINPT. The display
- area covered by the input window may optionally be
- restored. The next call to INPTWIND will make a
- new input window as an active input window will not
- exist.
-
- IF AN ACTIVE INPUT WINDOW UNKNOWINGLY EXISTS ON ENTRY TO
- INPTWIND THE ACTIVE INPUT FIELD WILL BE DISPLAYED. THE
- INPUT WINDOW WILL NOT BE DISPLAYED. THE LOCATION OF THE
- FIELD WILL BE THE LOCATION SET BY THE ACTIVE INPUT WINDOW.
- THE COORDINATES IN THE CALL TO INPTWIND ARE IGNORED. IF
- AN INPUT FIELD IS PLACED AT AN UNEXPECTED SCREEN LOCATION
- ON A CALL TO INPTWIND AN ACTIVE INPUT WINDOW PROBABLY
- EXISTS WHEN IT IS NOT EXPECTED TO EXIST.
-
- Arguments: P$ is the message ( prompt ) which will be
- printed to the left of the input field or in the title
- box of the window, if one is specified. If P$ is
- preceded by a "@" it will be centered in the title box.
-
- CODE$ sets the type of input field and may
- equal the following.
-
- "A" ------ Alpha/numeric. All standard keys are active.
- "U" ------ Alpha/numeric. Upper case.
- "L" ------ Alpha/numeric. Lower case.
-
-
-
- 56
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- "D" ------ Date. A date field it can not be exited
- unless the date is valid or the field is
- blank. The number keys are active.
- Depending on the date format specified in
- the call to INPTINPT, the ".", "/" or "-"
- key will be active also. Valid dates range
- from 01/01/1901 to 12/31/2099, if the width
- of the date field is 10, or 01/01/01 to
- 12/31/99 if the width of the date field is
- 8. SEE DESCRIPTION FOR DATEFORMAT% IN
- ROUTINE "INPTINIT".
-
- "P0" or "0" - Numeric. The value of the string desig-
- "P1" or "1" nates the number of decimal places that
- "P2" or "2" will be returned, even if more or less are
- "P3" or "3" entered. The field can not be exited
- "P4" or "4" unless the number, fixed to the specified
- "P5" or "5" number of decimal places will fit in the
- "P6" or "6" the field, or the field is blank. The
- number keys and minus ("-") sign are active.
- If the number of decimal places is not zero
- the decimal designator ("." or ",") is
- active also. The minus sign will only print
- in the first position of the field. If a
- decimal point is in the field another one
- can not be entered until the previous one is
- deleted.
-
- "PR" or "R" - Real number. All numeric keys, the minus
- sign ("-"), and decimal designator are
- active. The same rules apply as for 0 - 6
- decimal place numbers. The number is not
- fixed to a specified number of decimal
- places, however.
-
- NOTE: A NUMERIC FIELD WILL BE PADDED WITH LEADING ZEROS
- IF CODE$ CONTAINS A "P".
-
- EXAMPLE: CODE$ = "3P" --- This allows numeric input. It
- will return the data expanded, or truncated to, 3 digits
- after the decimal point and padded with leading zeros.
-
- TR% is the top row of the field or window.
- If a window is designated, TR% must be set to allow the
- entire input window fit on the display or an error will be
- reported. Setting TR% to 100 centers the field, or
- window, top to bottom on the display.
-
- LC% is the left column. If a window is
- designated, LC% must equal 1 to 76 . With no window LC%
- must equal 1 to 79 If LC% = 100 the field, or window, is
- centered left to right. If LC% is set so the input field
-
-
-
- 57
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- with a window, if specified, or with a prompt, if
- specified, will not fit on the screen an error will be
- reported.
- WD% is the field's width. A date field must
- have WD%=10 or WD%=8. A numeric field requires WD% to
- be from the number of ( decimal places + 1 ) to 15.
- For an alpha/numeric field WD% can range from 1 to 79
- ( less than 79 if windowed ).
-
- WATTR% is the window's and prompts color.
- SEE THE COLOR ATTRIBUTE CHART IN THE APPENDIX.
-
- FATTR% is the input field's color
- SEE THE COLOR ATTRIBUTE CHART IN THE APPENDIX.
-
- RTRN$ is the string passed to, and returned
- from the input field. A numeric string can be converted
- to a number by using the VAL function.
-
- EXAMPLE: IF RTRN$= "123.123" IT CAN BE CONVERTED TO A
- NUMBER (A) WITH THE STATEMENT:
-
- A = VAL(RTRN$)
- A now equals 123.123
-
- RKEY% is returned by INPTWIND. RKEY%
- represents the key used to exit INPTWIND and is restricted
- to those keys specified in the call to B4INPT ( argument
- INPUTEXIT$ ). RKEY% may equal the following
-
- RKEY% KEY WHICH EXITED INPTWIND
-
- 0 -- RKEY% will equal 0 if the argument INPUTEXIT$ in
- routine B4INPT = "VIEW"
-
- 1 to 10 F1 to F10
- 11 PGUP
- 12 PGDN
- 13 ENTER or the < OK > BUTTON
- 27 ESC or the < CANCEL BUTTON >
-
- NOTE THE FOLLOWING APPLIES TO NO BUTTON INPUT WINDOWS
-
- 14 SHIFT/TAB
- 15 TAB
-
- BUT% allows < OK > and < CANCEL > buttons for
- the input window. Buttons are selected by moving the
- cursor to the button using the tab or shift tab keys. If
- ENTER or the SPACE BAR is pressed and the cursor is on a
- button, the button is selected. If the mouse is released
- with the mouse cursor over a button, the button is
-
-
-
- 58
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- selected. If BUT% = 1 the < OK > button is displayed. If
- BUT% = 2 the < OK > and < CANCEL > buttons are displayed.
- Selecting the < OK > button simulates pressing the ENTER
- key on a selection (RKEY% = 13). Selecting the < CANCEL >
- button simulates pressing ESC (RKEY% = 27). IF BUT% = 1
- the ESC key will not exit unless an "E" is included in
- routine B4INPT's argument INPUTEXIT$. Using buttons
- affects the length ( number of rows ) of the input window
- as follows.
-
- ( ----------- INPUT WINDOW TYPE ----------- )
-
- UN-WINDOWED --------- WINDOWED ---------
- BUTTONS SINGLE LINE W/TITLEBOX WITHOUT TITLEBOX
-
- 0 1 ROW 5 ROWS 3 ROWS
- 1 or 2 2 ROWS 9 ROWS 7 ROWS
-
- NOTE: IF A WINDOW SHADOW IS SPECIFIED FOR WINDOWED INPUT
- FIELDS, THE NUMBER OF ROWS IS INCREASED BY ONE.
-
- BRDR% is the input window's border. ( SEE
- THE BORDER DESIGNATION CHART ). If BRDR% = 0 and BUT% = 0
- a single line input field ( no window ) is generated. If
- BRDR% produces a title box window, the prompt (P$) is
- printed in the title box.
-
-
- 4.03 RSTRINPT ( RESTOREFLAG% )
- See: Example - Input window
-
- Description: Deactivates the active input window generated
- by a call to routine INPTWIND. Optionally restores the
- display area under the input window. After a call to
- INPTWIND an active input window exists. Subsequent calls
- to INPTWIND behave differently if, on entry, an active
- input window exists.
-
- Argument: RESTOREFLAG% must equal 1 to restore the
- display area ( saved by routine INPTWIND ) under the
- active input window. If RESTOREFLAG% equals 0 the
- area under the active input window is not restored to the
- display. REGARDLESS OF THE VALUE OF RESTOREFLAG% ALL
- CALLS TO RSTRINPT DEACTIVATE THE ACTIVE INPUT WINDOW.
-
- EXAMPLES:
-
- 1. CALL RSTRINPT (1) 'DEACTIVATES ACTIVE INPUT WINDOW
- 'AND RESTORES DISPLAY AREA UNDER IT.
-
- 2. CALL RSTRINPT (0) 'DEACTIVATES ACTIVE INPUT WINDOW.
-
-
-
-
- 59
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- NOTE1: IF AN INPUT WINDOW REMAINS ON THE DISPLAY AND IT IS
- NOT THE ACTIVE INPUT WINDOW, RSTRINPT CAN NOT RESTORE THE
- DISPLAY AREA UNDER IT. RSTRINPT CAN ONLY RESTORE THE
- DISPLAY AREA UNDER THE ACTIVE INPUT WINDOW.
-
- NOTE2: THE ACTIVE INPUT WINDOW ( THE SAVED DISPLAY AREA )
- RESIDES IN WINDOW NUMBER 21. FUNCTION WAVAIL% CAN
- DETERMINE IF AN INPUT WINDOW IS ACTIVE.
-
- EXAMPLE: IF WAVAIL%(21) = 0 ' An input window is active.
- IF WAVAIL%(21) = 1 ' An input window is not
- ' active.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 60
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- -----------------------------------------------------------------
- ' SAMPLE: Input window
- ' IT IS ASSUMED ROUTINE SETWIND HAS BEEN CALLED.
- ' BEFORE ANY CALLS TO INPTWIND, INPTINIT MUST BE CALLED.
-
- ' DATE FORMAT = "MM-DD-YYYY" OR "MM-DD-YY"
- ' DECIMAL DESIGNATOR IS A "." -- CURSOR ENTERS FIELD IN POS. 1
- ' FIELD BLANK ON FIRST KEY PRESSED. -- SOUND MADE FOR BAD KEY
- CALL INPTINIT ( 1, 1, 1, 1, 1 )
-
- '
- '
- DO
- ' NUMERIC INPUT - 0 DECIMAL PLACES.
- ' INPUT WINDOW CENTERED ROW AND COLUMN.
- ' FIELD WIDTH = 2.
- ' WINDOW = BLACK ON WHITE. FIELD = INTENSITY WHITE ON BLACK.
- ' WINDOWED WITHOUT A TITLE BOX - PROMPT TO LEFT OF INPUT FIELD.
- ' <OK> AND <CANCEL> BUTTONS
- ' THE FOLLOWING CALL TO INPTWIND MUST BE ON ONE LINE IN THE QB/QBX
- ' /VBDOS EDITOR.
- CALL INPTWIND ("Enter a number 1 to 50: ", "0", 100, 100, 2, 112,
- 15, RTRN$, RKEY%, 2, 1 )
-
- ' RKEY% REPRESENTS KEY USED TO EXIT INPTWIND .
- ' RTRN$ IS THE ENTERED TEXT.
-
- ' RKEY% = 27 IF ESC PRESSED OR < CANCEL > SELECTED
- IF RKEY% = 27 THEN PRINT "ESC PRESSED OR CANCEL SELECTED":END
-
- R% = VAL(RTRN$)
-
- ' WAS BAD INPUT. GO BACK TO INPTWIND. AS RSTRINPT HAS NOT BEEN
- ' CALLED THE INPUT WINDOW REMAINS ACTIVE. IT WILL NOT BE RE-
- ' PRINTED. IT IS RE-ENTERED ONLY.
-
- LOOP WHILE R% < 1 OR R% > 50 ' BAD INPUT
-
- ' WAS GOOD INPUT - RSTRINPT DEACTIVATES ACTIVE INPUT WINDOW AND
- ' RESTORES DISPLAY AREA UNDER SAME.
- ' *** IF RSTRINPT IS NOT CALLED, ON THE NEXT CALL TO INPTWIND AN
- ' *** ACTIVE INPUT WINDOW WILL STILL EXIST. INPTWIND WILL IGNORE
- ' *** VALUES FOR TOP ROW, LEFT COLUMN, WIDTH AND COLOR AND USE THE
- ' *** VALUES FROM THE ACTIVE INPUT WINDOW. FORGETTING TO CALL
- ' *** RSTRINPT TO DEACTIVATE AN ACTIVE INPUT WINDOW MAY THEREFOR
- ' *** PRODUCE UNEXPECTED RESULTS.
-
- CALL RSTRINPT (1)
- LOCATE 1, 1
- PRINT RTRN$ +" WAS ENTERED!"
- END
- -----------------------------------------------------------------
-
-
-
- 61
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Multi-field Input Overview
-
- The following is an overview of the procedures required to
- generate a MULTI-FIELD input screen. The procedures are
- listed in the order they must be used.
-
-
- 1. Call routine INPTINIT. This sets global variables for all
- input routines. It is only necessary to call INPTINIT
- once in every program.
-
- 2. Call routine SETINPT. This sets the properties for an
- individual MULTI-FIELD input screen. SETINPT must be
- called once for every MULTI-FIELD input screen.
-
- 3. Call routine MAKEFIELD to define each field in the MULTI-
- FIELD input screen.
-
- 4. Call routine MULTINPT to display the input fields and
- receive user input for an individual MULTI-FIELD input
- screen. For repeated calls to MULTINPT for a predefined
- MULTI-FIELD input screen it is not necessary to repeat
- steps 1, 2, and 3. Once a MULTI-FIELD input screen is
- defined it remains defined for subsequents calls to
- MULTINPT as long as a CLEAR statement has not been
- executed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 62
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 4.04 SETINPT ( SCRN%, DISPLEN%, EXIT$, HOTCOL% )
-
- Description: Defines a multi-field input screen, which will
- be utilized by a subsequent call to routine MULTINPT.
-
- Arguments: SCRN% is the number of the screen being
- defined. SCRN% may range from 1 to 10.
-
- DISPLEN% is the length of the screen ( rows )
- which will be in effect when the multi-field input screen
- for the designated screen number is called. DISPLEN% must
- equal 25, 43, or 50. When MULTINPT for this input screen
- is called the current screen rows must equal those
- specified in the call to SETINPT for the same input screen
- or an error will be reported.
-
- EXIT$ is a code for the keys, or mouse
- condition which will exit the multi-field input routine
- for the designated screen number. EXIT$ may be any
- combination of "0123456789EUDO". To make the function
- keys active place their number "1","2" etc in EXIT$. A
- "0" ( zero ) represents the F10 key, a "D" the PGDN key ,
- a "U" the PGUP key and an "E" the ESC key. The letter "O"
- in EXIT$ will cause routine MULTINPT to be exited if the
- left mouse button is pressed while the mouse cursor is NOT
- in a field.
-
- EXAMPLE: IF EXIT$ ="03U" THE F10, F3, OR PGUP KEYS WILL
- EXIT THE MULTI-FIELD INPUT ROUTINE ( MULTINPT ).
-
- NOTE: If THE ESC KEY IS NOT USED AS AN EXIT KEY IT IS
- USED TO RETURN THE TEXT OF A FIELD IN MULTINPT TO IT'S
- PRE-EDITED STATE. THIS FEATURE IS DISABLED WHEN ESC IS
- USED AS AN EXIT KEY THE SPACE BAR CAN ALSO BE AN EXIT
- KEY FOR INDIVIDUAL FIELDS IN MULTINPT IF A FIELD IS A
- FIXED CHOICE FIELD. SEE THE DESCRIPTION FOR ARGUMENT
- CODE% IN ROUTINE MAKEFIELD TO USE FIXED CHOICE FIELDS.
-
- HOTCOL% sets the color of "key characters"
- for fields defined in subsequent calls to MAKEFIELD for
- the specified multi-field input screen. Key characters
- may be used to move the cursor to a specific field if the
- key character for that field is pressed. Although key
- characters may be used to move the cursor to an editable
- input field, key characters are ignored while in an
- editable field ( the characters are assumed to be input ).
- Editable input fields allow input. "Fixed choice" fields
- which may be used as BUTTONS or for multiple choices are
- not editable.
-
-
-
-
-
-
- 63
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 4.05 MAKEFIELD ( SCRN%, FLD%, CODE%, TR%, LC%, WD% INACTIVEATTR%,
- ACTIVEATTR%,MOUSEATTR%,RES$,EXTO$,HOTPOS%,CURPOS%,BRACKET%)
-
- NOTE1: THE ABOVE CALL TO MAKEFIELD MUST BE ON ONE LINE IN THE
- QB/QBX ENVIRONMENT.
-
- NOTE2: ROUTINE SETINPT FOR THE DESIGNATED MULTI-FIELD SCREEN
- NUMBER ( SCRN% ) MUST BE CALLED PRIOR TO CALLING THIS ROUTINE.
-
- Description: Makes input, fixed choice, or button fields
- for a multi-field input screen previously defined in call
- to routine SETINPT. The fields will be used in a
- subsequent call to MULTINPT.
-
- Arguments: SCRN% is the multi-input screen for which
- this routine is making a field. The multi-input screen
- MUST have been previously defined by a call to routine
- SETINPT.
-
- FLD% is the field number being made. The
- order in which fields are made, determine the order of
- input. Field number 2 can not be made unless field number
- one has been previously made. If a field is made for a
- specified multi-input screen, and the field already
- exists, the existing field is replaced with the new one.
- FLD% may range from 1 to 150.
-
- CODE% is the code for type of input field
- and can be set to any of the following.
-
- 0 to 6 ----- The field is numeric with the indicated
- number of decimal places.
-
- 10 to 16 --- The field is numeric with padded zeros.
- Subtract 10 to obtain the number of decimal
- places.
-
- 30 --------- The field is numeric. It is to be used for
- real numbers.
-
- 40 --------- The field is numeric and padded with leading
- zeros. It is to be used for real numbers.
-
- 7 ---------- The field is alpha/numeric.
- 8 ---------- The field is a date field.
- 17 --------- The field is alpha/numeric. (upper case)
- 27 --------- The field is alpha/numeric. (lower case)
-
- SEE ROUTINE "INPTWIND", ARGUMENT CODE$, FOR A DESCRIP-
- TION AND INPUT LIMITATIONS FOR FIELDS BASED ON THEIR
- DESIGNATION.
-
-
-
-
- 64
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Adding 100 to CODE% makes the field protected. A
- protected field will be displayed but can not be
- edited. A protected field can not be an Auto-advance
- or Auto-exit field. If a protected field is defined as
- an Auto-exit or Auto-advance field the definition is
- ignored and the field remains a protected field.
-
- Adding 1000 to CODE% makes the field an Auto-advance
- field. When the cursor reaches the end of an Auto-
- advance field, via typing a character, it moves to the
- next field. ( User defined order. )
-
- Adding 10000 to CODE% makes the field an "Auto-exit"
- field. The multi-field input routine will be exited
- whenever the cursor is moved from an "Auto-exit" field.
-
- Adding 30000 to CODE% makes the field a "Fixed choice"
- field. Multi-field input routine, MULTINPT, will be
- exited if the space bar is pressed on, or if the cursor
- is moved from a "fixed choice" field. MULTINPT will also
- be exited if the mouse cursor is in a fixed choice field
- and the left mouse button is simultaneously released.
- This in makes the field an auto-exit field. The
- description for the procedure MULTINPT describes the
- details of a "fixed choice" field.
-
- Fixed choice fields provide several opportunities.
-
- 1. If a field is made a "fixed choice" field it may be
- used as a "button field". Routine MULTINPT is exited
- when the SPACE BAR is pressed while the cursor is in
- the field or when the left mouse button is released and
- the mouse cursor is in the field. This emulates
- buttons. EX: CODE%=30007
-
- 2. If a field is made a "fixed choice" field and also
- defined as protected ( CODE% = 30100 ) the field is a
- "mouse only selectable field". The cursor can not be
- moved to a "mouse only selectable field" as it
- protected ( 100 has been added to CODE% ). A "mouse
- only selectable field" may appear as < F1 = EXIT >.
- Routine MULTINPT will exit whenever the mouse cursor is
- in it and the left mouse button is released. If the
- field appears as < F1 = EXIT > and F1 is an "exit key"
- ( from routine SETINPT ) users without a mouse may exit
- MULTINPT by pressing F1. Users with a mouse may use
- the mouse or press F1 to exit. EX: CODE%=30100
-
- 3. If a field is made a "fixed choice" field it may be
- used for fixed choices. If the space bar is pressed
- while the system cursor is in the field, or if the left
- mouse button is released while the mouse cursor is in
-
-
-
- 65
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- the field routine MULTINPT is exited. The field may be
- updated with a different choice ( text ) and updated.
- Routine MULTINPT is then re-entered. EX: CODE%=30007
-
- EXAMPLE: If CODE%= 11017 THEN CODE% = 10000+1000+17.
- THE FIELD IS ALPHA/NUMERIC ( UPPER CASE ), AUTO-ADVANCE
- AND "AUTO-EXIT".
-
- ** SEE THE MULTI-FIELD CODE CHART IN THE APPENDIX.**
-
- TR%, LC%, and WD% are the same as in INPTWIND.
- They represent the field's row position, column position
- and width. As in routine INPTWIND the width is dependent
- on the field type. ( SEE ROUTINE INPTWIND )
-
- INACTIVEATTR% is the field's color when the
- field is inactive. The field is inactive when the system
- cursor is NOT in it.
-
- ACTIVEATTR% is the field's color when the
- field is active. The field is active when the system
- cursor is in it.
-
- MOUSEATTR% is the field's color when the
- field is occupied by the mouse cursor and the left mouse
- button is pressed. Usually "button" and "mouse
- selectable" fields require a different color ( from
- INACTIVEATTR% ) in MOUSEATTR%.
-
- RES$ defines the allowable characters
- in a restricted field. If the field is not set to
- alpha/numeric by CODE%, RES$ is ignored. Setting RES$ to
- "YN" and CODE% TO 17 ( UPPER CASE ) allows the field to
- respond to Y,y,N or n. If CODE% = 7 ( UPPER AND LOWER
- CASE ) and RES$ ="YN" the field is restricted to Y or N.
- IF CODE%=27 ( LOWER CASE ) and RES$ ="YN" the field will
- not allow any characters. If RES$ = "" the field is not
- restricted and will respond to characters predicated on
- the value of CODE%.
-
- NOTE: IT IS ONLY NECESSARY TO USE RES$ FOR NON-STANDARD
- FIELDS. SET RES$ TO "" FOR NORMAL ALPHA/NUMERIC FIELDS
- OR THE RESULT WILL BE EXTRA CODE AND MEMORY USAGE. IF
- THE FIELD IS STANDARD ALPHA/NUMERIC MAKE CODE% = 7 AND
- RES$ = "". THIS WILL ALLOW UPPER/LOWER CASE ALPHA/NUM-
- ERIC INPUT.
-
-
- EXAMPLE: RES$ = "0123456789-( )"
-
- THIS RESTRICTS INPUT TO CHARACTERS INCLUDED IN
- A PHONE NUMBER WITH THE AREA CODE.
-
-
-
- 66
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- EXTO$ sets the "exit to character" for the
- field. An "exit to character" defines a key, when
- pressed, which will exit to the field. If EXTO$ = "A" for
- a field and an "A" is pressed while the cursor is in a
- non-editable ( fixed choice ) field, routine MULTINPT is
- exited. MULTINPT's argument ( TOFLD% ) which points to
- the next active field will point to the field number with
- EXTO$ = "A". Make EXTO$ ="" if "exit to characters" are
- not used.
-
- NOTE: IF MORE THAN ONE FIELD HAS THE SAME "EXIT TO
- CHARACTER" ( EXTO$ ) ONLY THE FIRST FIELD IS FOUND. DO NOT
- USE THE SAME "EXIT TO CHARACTER" FOR MORE THAN ONE FIELD.
-
- HOTPOS% is the position of the character of
- text in the field which will assume the "key character"
- color set by routine SETINPT. This "key character" may be
- used as the "exit to character". If HOTPOS% = 0 or
- HOTPOS% is greater than the strings length a differently
- colored "key character" will not be displayed. HOTPOS%
- only applies to "fixed choice fields".
-
- CURPOS% determines the position the cursor
- will occupy in fixed choice fields when the field is
- active. If CURPOS% = 0 or CURPOS% is greater than the
- fields width the cursor will go to the position as
- specified by the call to INPTINIT.
-
- BRACKET% is used to set the first and last
- characters of text in the field to the color, BRACKETATTR%
- as defined by routine SETWIND. It is only appropriate for
- "fixed choice" fields. If BRACKET% = 1 the first and last
- character of text in the field assume the BRACKETATTR%
- color defined in routine SETINPT. This is only true when
- the field is the active field. This is useful for button
- field such as "< OK >".
-
-
- 4.06 MULTINPT ( SCRN%, TOFLD%, OPT$, FROMFLD%, RKEY%, RTRN$() SEL%)
-
- NOTE1: ROUTINE INPTINIT MUST BE CALLED AT LEAST ONCE IN ANY
- PROGRAM PRIOR TO CALLING THIS ROUTINE.
-
- NOTE2: ROUTINE SETINPT ( FOR THIS SCREEN - SCRN%) MUST BE
- CALLED SOMETIME IN THE PROGRAM PRIOR TO THIS CALL.
-
- Description: Displays input fields defined in a previous
- call to SETINPT. Fields are available for full editing
- Returns edited strings to the calling program.
-
- Arguments: SCRN% is the number ( 1 to 10 ) of the
- multi-field input screen to display.
-
-
-
- 67
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- TOFLD% serves two purposes.
-
- 1. When entering MULTINPT, TOFLD% determines which field
- will be the active field ( the one with the cursor ).
- It may range from one to the last field as designated
- by SETINPT. On entry to MULTINPT the field represented
- by TOFLD% is always updated.
-
- 2. When exiting MULTINPT, TOFLD% points to the next field
- the cursor would normally occupy. If a field is an
- auto-exit field and the down arrow is pressed, MULTINPT
- will be exited. TOFLD% will point to the field the
- cursor would normally occupy via the down arrow being
- pressed. This enables MULTINPT to be exited by an
- auto-exit field and re-entered at the correct field.
- If the field is a fixed choice field and the space bar
- is pressed, TOFLD% will point to the fixed choice field
- This is the field the cursor occupied before MULTINPT
- was exited.
-
- OPT$ specifies properties of the multi-field
- input screen. OPT$ may equal the following.
-
- "VIEW" ------ On entry MULTINPT will fill a single field
- or all fields with their respective data.
- MULTINPT is then exited. This is useful
- for viewing a multi-field screen and
- exiting routine MULTINPT.
-
- "U" ---------- This changes the normal field to field
- movement of the cursor when using the TAB,
- SHIFT TAB, RIGHT ARROW, AND LEFT ARROW
- keys to user defined order. User defined
- order is the same order as fields are
- defined in routine MAKEFIELD. The TAB and
- RIGHT ARROW keys follow user defined order
- ( same as ENTER or DOWN ARROW ). The SHIFT
- TAB and LEFT ARROW keys follow reverse user
- defined order ( same as UP ARROW ).
-
- ---------- All other string values for OPT$ have no
- effect on the multi-field input screen.
-
- FROMFLD% also serves two purposes.
-
- 1. If FROMFLD% is set to zero, MULTINPT, when entered,
- will update all fields. If FROMFLD%% is set from one
- to the last field number only the specified field is
- updated. This allows quick exiting from, and re-
- entering of MULTINPT.
-
-
-
-
-
- 68
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 2. When MULTINPT is exited FROMFLD% is set to the last
- field that was available for input prior to the exit.
-
- NOTE: ALTHOUGH THE MOUSE MAY MOVE THE INPUT CURSOR TO
- SEVERAL FIELDS PRIOR TO RELEASING THE LEFT MOUSE
- BUTTON, FROMFLD% POINTS TO THE LAST FIELD AVAILABLE FOR
- INPUT. IT DOES NOT POINT TO ANY OF THE FIELDS THE
- INPUT CURSOR MAY HAVE OCCUPIED WHILE THE LEFT MOUSE
- BUTTON WAS PRESSED.
-
- It is important to distinguish FROMFLD% from argument
- TOFLD% which points to the NEXT field the cursor would
- normally occupy.
-
- RKEY% returns a value designation for the
- key or feature which caused MULTINPT to be exited or auto-
- exited. MULTINPT exits when a valid exit key (specified
- in the call to SETINPT for the multi-field input screen)
- is pressed. MULTINPT is auto-exited whenever the cursor
- is moved out of an auto-exit field, or fixed choice
- field. MULTINPT is also auto-exited when the SPACE BAR is
- pressed with the cursor in a fixed choice field. RKEY%
- may equal:
-
- 1 to 10 Exit keys, F1 to F10, caused MULTINPT to be
- exited. MULTINPT was not exited by the auto-exit
- feature although the field the cursor occupied on
- exit may have been an auto-exit field.
-
- 11 ----- Exit key, PGUP, caused MULTINPT to be exited.
- MULTINPT was not exited by the auto-exit feature
- although the field the cursor occupied on exit
- may have been an auto-exit field.
-
- 12 ----- Exit key, PGDN, caused MULTINPT to be exited.
- MULTINPT was not exited by the auto-exit feature
- although the field the cursor occupied on exit
- may have been an auto-exit field.
-
- 13 ----- The RETURN key caused MULTINPT to be auto-exited.
- The field must have been an auto-exit field.
-
- 14 ----- SHIFT TAB or the LEFT ARROW caused MULTINPT to be
- auto-exited. The field must have been an
- auto-exit field.
-
- 15 ----- The TAB key or RIGHT ARROW caused MULTINPT to be
- auto-exited. The field must have been an auto-
- exit field.
-
- 16 ----- The UP ARROW caused MULTINPT to be auto-exited.
- The field must have been an auto-exit field.
-
-
-
- 69
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 17 ----- The CONTROL-HOME combination caused MULTINPT to
- be auto-exited. The field must have been an
- auto-exit field.
-
- 18 ----- The CONTROL-END combination caused MULTINPT to be
- auto-exited. The field must have been an auto-
- exit field.
-
- 19 ----- The DOWN ARROW caused MULTINPT to be auto-exited.
- The field must have been an auto-exit field.
-
- 20 ----- The AUTO-ADVANCE feature caused MULTINPT to be
- auto-exited. The field must also be an auto-exit
- field. This occurs when the text fills a auto-
- advance, auto-exit, field.
-
- 27 ----- Exit key, ESC, caused MULTINPT to be exited.
- MULTINPT was not exited by the auto-exit feature
- although field the cursor occupied on exit may
- have been an auto-exit field.
-
- 32 ----- The SPACE BAR caused MULTINPT to be auto-exited.
- The field occupied by the cursor on exit must have
- been a fixed choice field which is always an auto-
- exit field.
-
- 50 ----- The cursor was in a fixed-choice field ( code =
- 3xxxx ) and a field "exit to character" was
- pressed. ( SEE ARGUMENT EXTO$ FOR ROUTINE
- MAKEFIELD.)
-
- 100 ---- The mouse selected a new field. THE MOUSE WAS
- RELEASED IN THE NEW FIELD. The last field that
- was available for input was an auto-exit field.
-
- 200 ---- The mouse was PRESSED outside of a field. RKEY%
- can only equal 200 if argument EXIT$ from
- routine SETINPT specified an exit when the mouse
- is pressed out of a field.
-
- 300 ---- The mouse selected a new field AND the mouse was
- RELEASED outside of the field. The last field
- available for input was an auto-exit field.
-
- RTRN$() is a string array which holds the
- data to be edited. Elements of RTRN$() will be
- displayed in the appropriate fields. RTRN$(1) will be
- displayed in field 1 and so on. Make sure there is not
- a RTRN$(0) as it will not be displayed. If a field is
- numeric, the number to be placed in it must be converted
- to a string. Convert the number (A) to a string as
- follows: RTRN$(2) = STR$(A)
-
-
-
- 70
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- When MULTINPT is exited RTRN$() holds the data in it's
- edited state.
-
- On entering MULTINPT, if the field is designated as
- alpha/numeric and the string will not fit in the field
- it will be truncated to fit. If the field is numeric
- and a number formatted to the correct number of decimal
- places will not fit in the field, "*"'s will be printed.
- This will not pose a problem if RTRN$() is initialized
- via MULTINPT, as MULTINPT will not allow the user to
- input data longer than the field's width. If a numeric
- field is entered with an alpha string the string will
- print in the field. It is the programmer's responsibility
- to assure numeric fields contain numeric strings. IF
- A FIELD IS NUMERIC WITH 4 DECIMAL PLACES SETTING THE
- FIELD TO EQUAL "DOG", WILL RESULT IN DOG.0000 BEING
- DISPLAYED!
-
- Use caution if a field is a result of calculation, as
- the result may be in exponential format. EXAMPLE:
-
- A = 1 B = 14 C = A/B
-
- STR$(C) = "7.142857E-02". If the field is numeric with
- four decimal places and set to equal STR$(C) it will
- print as 7.1428, and not as .0714.
-
- To following routine corrects numbers in expoential form
- for both large and small numbers. A$ is the numeric
- string to be displayed in a field.
-
- IF INSTR(3, A$, "+") THEN A$ = "9999999999999999"
- REM: THE NUMBER WAS TOO LARGE ( EX: 2.2D+22 ). SET TO
- REM: "9999999999999999" AND "*"'s WILL BE DISPLAYED.
-
- IF INSTR(3, A$, "-") THEN
- A# = VAL(A$): A# = A# + SGN(A#): A$ = STR$(A#)
- IF ABS(A#) > 1 THEN
- A$ = MID$(A$, INSTR(A$, "."))
- IF A# < 1 THEN A$ = "-" + A$
- ELSE
- A$="0"
- END IF
- END IF
- REM: THE NUMBER WAS TOO SMALL. IF A$ = "3.33D-4",
- REM: A$ WILL NOW = ".000333"
-
- SEL% returns a value if the exit from routine
- MULTINPT was caused by the mouse selecting a "mouse only
- selectable field". SEL% will equal the field number of
- the "mouse only selectable field" selected by the mouse
- and argument RKEY% will equal 100 indicating the left
-
-
-
- 71
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- mouse button was released in the field. When MULTINPT
- is exited by a "mouse only selectable field" argument
- TOFLD% points to the last field occupied by the system
- cursor. "Mouse only selectable fields" can not be occupied
- by the system cursor.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 72
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ---------------------------------------------------------------
- FIELD EDITING FEATURES FOR "MULTINPT" AND "INPTWIND"
- ( * = AVAILABLE FOR "MULTINPT" ONLY. )
- ---------------------------------------------------------------
- KEY FUNCTION
-
- SPACE BAR ERASES FIELD - IF IT IS THE FIRST KEY PRESSED.
-
- *UP ARROW MOVES THE CURSOR FROM FIELD TO FIELD AS DETER-
- *DOWN ARROW MINED BY THE ORDER DEFINED IN "SETINPT." THE
- DOWN ARROW MOVES THE CURSOR IN ASCENDING FIELD
- ORDER. THE UP ARROW MOVES IT IN DESCENDING
- FIELD ORDER. PROTECTED FIELDS ARE SKIPPED.
-
- *CTRL END MOVES THE CURSOR TO THE FIRST OR LAST FIELD AS
- *CTRL HOME DESIGNATED BY THE ORDER DEFINED IN "SETINPT".
-
- *TAB MOVES THE CURSOR FROM FIELD TO FIELD HORIZONT-
- *SHIFT TAB ALLY. TAB MOVES LEFT TO RIGHT, SHIFT TAB MOVES
- RIGHT TO LEFT. PROTECTED FIELDS ARE SKIPPED.
-
- CTRL E ERASES THE FIELD.
-
- ESC RETURNS A FIELD TO IT'S PRE-EDITED STATE OR
- EXITS "MULTINPT". EXITS "INPTWIND" WITH PRE-
- EDITED STRING. ESC EXITS "MULTINPT" IF THE
- ESC KEY WAS DESIGNATED AS AND EXIT KEY BY
- "SETINPT" ( FIELD NOT RESTORED TO PRE-EDITED
- STATE ).
-
- ENTER EXITS "INPTWIND". SAME AS DOWN ARROW FOR
- RETURN "MULTINPT".
-
- END MOVES THE CURSOR TO THE FIRST OR LAST POSITION
- HOME OF TEXT WITHIN A FIELD.
-
- BACKSPACE DELETES THE CHARACTER TO THE LEFT OF CURSOR.
-
- DELETE DELETES THE CHARACTER UNDER THE CURSOR AND
- SHIFTS CHARACTERS LEFT.
-
- INSERT TOGGLES FROM INSERT TO OVERSTRIKE MODE. IF MODE
- IS OVERSTRIKE THE CURSOR IS LARGE. INSERT MODE
- IS THE DEFAULT EVERY TIME A FIELD IS ENTERED.
-
- RIGHT ARROW MOVES THE CURSOR LEFT OR RIGHT. ACTS THE SAME
- LEFT ARROW AS TAB OR SHIFT TAB FOR "MULTINPT" IF THE
- CURSOR IN POSITION 1 AND THE LEFT ARROW IS
- PRESSED, OR THE CURSOR IS AT THE END OF THE
- TEXT AND THE RIGHT ARROW IS PRESSED.
-
-
-
-
-
- 73
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 4.07 UPDATEFIELD ( SCRN%, FLD%, TEXT$ )
-
- Description: Updates a field in a multi-field input screen
- generated by routine MULTINPT.
-
- NOTE1: THE FIELD TO UPDATE MUST BE DISPLAYED ON THE
- SCREEN. IF IT IS NOT DISPLAYED THIS ROUTINE WILL PRINT
- IT'S TEXT AT THE LOCATION THE FIELD WOULD NORMALLY OCCUPY.
-
- NOTE2: ONLY THE FIELD IS UPDATED. IT IS THE PROGRAMMER'S
- RESPONSIBILITY TO UPDATE THE ELEMENT OF THE ARRAY HOLDING
- THE FIELD'S DATA IN ROUTINE MULTINPT. ( SEE ARGUMENT
- RTRN$() IN ROUTINE MULTINPT )
-
- Arguments: SCRN% is the screen number ( 1 to 10 ) of the
- multi-field input screen. ( SEE ROUTINES SETINPT AND
- MULTINPT ). If SCRN% is not a valid screen number or it
- is a screen number which has not been pre-defined by
- routine SETINPT the call to UPDATEFIELD is ignored.
-
- FLD% is the field number of the field to
- update. FLD% must be a valid field number for the
- specified multi-input screen ( SCRN% ) or the call to
- UPDATEFIELD is ignored.
-
- TEXT$ is the text to print in the field.
-
-
- 4.08 GETANS (PROMPT$,CHOICE$,ANS$,TR%,LC%,WATTR%,FATTR%,BORDER%)
-
- Description: Generates a prompt with an optional window
- and pauses, waiting for a single key reply. The key may
- be any key or an individual key selected from a definable
- list. The prompt may be windowed or on a single line.
- The key pressed may, or may not be displayed. If it is
- displayed ENTER must be pressed to finalize the selection
- is optional.
-
- NOTE: THERE ARE TWO MODES OF OPERATION FOR THIS ROUTINE.
- SEE THE DESCRIPTION FOR THE ARGUMENT ANS$ FOR DETAILS.
-
- Arguments: PROMPT$ is the prompt ( i.e. Press any key )
- or question ( i.e. Are you sure? Y/N ). It may be
- optionally windowed ( SEE BORDER% ). The width of the
- window is determined by the length of PROMPT$. If
- PROMPT$ is too long making the window, or prompt, too
- wide to fit on the screen an error will be reported.
-
- CHOICE$ is the valid keys the user can
- press to exit GETANS. If CHOICE$ = "" any key will
- exit. This would be appropriate if PROMPT$ = "Press any
- key". If CHOICE$ = "YN" then the "Y", "y", "N" or
-
-
-
- 74
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- "n" keys will exit GETANS. The ESC key will always exit
- regardless of CHOICE$.
-
- ANS$ serves two purposes. On entry ANS$
- determines the mode of operation for routine GETANS.
- There are two modes of operation for this routine.
-
- 1. If argument ANS$ = "" on entry, as soon as a valid key
- is pressed the routine is exited.
-
- EXAMPLE: ANS$ = ""
- CALL GETANS ( PROMPT$, "YN", ANS$ ......
-
- As soon a "Y" or "N" is pressed the routine is exited
- with the key pressed returned in ANS$
-
- 2. If argument ANS$ equals any letter on entry the letter
- is displayed in the get answer window to the right of
- the prompt. The user may press any valid key
- predicated on argument CHOICE$. The letter represented
- by the valid key is displayed in the get answer window.
- The user must press ENTER to accept the choice.
-
- EXAMPLE: ANS$ = "N"
- CALL GETANS ( PROMPT$, "YN", ANS$........
-
- On entry an "N" will appear after the prompt. If a
- "Y" is pressed it will appear after the prompt. The
- user must press ENTER to exit the routine with the
- displayed letter returned in ANS$.
-
- On exit ANS$ holds the key pressed. It is returned in
- upper case. If CHOICE$ = "" then ANS$ = "". If ESC is
- pressed CHR$(27) is always returned in ANS$.
-
- TR% is the top row. See MAKEWIND
-
- LC% is the left column. See MAKEWIND
-
- WATTR% is the window's and text's color
- designation. See MAKEWIND. Although it is permissible to
- set ATTR% > 127 to make the border flash the text will not
- flash.
-
- FATTR% is the field's ( if one exists )
- color. If ANS$ equals a letter, on entry, the letter is
- displayed next to the prompt. The color of this letter is
- set by FATTR%.
-
-
-
-
-
-
-
- 75
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- BORDER% is the window's border designation.
- Title boxes ( BORDER% > 42 ) are not permitted. Set
- BORDER% to 0 for no window ( prompt only ). SEE THE
- BORDER DESIGNATION CHART.
-
- EXAMPLE OF A CALL TO GETANS:
-
- ANS$ = ""
- CALL GETANS ("Are you sure? Y/N", "YN", ANS$, 100, 100,
- 240, 11)
- ( Above must be on one line. )
-
- A window will be generated with the text "Are you sure?
- Y/N" printed in it. With TR% and LC% set to 100 the
- window will be centered on the screen ( See MAKEWIND ).
- ATTR% = 240, therefore, the window will be white with
- black text and a black flashing border. The user may
- press the N, n, Y, y, or ESC keys to exit. The key
- pressed will be returned to GETANS in the argument ANS$.
-
-
- 4.09 CHOICEWIND% (T$,TXT$(),CH$(),TR%,LC%,ATTR%,HATTR%,ESC%,BRDR%)
- ( CHOICEWIND% is a function )
-
- NOTE: ROUTINES INPTINIT AND SETWIND MUST BE CALLED AT LEAST
- ONCE IN ANY PROGRAM PRIOR TO CALLING THIS ROUTINE.
-
- Description: Displays a window containing text. The
- window also displays up to ten choices. A choice may be
- selected by using the TAB or SHIFT/TAB key to move the
- cursor to the choice and pressing ENTER or the SPACE BAR.
- A choice may also be selected by RELEASING the left mouse
- button while the mouse cursor is on the choice. The
- choice window's height is determined by the number of
- lines of text in it. The choice window's width is
- determined by the longest line of text or the width of the
- choices, whichever is greatest. CHOICEWIND% returns the
- number of the selection made by the user, or 27 if ESC is
- pressed and argument ESC% > 0.
-
- Arguments: T$ is the windows title. Based on the value
- of BRDR% ( SEE MAKEWIND ), T$ will print in the window's
- title box or on the window's top border.
-
- TEXT$() is an array holding the text for each
- line in the choice window. TEXT$(1) prints as line one in
- the choice window. TEXT$(2) prints as the second line in
- the choice window. Each element of TEXT$() represents a
- line in the choice window.
-
- NOTE: TEXT$() DETERMINES THE NUMBER OF LINES IN THE CHOICE
- WINDOW. IF TEXT$()'s UPPER BOUND IS TEN ( EX: REDIM
-
-
-
- 76
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- TEXT$(10) ), TEN LINES WILL BE PRINTED IN THE CHOICE
- WINDOW. If TEXT$()'s UPPER BOUND IS ZERO ( EX: REDIM
- TEXT$(0) ), NO LINES OF TEXT WILL PRINT IN THE CHOICE
- WINDOW. THIS MAY BE APPROPRIATE IF THE CHOICE WINDOW'S
- TITLE ( ARGUMENT T$ ) IS THE ONLY PROMPT REQUIRED.
-
- The following applies to TEXT$();
-
- 1. TEXT$ must ALWAYS be dimensioned prior to any call to
- CHOICEWIND%. If no text is used TEXT$() must be
- dimensioned to zero. ( EX: REDIM TEXT$(0) )
-
- 2. If an element of TEXT$() has a "@" as the first
- character, the text will be centered in the choice
- window.
-
- 3. If an element of TEXT$() = "" a blank line will be
- printed in the choice window.
-
- 4. If an element of TEXT$() = "-" a segmenting single line
- will print across the choice window.
-
- NOTE: TEXT$() IS ERASED BY THE CALL TO CHOICEWIND TO
- CONSERVE MEMORY. TEXT$() MUST BE REDIMENSIONED PRIOR TO
- ANY CALL TO CHOICEWIND.
-
- CH$() is an array holding the choices for the
- choice window. Each choice is automatically bracketed. If
- CH$(1) = "OK", it will be displayed as "< OK >". One to
- 10 choices are permitted
-
- NOTE: CH$() IS ERASED BY THE CALL TO CHOICEWIND TO
- CONSERVE MEMORY. CH$() MUST BE REDIMENSIONED PRIOR TO ANY
- CALL TO CHOICEWIND.
-
- TR% is the choice window's top row position.
- If TR% = 100 the choice window is centered top to bottom
- on the display.
-
- LC% is the choice window's left column
- position. If LC% = 100 the choice window will be centered
- left to right on the display.
-
- ATTR% is the color of the choice window and
- it's text.
-
- HATTR% if not zero allows "key character"
- selections and sets the key character color of the items
- in CH$(). The key character is always the first character
- of each element of CH$(). If HATTR% = 0 key characters
- are not used.
-
-
-
-
- 77
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ESC% allows CHOICEWIND% to exit if the ESC
- key is pressed. If ESC% = 1 and ESC is pressed
- CHOICEWIND% will exit with a value of 27. If ESC% = 0 and
- ESC is pressed CHOICEWIND% will not be exited.
-
- BRDR% is the choice window's border. ( SEE
- ARGUMENT BORDER% FOR ROUTINE MAKEWIND. ). BRDR% may NOT
- equal zero.
-
-
- 4.10 CHOICEBAR% (CH$(), TR%, LC%, WD%, ATTR%, HATTR%, EX$ )
- ( CHOICEBAR% is a function. )
-
- NOTE: ROUTINE INPTINIT MUST BE CALLED AT LEAST ONCE IN ANY
- PROGRAM PRIOR TO CALLING THIS ROUTINE.
-
- Description: Displays one to ten choices on a single line
- on the display. A choice may be made by moving the cursor
- to the choice using the TAB or SHIFT/TAB keys and pressing
- the ENTER key or the SPACE BAR. If the left mouse button
- is released while the mouse cursor is on a choice the
- selection is made. CHOICEBAR% returns the following.
-
- 0 --------- On entry argument EX$ = "VIEW" routine
- CHOICEBAR is displayed and exited.
- 1 TO 10 --- Choice 1 to 10 was selected. Choice 1 is the
- leftmost choice, 2 is to the right of 1 etc.
- 11 --- PGUP is an exit key and PGUP was pressed.
- 12 --- PGDWN is an exit key and PGDWN was pressed.
- -1 TO -10 -- F1 to F10 are exit keys and F1 to F10 was
- pressed.
- 27 --- ESC is an exit key and ESC was pressed.
- 15 --- TAB is an exit key and TAB was pressed.
- 14 --- SHIFT/TAB is an exit key and SHIFT/TAB was
- pressed.
- 200 --- The left mouse button was pressed outside of
- choicebar selections and an "O" was included
- in argument EXIT$
-
-
- Arguments: CH$() is an array holding the choices for the
- choice bar. Each choice is automatically bracketed. If
- CH$(1) = "OK", it will be displayed as "< OK >". One to
- 10 choices are permitted.
-
- TR% is the choice bar's top row position.
-
- LC% is the choice bar's left column position.
-
- WD% is the width of the choice bar. The
- choices are automatically spaced in the choice bar's
- width.
-
-
-
- 78
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
-
- ATTR% is the color of the choice bar and it's
- text.
-
- HATTR% if not zero allows "key character"
- selections and sets the key character color of the items
- in CH$(). The key character is always the first character
- of each element of CH$(). If HATTR% = 0 key characters
- are not used.
-
-
- EX$ is used to provide additional exit keys
- or alternate ways to exit CHOICEBAR%. EX$ may equal any
- combination of "0123456789UDETO" or "VIEW". Each
- character in EX$ provides a means of exiting CHOICEBAR as
- indicated by the following list.
-
- "0" ---------- The F10 key exits.
- "1" to "9" --- The F1 to F9 keys exit.
- "U" ---------- The PAGE UP key exits.
- "D" ---------- The PAGE DOWN key exits.
- "E" ---------- The ESC key exits.
- "T" ---------- The TAB key and SHIFT/TAB combination exit.
- "O" ---------- Pressing the left MOUSE button while the
- mouse cursor is out of all choices exits.
- "VIEW" ------- This displays the choicebar only. Routine
- CHOICEBAR is dispalyed and exited.
-
-
- NOTE: THE DISPLAY AREA UNDER A CHICEBAR IS NOT SAVED. BY
- PLACING THE CHOICEBAR IN AN EXISTING WINDOW, THIS
- LIMITATION IS NEGATED. WHEN ROUTINE RSTRWIND IS CALLED
- FOR THE EXISTING WINDOW THE AREA UNDER THE WINDOW IS
- RESTORED.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 79
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ***** DIRECTORY ROUTINES *****
-
- Directory routines compliment features included with QB 4.5
- BASIC 7.1 ( PDS ) and VB for DOS . Procedures to find the
- current disk, current path, disk capacity, and disk space
- available are supplied with WINDOWS R-E-Z. Also included are
- routines to find the directory of any disk or path. In
- addition a file's size, date, time, and attributes can be
- found.
-
- 5.00 GETDISK% ( THIS IS A FUNCTION )
-
- Description: Returns the default disk drive. Returns 1
- drive A:, 2 for B:, 3 for C:, 4 for D: etc.
-
- Argument: None
-
- NOTE: DECLARE THIS FUNCTION IN ANY MODULE WHIC USES IT.
-
-
- 5.01 FINDPATH$ ( THIS IS A FUNCTION )
-
- NOTE: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING THIS
- FUNCTION. SEE SECTION " MAKING A DIRECTORY SCROLL
- WINDOW"
-
- Description: Returns the current path (directory) in the
- following format, alway starting with the drive letter,
-
- DRIVE:\SUB-DIRECTORY\SUB-DIRECTORY....
-
- NOTE: DECLARE THIS FUNCTION IN ANY MODULE WHIC USES IT.
-
-
- 5.02 SETDISK (DRIVE%, BADFLAG%)
-
- Description: Changes the default drive.
-
- Arguments: DRIVE% is the drive designation. DRIVE% =
- 1 for drive A:, 2 for B:, 3 for C:, etc.
-
- BADFLAG% = 1 if DRIVE% is less than 1 or
- greater than the number of logical drives. BADFLAG% = 0
- if DRIVE% is in the range from 1 to the number of logical
- drives in the system.
-
- NOTE: A SYSTEM WITH A FLOPPY DRIVE FOR DRIVE A: AND A
- HARD DISK FOR DRIVE C: HAS 3 LOGICAL DRIVES. THEREFORE,
- BADFLAG% WILL = 0 IF DRIVE% = 1 TO 3 EVEN THOUGH A
- PHYSICAL DRIVE B: DOES NOT EXIST. ATTEMPTS TO ACCESS
- DRIVE B: MAY RESULT IN THE DOS MESSAGE. "Place a disk in
- drive B: and press any key" BEING DISPLAYED.
-
-
-
- 80
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 5.03 DISKSIZE (DRIVE%, SIZE&, FREE&)
-
- NOTE: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING THIS
- ROUTINE. SEE SECTION " MAKING A SCROLL DIRECTORY
- WINDOW".
-
- Description: Retrieves disk space and disk free space.
-
- Arguments: DRIVE% is the drive designation. It
- follows the same rules as detailed in SETDISK. The note
- for SETDISK applies.
-
- SIZE& is the size in bytes of disk space.
-
- FREE& is the size in bytes of free disk
- space.
-
- NOTE: THE ARGUMENTS FOR SIZE AND FREE SPACE ARE LONG
- INTEGERS. ANY VARIABLE USED TO REPRESENT THEM MUST BE
- DESIGNATED AS A LONG INTEGER ( FOLLOWED BY A "&" SIGN )
- OR A PARAMETER MIS-MATCH WILL BE REPORTED.
-
-
- 5.04 FINDDIR (PATH$, TYP$, FILE%)
-
- NOTE # 1: THE FOLLOWING MUST BE PLACED BEFORE ANY
- EXECUTABLE STATEMENTS IN ANY MODULE CALLING "FINDDIR"
-
- TYPE DIREC
- SIZE AS LONG
- DATE AS STRING * 10
- TIME AS STRING * 6
- ATTR AS INTEGER
- END TYPE
- COMMON SHARED /DIRECTORY/ DIREC$(), DIRINFO() AS DIREC
-
- NOTE # 2: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING
- THIS ROUTINE. SEE SECTION " MAKING A SCROLL DIRECTORY
- WINDOW"
-
- Description: Puts the directory listing of the
- specified path in an array, DIREC$(). If a long
- directory search is requested the files size, date, time
- and attributes are also placed in array, DIRINFO(). The
- arrays MUST be defined as explained above in NOTE # 1.
-
- Arguments: PATH$ is the path for the directory
- listing search. It must be in the same format as
- returned by the procedure FINDPATH. It may be expanded
- to restrict the search. Wildcards are permitted.
-
- EXAMPLE: IF PATH$ = "C:\TEST\*.BAS", THE SEARCH WILL
-
-
-
- 81
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- FIND FILES IN DRIVE C:, SUB-DIRECTORY "TEST", WITH THE
- EXTENSION ".BAS".
-
- TYP$ restricts or expands the search to
- include files with specified attributes. An "L" in TYP$
- tells FINDDIR to make a long directory search. The
- file's size, date, time and attributes are found in a
- long directory search, in addition to the files name,
- TYP$ may contain any combination of the following:
-
- A - file's archive bit is set
- H - hidden files
- S - system files
- R - read only files
- D - sub-directory listings
- V - volume entry
- O - no file attribute
- L - long directory search - SEE ABOVE
-
- EXAMPLE: IF TYP$ = "HS" ONLY HIDDEN AND SYSTEM FILES
- WILL BE FOUND.
-
- FILE% is the number of files found. FILE% =
- 0 if no files were found.
-
- If files are found their names are placed in the array,
- DIREC$(). A long directory search places the file's
- size, date, time and attribute designation in
- DIRINFO().
-
- DIREC$(1) = The name of first file found.
- DIRINFO(1).SIZE = The size of the file.
- DIRINFO(1).DATE = The files creation or last update date.
- DIRINFO(1).TIME = The files creation or last update time.
- DIRINFO(1).ATTR = The files attribute designation.
-
- The following describes DIRINFO(1).ATTR;
-
- IF DIRINFO(1).ATTR AND 1 the file is a read only file.
- IF DIRINFO(1).ATTR AND 2 the file is a hidden file.
- IF DIRINFO(1).ATTR AND 4 the file is a system file.
- IF DIRINFO(1).ATTR AND 8 the entry is a volume entry.
- IF DIRINFO(1).ATTR AND 16 the entry is a sub-directory.
- IF DIRINFO(1).ATTR AND 32 the files archived bit is set.
- IF DIRINFO(1).ATTR = 0 the file has no attribute.
-
- NOTE: WHEN FINDDIR IS CALLED THE ARRAY, DIREC$() IS
- AUTOMATICALLY DIMENSIONED TO THE NUMBER OF FILES FOUND.
- THE ARRAY, DIRINFO() IS ALSO DIMENSIONED TO THE NUMBER
- OF FILES FOUND PROVIDING THE DIRECTORY SEARCH IS A LONG
- DIRECTORY SEARCH. EACH FILE FOUND USES ABOUT 16 BYTES
- OF MEMORY PLUS AN ADDITIONAL 22 BYTES IF THE DIRECTORY
-
-
-
- 82
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- SEARCH IS LONG. TO RECLAIM THE MEMORY ( AFTER USING THE
- INFORMATION RETURNED BY THE CALL TO FINDDIR ) THE ARRAYS
- MUST BE ERASED VIA THE STATEMENT:
-
- ERASE DIREC$, DIRINFO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 83
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ***** MAKING A DIRECTORY SCROLL WINDOW *****
-
- REM: THIS EXAMPLE FINDS THE DIRECTORY LISTING OF ALL FILES
- REM: WITH THE ARCHIVE BIT SET IN DRIVE A. IT PUTS THE LISTING
- REM: IN A SCROLL WINDOW AND WAITS FOR THE SELECTION OF A
- REM: FILE.
-
- TYPE DIREC ' REQUIRED IN ANY MODULE
- SIZE AS LONG ' USING DIRECTORY ROUTINES.
- DATE AS STRING * 10
- TIME AS STRING * 6
- ATTR AS INTEGER
- END TYPE
- COMMON SHARED /DIRECTORY/ DIREC$(), DIRINFO() AS DIREC
- DIM DUMMY$ (0) ' FOR INFO-LINE (NOT USED)
- CALL SETWIND(1, 1, 7,0 , 15 ) ' INITIALIZE
- START:
- CLS
- ON ERROR GOTO DISKERROR ' ALWAYS TRAP FOR DISK
- ' ERRORS.
-
- REM: AS TYP$ INCLUDES AN "A", THE FOLLOWING CALL TO
- REM: FINDDIR PLACES FILES WITH THE ARCHIVE BIT SET FROM
- REM: DRIVE A:, ("A:\"), IN DIREC$(). AS TYP$ INCLUDES AN "L"
- REM: THE FILES SIZE, DATE, TIME AND ATTRIBUTES ARE PLACED IN
- REM: DIRINFO(). FILE% HOLDS THE NUMBER OF FILES FOUND.
-
- TYP$ ="AL"
- CALL FINDDIR ("A:\", TYP$, FILE%)
-
- IF FILE% > 0 THEN ' ONLY IF FILES EXISTED.
-
- REM: MAKE A WINDOW. STATEMENT MUST BE ON 1 LINE
-
- CALL MAKEWIND(1 ,"@Select file - Press ENTER",
- 100 ,100 ,30 ,10 ,15 ,101)
-
- REM: MAKE IT AN AUTO-EXIT SCROLL WINDOW.
-
- ' Following must be on one line.
- CALL SCRLWIND(DIREC$(), DUMMY$(),"", FILE%, "",
- RTRN%, 1, 1, RKEY%, 0, 1, 0)
-
- IF RKEY% <> 27 THEN
- LOCATE 1,1
- PRINT "FILE .......";DIREC$(RTRN%)
- PRINT "SIZE........";DIRINFO(RTRN%).SIZE
- PRINT "DATE........";DIRINFO(RTRN%).DATE
- PRINT "TIME........";DIRINFO(RTRN%).TIME
- PRINT "ATTRIBUTE...";DIRINFO(RTRN%).ATTR
- ERASE DIREC$, DIRINFO
- END IF
-
-
-
- 84
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
-
- CALL RSTRWIND(1,1) ' REMOVE THE WINDOW
-
- IF RTRN%=27 THEN GOTO START 'ESC WAS PRESSED
- ELSE ' FILE% = 0 ( NO FILES WERE FOUND )
- PRINT "NO FILES WERE FOUND"
- END IF
- ON ERROR GOTO 0 ' TURN OFF ERROR DETECTION
-
- END
-
- DISKERROR:
-
- REM: ERR = ERROR NUMBER. THIS ERROR HANDLING ROUTINE
- REM: WILL DETECT IF DISK IS NOT READY, NOT AVAILABLE,
- REM: OR PATH WAS BAD.
- SELECT CASE ERR
- CASE 71
- E$ = "DISK NOT READY"
- CASE 68
- E$ = "DISK NOT AVAILABLE"
- CASE 76
- E$ = "PATH NOT FOUND"
- CASE ELSE
- E$ = "UN-IDENTIFIED DISK ERROR"
- END SELECT
-
- REM: FOLLOWING MUST BE ON ONE LINE
-
- CALL GETANS("DISK ERROR: " + E$ + " Press any key.."
- ,"", "",100 ,100, 143, 15, 1)
-
- RESUME START
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 85
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- **** KEYBOARD AND MOUSE ROUTINES ****
-
- Adding the ability to "access the mouse" these routines provide
- increased flexibility over BASIC's INKEY$ statement.
-
- NOTE: MOST OF THESE ROUTINES ARE ASSEMBLY ROUTINES. ALWAYS
- PLACE THEM IN DECLARE STATEMENTS IN ANY MODULE WHICH USES THEM.
- THIS WILL ASSURE ARGUMENT MATCHING AND PREVENT ACCIDENTAL
- PROGRAM "CRASHES".
-
-
- 6.00 GETAKEY%
-
- Description: GETAKEY% is a function. It returns a
- value for the next character in the keyboard buffer or
- zero if no character is in the keyboard buffer. If the
- key pressed represents a standard ASCII/IBM character, the
- code for the character ( 1 to 255 ) is returned in
- GETAKEY%. If the key pressed produces an extended scan
- code such as the up arrow, the extended scan code for the
- key multiplied by 256 is returned in GETAKEY%. GETAKEY%
- returns 18432 ( 72 * 256 ) for the up arrow. For those
- keys which produce an extended scan code over 127, such
- as CTRL-PGUP ( 132 ), GETAKEY% returns a negative value.
-
- SEE THE GETAKEY CODE CHART IN THE APPENDIX.
-
- -------------------------------------------------------
- 'EXAMPLE: WAITS FOR RETURN, "A", DOWN ARROW, OR END.
- 'PRESS END TO END
-
- DECLARE FUNCTION GETAKEY% ( PLACE AT MODULE LEVEL )
-
- DO
- SELECT CASE GETAKEY% ' PROGRAM GETS INPUT HERE.
- CASE 13 ' 13 IS ASCII FOR RETURN/ENTER.
- PRINT "RETURN"
- CASE 65 ' 65 IS ASCII FOR "A".
- PRINT "A"
- CASE 80 * 256 ' 80 IS THE EXTENDED SCAN.
- PRINT "DOWN ARROW" ' CODE FOR THE DOWN ARROW.
- CASE ELSE
- END SELECT
- LOOP WHILE A% <> (79 * 256) ' 79 IS THE EXTENDED SCAN
- PRINT "END" ' FOR END.
- END
- --------------------------------------------------------
-
-
-
-
-
-
-
-
- 86
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 6.01 CLEARKB
-
- Description: Clears all characters from the type ahead
- keyboard buffer.
-
- Arguments: None
-
-
- 6.02 MOUSEON% (ISON%) ( FUNCTION )
-
- Description: Sets the mouse status and initializes the
- mouse. Returns 1 if the mouse driver is present, the
- mouse hardware is present, and the mouse is set on by
- argument ISON%. If the preceding conditions are not
- true MOUSEON% returns 0.
-
- Arguments: ISON% turns the mouse off or attempts to
- turn the mouse on. If ISON% = 1, and the mouse driver and
- hardware are present, the mouse will be turned on. The
- mouse cursor will be visible and positioned on row one and
- column one of the display. If ISON% = 0 the mouse is
- turned off, and the mouse cursor is hidden.
-
-
- 6.03 MOUSEHIDE
-
- Description: Hides the mouse cursor. Decrements the
- mouse "visibility flag" by one. ( SEE MOUSESHOW )
-
- Arguments: None
-
-
- 6.04 MOUSESHOW
-
- Description: Displays the mouse cursor. Increments the
- mouse "visibility flag" by one.
-
- NOTE: FOR EVERY CALL TO MOUSEHIDE A SUBSEQUENT CALL TO
- MOUSESHOW IS REQUIRED TO DISPLAY THE MOUSE CURSOR. TWO
- CONSECUTIVE CALLS TO MOUSEHIDE REQUIRE TO CONSECUTIVE
- CALLS TO MOUSESHOW TO DISPLAY THE MOUSE. THE REVERSE
- IS NOT TRUE.
-
- EXAMPLE: ( ASSUMES THE MOUSE CURSOR IS VISIBLE )
-
- CALL MOUSEHIDE ' Mouse cursor hidden - "visibility
- ' flag" is decremented.
-
- CALL MOUSEHIDE ' "visibility flag" decremented again.
-
- CALL MOUSESHOW ' "Visibility flag" incremented. Mouse
- ' is still hidden.
-
-
-
- 87
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- CALL MOUSESHOW ' "Visibility flag" incremented. Mouse is
- ' now displayed.
-
-
- 6.05 MOUSEROW% ( NOTE: THIS IS A FUNCTION )
-
- Description: Returns the row position of the mouse cursor.
-
- Arguments: None
-
-
- 6.06 MOUSECOL% ( NOTE: THIS IS A FUNCTION )
-
- Description: Returns the column position of the mouse cursor.
-
- Arguments: None
-
-
- 6.07 MOUSEPOS ( ROW%, COLUMN% )
-
- Description: Moves the mouse cursor to a specified position.
-
- NOTE: IT IS POSSIBLE TO MOVE THE CURSOR OFF OF THE DISPLAY
-
- Arguments: ROW% is the row position.
-
- COLUMN% is the column position.
-
-
- 6.08 MOUSELIMIT ( TOPROW%, BOTTOMROW%, LEFTCOL%, RIGHTCOL% )
-
- Description: Sets the bounds for mouse cursor movement.
-
- Arguments: TOPROW% is the top row limit of movement
- for the mouse cursor.
-
- BOTTOMROW% is the bottom row limit of
- movement for the mouse cursor.
-
- LEFTCOL% is the left column limit of movement
- for the mouse cursor.
-
- RIGHTCOL% is the right column limit of
- movement for the mouse cursor.
-
- 6.09 LBUTTON% ( NOTE: THIS IS A FUNCTION )
-
- Description: Returns the status of the left mouse button.
- If the left mouse button is pressed LBUTTON% = 1. If the
- left mouse button is not pressed LBUTTON% = 0.
-
- Arguments: None
-
-
-
- 88
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 6.10 RBUTTON% ( NOTE: THIS IS A FUNCTION )
-
- Description: Returns the status of the right mouse button.
- If the right mouse button is pressed RBUTTON% = 1. If the
- right mouse button is not pressed RBUTTON% = 0.
-
- Arguments: None
-
-
- 6.11 MOUSEINWIND% ( WIND% ) ( NOTE: THIS IS A FUNCTION )
-
- Description: Returns a value signifying if the mouse
- cursor is in a specified window. The returned values
- may equal the following.
-
- 0 -- The mouse cursor is not in the specified window or
- the specified window does not exist.
-
- 1 -- The mouse cursor is on the TOP border ( including
- the corners ) of the specified window.
-
- 2 -- The mouse cursor is on the RIGHT border ( excluding
- the corners ) of the specified window.
-
- 3 -- The mouse cursor is on the BOTTOM border ( including
- the corners ) of the specified window.
-
- 4 -- The mouse cursor is on the LEFT border ( excluding
- the corners ) of the specified window.
-
- 5 -- The mouse cursor is in the interior of the specified
- window.
-
-
- NOTE: MOUSEINWIND% RETURNS A VALUE BASED ON THE WINDOW'S
- COORDINATES. IT IS THE PROGRAMMERS RESPONSIBILITY TO
- ASSURE THE SPECIFIED WINDOW IS VISIBLE WHEN MOUSEINWIND%
- IS CALLED.
-
- Argument: WIND% is the number of the window;
-
- 0 to 20 represent standard windows.
- 21 represents the INPUT window, if one is active.
- 23 represents the PULLDOWN window, if one is active.
- 24 represents the PULLDOWN menubar, if one is active.
-
-
- 6.12 MOUSEINMULT% ( MULTSCRN% ) ( NOTE: THIS IS A FUNCTION )
-
- Description: Returns the field number of a specified
- multi-field input screen the mouse cursor occupies or
- zero if the mouse cursor is not in a field.
-
-
-
- 89
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- NOTE: IT IS THE PROGRAMMERS RESPONSIBILITY TO ASSURE THE
- SPECIFIED MULTI-FIELD SCREEN IS DISPLAYED. IF IT IS NOT
- AND IT EXISTS, MOUSEINMULT% RETURNS A VALUE AS IF IT IS
- DISPLAYED.
-
- Argument: MULTSCRN% is a multi-field input screen defined
- by previous calls to SETINPT and MAKEFIELD, and displayed
- by MULTINPT. If MULTSCRN% is out of range ( 1 to 10 ) or
- set to an undefined input screen, MOUSEINMULT% returns zero.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 90
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- **** INFO-LINE ROUTINES *****
-
- These routines allow the programmer to set up and print in an
- info-line at any location on the screen. The info-line can be
- used to print messages, instructions, or a prompt. Used in
- conjunction with routines PULLDOWN and SCRLWIND these routines
- will change the message in the info-line as the scroll bar is
- moved through the selections in the pulldown and scroll windows.
-
-
- 7.00 INFOLINE ( TR%, LC%, WD%, ATTR% )
-
- Description: Set up routine for routines PRINTINFO,
- INFOFIXED, AND RSTRINFO. Sets the coordinates and the
- color for the info-line. Defines the fixed info-string to
- equal "" ( SEE: INFOFIXED ). Makes the info-line active.
- Saves the display area specified by TR%, LC%, and WD%.
- This area may be restored by calling routine RSTRINFO.
- INFOLINE DOES NOT PRINT OR DISPLAY THE INFO-LINE. THIS IS
- ACCOMPLISHED BY ROUTINE PRINTINFO. Routine PRINTINFO is
- incorporated in routines PULLDOWN and SCRLWIND. It may
- also be used prior to calling other routines. ( SEE:
- Examples - Info-line routines )
-
- NOTE: IF AN INFO-LINE IS ACTIVE A CALL TO INFOLINE DOES
- NOTHING EXCEPT TO CHANGE THE COLOR (IF IT IS DIFFERENT) OF
- THE INFO-LINE FOR SUBSEQUENT CALLS TO PRINTINFO. THE
- INFO-LINE IS DEACTIVATED VIA A CALL TO RSTRINFO.
-
- Arguments: TR% is the top row position of the info-line.
-
- LC% is the left column position of the info-
- line. If LC% + WD% > 81 an error will be reported.
-
- WD% is the info-lines width. If WD% + LC% >
- 81 an error will be reported.
-
- ATTR% is the info-lines color ( SEE THE COLOR
- ATTRIBUTE CHART ). ATTR% must range from 1 to 255 or it
- is adjusted to ATTR% AND 127.
-
- 7.01 PRINTINFO ( INFO$ )
-
- Description: Displays the info-line and prints in same.
- The info-line must have been made active by a previous
- call to INFOLINE. If a fixed info-string has been
- previously defined by a call to routine INFOFIXED,
- PRINTINFO adds it's text to the fixed info-string and
- displays the result in the info-line ( SEE: INFOFIXED ).
- If an info-line is not active PRINTINFO does nothing. (
- SEE: Examples -Info-line routines.
-
-
-
-
- 91
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Argument: INFO$ is the string which will print in the
- info-line. If a fixed info-string has been defined by
- routine INFOFIXED, INFO$ is added to the fixed info-string
- with the result printing in the info-line. If the length
- of the fixed info-string plus the length of INFO$ will not
- fit in info-line defined by routine INFOLINE it is
- truncated to fit.
-
-
- 7.02 INFOFIXED ( FIXEDINFO$ )
-
- Description: Defines a fixed info-string which will print
- every time routine PRINTINFO is called. As PRINTINFO is
- called for every entry in a scroll or pulldown window,
- INFOFIXED is useful for these routines. The info-line
- must be active or INFOFIXED does nothing.
- ( SEE: Examples - Info-line routines )
-
- Argument: FIXEDINFO$ is the fixed info-string. It will
- remain the fixed info-string until routine RSRTINFO is
- called with argument DELFLAG% = 1 ( SEE: RSTRINFO ). The
- fixed info-string may be also disabled by calling
- INFOFIXED with FIXEDINFO$ equal to "".
-
-
- 7.03 RSTRINFO ( DELFLAG% )
-
- Description: Restores the display area under the info-
- line. This area was saved by a previous call to INFOLINE.
- If the info-line is not active RSTRINFO does nothing.
- (SEE: Examples - Info-line routines. )
-
- Argument: DELFLAG% is set to 1 to deactivate the info-
- line. If DELFLAG% = 1 the display area saved by routine
- INFOLINE is restored to the display. An info-line will no
- longer be active. If DELFLAG% = 0 the info-line remains
- active. The saved display area is restored. The saved
- display are remains in window memory, however.
- NOTE: THE SAVED DISPLAY AREA RESIDES IN WINDOW NUMBER 25.
- FUNCTION WAVAIL% CAN DETERMINE IF THE INFOLINE IS ACTIVE.
-
- EXAMPLE: IF WAVAIL%(25) = 0 ' The info-line is active.
- IF WAVAIL%(25) = 1 ' the info-line is not active.
-
-
-
-
-
-
-
-
-
-
-
-
- 92
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- -----------------------------------------------------------------
- ' Example: Info-line routines
- ' THIS EXAMPLE WILL NOT RUN AS THE CALLS TO INPTWIND, SCRLWIND,
- ' AND PULLDOWN ARE NOT COMPLETE.
-
- ' INFO-LINE TOP ROW = 25
- ' INFO-LINE LEFT COLUMN = 1
- ' INFO-LINE WIDTH = 80
- ' INFO-LINE COLOR = BLACK ON GRAY
- ' SAVES DISPLAY AREA ( ALL OF ROW 25 AS WIDTH = 80 )
-
- CALL INFOLINE ( 25, 1, 80, 112 ) ' INFO-LINE MADE ACTIVE
-
- CALL PRINTINFO ( "INPUT YOUR NAME" ) ' PRINT IN INFO-LINE
-
- CALL INPTWIND....... ' TO INPUT A NAME
-
- CALL RSTRINFO ( 0 ) ' DISPLAY AREA UNDER INFO-LINE IS
- ' RESTORED TO DISPLAY. INFO-LINE
- ' REMAINS ACTIVE.
-
- ' **** USE SAME INFO-LINE FOR A SCROLL WINDOW. IN THIS EXAMPLE
- ' **** THE INFO-LINE DISPLAYS THE SAME MESSAGE FOR ALL ENTRIES IN
- ' **** THE SCROLL WINDOW.
-
- CALL INFOFIXED ( "MAKE A SELECTION" )
-
- DIM INFO$(0) ' MUST BE DIMENSIONED TO 0 TO DISPLAY
- ' THE FIXED INFO-STRING ONLY.
-
- CALL SCRLWIND ( LIST$(), INFO$(), ..... ' MAKE SCROLL WINDOW
-
- ' "MAKE A SELECTION" IS PRINTED IN INFO-LINE FOR ALL ENTRIES IN
- ' THE SCROLL WINDOW. ROUTINE SCRLWIND INTERNALLY CALLS ROUTINE
- ' PRINTINFO TO PRINT IN THE INFO-LINE.
-
- CALL RSTRINFO ( 0 ) ' DISPLAY AREA UNDER INFO-LINE IS
- ' RESTORED TO DISPLAY. INFO-LINE
- ' REMAINS ACTIVE.
-
- CALL INFOFIXED ( "" ) ' REMOVE FIXED INFO-STRING.
-
-
- ' **** USE SAME INFO-LINE FOR A SCROLL WINDOW. PRINT A DIFFERENT
- ' **** MESSAGE FOR EACH ITEM IN THE SCROLL WINDOW.
-
- CALL INFOFIXED ( "Directions: " ) ' Set fixed info-string
-
- DIM INFO$(3) ' The fixed info-string plus
- INFO$(1) = "Save a file." ' these elements of INFO$() will
- INFO$(2) = "Load a file." ' print for the corresponding
- INFO$(4) = "Delete a file." ' entries in the scroll window.
-
-
-
- 93
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- CALL SCRLWIND ( LIST$(), INFO$()..........
-
- ' ** The following will print in the info-line.
- ' "Directions: Save a file." prints for scroll window entry 1.
- ' "Directions: Load a file." prints for scroll window entry 2.
- ' "Directions: Save a file." prints for scroll window entry 3.
-
- CALL RSTRINFO ( 0 ) ' DISPLAY AREA UNDER INFO-LINE IS
- ' RESTORED TO DISPLAY. INFO-LINE
- ' REMAINS ACTIVE.
-
- ' **** USE THE SAME INFO-LINE FOR PULLDOWN WINDOWS. THE FIXED
- ' **** INFO-STRING STILL EQUALS "Directions".
-
- DIM INFO$(20) ' The fixed info-string plus
- INFO$(1) = "Save a file." ' these elements of INFO$() will
- INFO$(2) = "Load a file." ' print for the corresponding
- INFO$(3) = "Delete a file." ' entries in the scroll window.
-
- '... DO UP TO THE 20TH ELEMENT OF INFO$
- '...
-
- ' NOTE: INFO$() MUST BE DIMENSIONED TO ZERO ( DIM INFO$(0) ). IF
- ' THE INFO-LINE IS NOT TO BE USED. THE TEXT FOR THE INFO-LINE FOR
- ' THE MENUBAR ITEMS IS SET BY ROUTINE SETPULL. INFO$() ONLY SETS
- ' THE TEXT FOR THE INFO-LINE FOR THE SELECTIONS IN THE PULLDOWN
- ' WINDOWS.
-
- CALL PULLDOWN ( INFO$()......
-
- ' ** The following will print in the info-line.
- ' "Directions: Save a file." for pulldown window entry 1.
- ' "Directions: Load a file." for pulldown window entry 2.
- ' "Directions: Save a file." for pulldown window entry 3.
-
- CALL RSTRINFO ( 0 ) ' DISPLAY AREA UNDER INFO-LINE IS
- ' RESTORED TO DISPLAY. INFO-LINE
- ' REMAINS ACTIVE.
-
-
- '*** USE SAME INFO-LINE WITH ROUTINE GETANS. PROMPT IS PRINTED IN
- '*** INFO-LINE BY PRINTINFO. GETANS DOES NOT PRINT A PROMPT. IT
- '*** ONLY WAITS FOR A REPLY.
-
- CALL PRINTINFO ( "(Y)es or (N)o ?" ) ' PROMPT USER FOR "Y" OR "N".
-
- CALL GETANS ("", "YN", ANS$, 100, 100, 112, 0 )
-
- ' GETANS COORDINATES ARE MEANINGLESS AS A PROMPT IS NOT PRINTED.
- ' COORDINATES MUST STILL BE WITHIN VALID RANGES. THE BORDER
- ' DESIGNATION MUST BE SET TO ZERO OR GETANS WILL GENERATE A
- ' WINDOW.
-
-
-
- 94
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- CALL RSTRINFO ( 1 ) ' DISPLAY AREA UNDER INFO-LINE RESTORED
- ' TO DISPLAY.
- ' *** AS ARGUMENT = 1 THE INFO-LINE IS
- ' NO LONGER ACTIVE. INFOLINE MUST BE
- ' CALLED AGAIN TO MAKE IT ACTIVE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 95
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- MISCELLANEOUS ROUTINES
-
-
- 8.00 DOSOUND
-
- Description: Makes the default sound, or sound as
- specified by a previous call to SETWIND.
-
- Arguments: None.
-
-
- 8.01 DISPLAYROWS% ( NOTE: THIS IS A FUNCTION )
-
- Description: Returns the number of rows for the active
- display mode. DISPLAYROWS% returns 25, 43 or 50
-
-
- 8.02 PEEKASM& ( SEGMENT&, OFFSET&, NUMOFBYTES% )
- ( NOTE: THIS IS A FUNCTION WHICH RETURNS A LONG INTEGER )
-
- Description: Returns a value at the specified memory
- location. Returns a one, two, three, or four byte value.
- PEEKASM& can be used to "PEEK" a one to four byte memory
- location.
-
- Arguments: SEGMENT& is the segment ( DOS CONVENTION ) in
- memory where the value resides.
-
- OFFSET& is the offset location from SEGMENT&
- for the value.
-
- NUMOFBYTES% is the number of bytes in the
- value. It may equal 1,2,3 or 4. If NUNOFBYTE% does not
- equal 1,2,3 or 4 it defaults to one byte.
-
-
- 8.03 GETCUR&
- ( NOTE: THIS IS A FUNCTION WHICH RETURNS A LONG INTEGER )
-
- Description: Returns a long integer which represents the
- system cursor's size and position.
-
- Arguments: None
-
- NOTE: BASIC RETAINS IT'S OWN RECORD OF THE CURSOR POSITION
- FOR SUBSEQUENT PRINT STATEMENTS. THIS WILL NOT POSE A
- PROBLEM IF THE ROUTINES INCLUDED IN WINDOWS R-E-Z ARE USED
- FOR ALL SCREEN PRINTING
-
-
-
-
-
-
-
- 96
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- 8.04 SETCUR ( CURPOS& )
-
- Description: Restores the cursor size and position save by
- routine GETCUR&.
-
- Arguments: CURPOS& is a long integer returned by a
- previous call to GETCUR&
-
- NOTE: BASIC RETAINS IT'S OWN RECORD OF THE CURSOR POSITION
- FOR SUBSEQUENT PRINT STATEMENTS. THIS WILL NOT POSE A
- PROBLEM IF THE ROUTINES INCLUDED IN WINDOWS R-E-Z ARE USED
- FOR ALL SCREEN PRINTING
-
-
- 8.05 CUROFF
-
- Description: Turns the system cursor off by disabling it's
- visibility.
-
- Arguments: None
-
- NOTE: SAVE THE CURSOR SIZE AND POSITION VIA FUNCTION
- GETCUR& PRIOR TO USING THIS ROUTINE IF THE CURSOR SIZE
- AND POSITION ARE TO BE RESTORED AT A LATER TINE USING
- ROUTINE SETCUR.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 97
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- PROGRAM FORMAT FOR WINDOWS R-E-Z
-
- ** NOTE: ALL NUMERIC VALUES MUST BE INTEGERS FOR ALL **
- PROCEDURES EXCEPT DISKSIZE. ( EX: A%, B%, DEFINT A-F )
-
- 1. LOAD QUICKBASIC WITH CORRECT LIBRARY.
-
- - UNENHANCED VERSION:
- EX: QB/L QBUNEN.QLB ( QuickBASIC 4.50 )
- QBX/L PDSUNEN.QLB ( BASIC 7.1 - PDS )
- VBDOS/L VBUNEN.QLB ( Visual BASIC for DOS )
-
- - ENHANCED VERSION:
- EX: QB/L QBALL.QLB ( QuickBASIC 4.50 )
- QBX/L PDSALL.QLB ( BASIC 7.1 - PDS )
- VBDOS/L VBALL.QLB ( Visual BASIC for DOS )
-
- 2. DECLARE ALL SUB-ROUTINES AND FUNCTIONS.
-
- REM $INCLUDE: 'DECLARE.INC'
-
- ' 3. CALL SETWIND TO INITIALIZE WINDOW MEMORY, INPTINIT TO
- ' INITIALIZE INPUT ROUTINES. TURN THE MOUSE ON IF IT EXISTS
-
- CLS
- CALL SETWIND(1,1,7,0,15) 'FAST WINDOWS
- 'SOUND DEFAULTS TO "CLICK"
- 'SHADOW COLOR = GRAY
- 'HI INTENSITY IS OK
- 'BRACKET COLOR = 15
-
- CALL INPTINIT (1,1,1,1,1) 'DATE = MM-DD-YYYY
- 'PERIOD AS DECIMAL POINT
- 'CURSOR AT POSITION 1
- 'BLANK ON 1ST KEY PRESSED
- 'MAKE SOUND ON BAD KEY
-
- JUNK% = MOUSEON (1) 'MOUSE IS ON IF JUNK% <> 0
-
- ' 4. CALL SETPULL IF PULLDOWN WINDOWS ARE USED
-
- A%= 25
- DIM PWIND$(A%) ' SET TEMPORARY
- ' ARRAY
- DIM PULLINFOLINE$(0) ' INFO-LINE NOT USED
- TEMP%=0
- WHILE PWIND$(TEMP%) <> "ENDPULL"
- TEMP% = TEMP% + 1 ' ALWAYS START AT 1
- READ PWIND$(TEMP%) ' READ DATA FOR
- WEND ' PULLDOWN WINDOWS
-
-
-
-
-
- 98
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- CALL SETPULL (1, 1, 80, PWIND$()) ' CALL SETPULL
- ERASE PWIND$ ' AND ERASE ARRAY
-
- ' PULLDOWN WINDOW DATA
- DATA THIS,,HELLO,JOE,***
- DATA IS,,HOW,ARE,YOU,***
- DATA A,,I,AM,FINE,***
- DATA SAMPLE,,BYE,***
- DATA ENDPULL
-
- ON KEY(1) GOSUB PULL ' MAKE THE F1 KEY
- ' THE "HOT" KEY FOR
- ' PULLDOWN WINDOWS
-
- '5. READ DATA FOR SCROLL WINDOW(S)
-
- DIM LIST$(10) ' DIMENSION ARRAY
- FOR X%= 1 TO 10 ' AND READ SCROLL
- READ LIST$(X%) ' WINDOW DATA
- NEXT
-
- DATA ONE, TWO, THREE, FOUR, FIVE ' DATA FOR A SCROLL
- DATA SIX, SEVEN, EIGHT, NINE, TEN ' WINDOW
-
-
- '6. SET UP MULTI-FIELD INPUT SCREEN(S)
- CALL SETINPT( 1, 25, "12", 15 ) ' DEFINE SCREEN.
-
- FOR X% = 1 TO 3
- READ CODE%, TR%, LC%, WD%
- CALL MAKEFIELD (1,X%,CODE%,TR%,LC%,WD%,7,7,7,"","",0,0,0)
- NEXT
-
- DATA 0,1,1,15
- DATA 11007,3,1,40
- DATA 108,5,1,10
-
-
- '7. ENTER THE PROGRAM
- MAIN:
- LOCATE 25, 1 :PRINT "PRESS F1"
- KEY (1) ON ' TURN ON "HOT" KEY AT
- ' . ' APPROPRIATE SPOT IN
- ' . ' PROGRAM.
- ' . ' WAIT FOR F1 KEY.
- GOTO MAIN
- REM PULL IS A SUB ROUTINE WHICH IS ENTERED VIA THE
- REM F1 KEY BEING PRESSED. THIS SUB DISPLAYS THE
- REM PULLDOWN WINDOW AND WAITS FOR AN ITEM TO BE
- REM SELECTED FROM SAME. IF THE ESC KEY IS PRESSED
- REM THE PROGRAM RESUMES EXECUTION WHERE IT WAS
- REM INTERRUPTED BY THE F1 KEY. IF AN ITEM IS
-
-
-
- 99
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- REM SELECTED A ROUTINE IS EXECUTED. AFTER EXECUT-
- REM ION THE PROGRAM CONTINUES AT MAIN.
- REM THIS IS A SUGGESTION FOR A METHOD TO USE PULL-
- REM DOWN WINDOWS. ALTERNATE METHODS MAY BE USED,
- REM SUCH AS CALL "PULLDOWN" AT START OF PROGRAM.
- REM AND NOT USING A HOT KEY.
-
- PULL:
- KEY (1) OFF
-
- REM: MUST BE ON ONE LINE IN QB, QBX, VBDOS EDITOR.
- CALL PULLDOWN (PULLINFOLINE$(), MENUITEM% , WINDITEM%, "E",
- RKEY%, 112, 15, 11)
-
- CALL RSTRPULL (1) ' RESTORE AREA UNDER
- ' PULLDOWN WINDOW.
- SELECT CASE MENUITEM%
-
- CASE 1 ' MENUBAR ITEM = THIS
- SELECT CASE WINDITEM%
- CASE 1 ' HELLO
- ' . ' ROUTINE FOR HELLO
- ' .
- CASE 2 ' JOE
- ' . ' ROUTINE FOR JOE
- ' .
- END SELECT
-
- CASE 2 ' MENUBAR ITEM = IS
- SELECT CASE WINDITEM%
- CASE 1 ' HOW
- ' . ' ROUTINE FOR HOW
- ' .
- CASE 2 ' ARE
- ' . ' ROUTINE FOR ARE
- ' .
- CASE 3 ' YOU
- ' . ' ROUTINE FOR YOU
- ' .
- END SELECT
-
- CASE 3 ' MENUBAR ITEM = A
- SELECT CASE WINDITEM%
- CASE 1 ' I
- ' . ' ROUTINE FOR I
- ' .
- CASE 2 ' AM
- ' . ' ROUTINE FOR AM
- ' .
- CASE 3 ' FINE
- ' . ' ROUTINE FOR FINE
- ' .
-
-
-
- 100
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- END SELECT
-
- CASE 4 ' MENUBAR ITEM = SAMPLE
- ' . ' ROUTINE FOR SAMPLE
- ' . ' ( OR BYE )
-
- CASE ELSE
- END ' WAS ESC
- END SELECT
- KEY (1) ON
- RETURN MAIN ' DONE WITH THE ROUTINE
- ' SELECTED FROM
- ' PULLDOWN WINDOWS
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 101
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- EVENT TRAPPING
- --------------
-
- Additional library files have been included which allow event
- trapping ( SEE THE SECTION TITLED FILES ).
-
- These libraries may be used for programs which do not require
- event trapping also. It is important to note, however, that
- additional code will be added to programs that are compiled from
- the QB/QBX/VBDOS environments, even if event trapping is not
- used.
-
- QuickBASIC 4.5, BASIC 7.1, and VBDOS detect event trapping
- capabilities in the *.QLB library and add the /W or /V switch to
- the compiler ( BC.EXE ) when modules are compiled from the
- programming environment; even if the modules do not use event
- trapping. This adds extra code to the program and reduces it's
- speed. If modules not are compiled and linked from the command
- line the /W and /V switches are not required for modules not
- using event trapping. If modules will be compiled from the
- programming environment and event trapping is not used, use the
- libraries supplied which do not include event trapping. THESE
- LIBRARIES ARE NOT SUPPLIED IN THE UNENHANCED VERSIONS.
-
- When event trapping is used care should be taken to assure that
- "exit keys" for routines do not conflict with keys trapped via
- event ( key ) trapping. For example if the F1 key is used as an
- "exit key" for routine MULTINPT and the F1 key is trapped via
- event trapping two events will occur. The event trapping routine
- will be executed for the F1 key pressed event, and routine
- MULTINPT will be executed as F1 is designated as an "exit key".
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 102
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- FILES
-
- The following files are included with WINDOWS R-E-Z.
- The files included depend on the version you have received.
- Some files are for QuickBASIC 4.5, some are for BASIC 7.1,
- while others are for Visual BASIC for DOS.
-
- Library Files:
-
- - Library consisting of all assembly procedures.
-
- * QBASM.LIB ---- For QuickBASIC 4.5
- * PDSASM.LIB -- For BASIC 7.1
- * VBASM.LIB -- For Visual BASIC for DOS
-
- - QB/QBX/VBDOS assembly procedure quick libraries.
-
- * QBASM.QLB ---- For QuickBASIC 4.5
- * PDSASM.QLB --- For BASIC 7.+
- * VBASM.QLB ---- For Visual BASIC for DOS
-
- - Library consisting of all assembly and BASIC procedures.
-
- * QBALL.LIB ---- For QuickBASIC 4.5
- * PDSALL.LIB --- For BASIC 7.1
- * VBALL.LIB ---- For Visual BASIC for DOS
- * QBTRAP.LIB --- For QB 4.5 ( allows event trapping )
- * PDSTRAP.LI --- For BASIC 7.1 ( allows event trapping )
- * VBTRAP,LIB --- For VB for DOS ( allows event trapping )
- ** QBUNEN.LIB --- For QuickBASIC 4.5 ( unenhanced )
- ** PDSUNEN.LIB -- For BASIC 7.1 ( unenhanced )
- ** VBUNEN.LIB --- For Visual BASIC for DOS ( unenhanced )
-
- - QB/QBX/VBDOS assembly and BASIC quick libraries.
-
- * QBALL.QLB ---- For QuickBASIC 4.50
- * PDSALL.QLB --- For BASIC 7.1
- * VBALL.QLB ---- For Visual BASIC for DOS
- * QBTRAP.QLB --- For QB 4.5 ( allows event trapping )
- * PDSTRAP.QLB -- For BASIC 7.1 ( allows event trapping )
- * VBTRAP.QLB --- For VB for DOS ( allows event trapping )
- ** QBUNEN.QLB --- For QuickBASIC 4.5 ( unenhanced )
- ** PDSUNEN.QLB -- For BASIC 7.1 ( unenhanced )
- ** VBUNEN.QLB --- For Visual BASIC for DOS ( unenhanced )
-
-
-
-
-
-
- * Not included with the unenhanced version of WINDOWS R-E-Z.
- ** Not included with the enhanced version of WINDOWS R-E-Z.
-
-
-
- 103
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- - Library of all assembly and BASIC procedures without
- error detection or window status. Program MUST be
- completely "debugged" before these are used.
-
- * QBNER.LIB ---- For QuickBASIC 4.50
- * PDSNER.LIB --- For BASIC 7.1
- * VBNER.LIB ---- For Visual BASIC for DOS
- * QBNETRP.LIB ---- For QB 4.50 ( allows event trapping )
- * PDSNETRP.LIB --- For BASIC 7.1 ( allows event trapping )
- * VBNETRP.LIB ---- For VB for DOS ( allows event trapping )
-
- - QB/QBX/VBDOS no error quick libraries.
-
- * QBNER.QLB ---- For QuickBASIC 4.50
- * PDSNER.QLB --- For BASIC 7.1
- * VBNER.QLB ---- For Visual BASIC for DOS
- * QBNETRP.QLB ---- For QB 4.50 ( allows event trapping )
- * PDSNETRP.QLB --- For BASIC 7.1 ( allows event trapping )
- * VBNETRP.QLB ---- For VB for DOS ( allows event trapping )
-
- Object Files:
-
- QB*.OBJ = QuickBASIC 4.5, PDS*.OBJ = BASIC 7.1, VB*.OBJ = VB DOS
-
- * QBWIND.OBJ --- Object file of assembly windowing
- * PDSWIND.OBJ routines.
- * VBWIND.OBJ " "
- * QBINPT.OBJ --- Object file of assembly input routines.
- * PDSINPT.OBJ " "
- * VBINPT.OBJ " "
- * QBDIR.OBJ ---- Object file of assembly directory
- * PDSDIR.OBJ routines.
- * VBDIR.OBJ " "
- * QBSCRL.OBJ --- Object file of assembly scroll
- * PDSSCRL.OBL routines
- * VBSCRL.OBJ " "
- * PDSALT.OBJ Alternate memory management object file
- * VBALT.OBJ " "
-
- Basic Files:
-
- * INPTWIND.BAS - BASIC source code for routines in
- * PULLDOWN.BAS WINDOWS R-E-Z.
- * SCROLL.BAS "
- * WIND_REZ.BAS "
- * DIRWIND.BAS "
- * QBMEM.BAS ( QuickBASIC 4.5 )
- * PDSVBMEM.BAS ( BASIC 7.1 / VBDOS )
-
-
- * Not included with the unenhanced version of WINDOWS R-E-Z.
- ** Not included with the enhanced version of WINDOWS R-E-Z.
-
-
-
- 104
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Demonstration files.
-
- DEMO.BAS ----- Source code for demonstration program.
- DEMPART2.BAS Part two of demonstration program.
- MULTSAM1.BAS Sample multi-field input program.
- MULTSAM2.BAS "
- MULTSAM3.BAS "
- SCRLRAND.BAS Scroll through a random access file.
- MAKERAND.BAS Sample random access database.
- SCRLISAM.BAS Scroll through an ISAM table.
- MAKEISAM.BAS Sample ISAM data file.
-
- NOTE: All BASIC files except QBMEM.BAS, PDSMEM.BAS and
- VBMEM,BAS are the same for QuickBASIC 4.5, BASIC 7.1, and
- VBDOS. All basic routines require the presence of the module
- WIND_REZ.BAS INPTWIND.BAS and ***MEM.BAS
-
- Other Files:
-
- ** WIND_REZ.DOC - This document.
- * WIND_REZ.EXE - Self-extracting compressed documentation.
- Un-compresses to WIND_REZ.DOC.
- SCRLFILE.DOC - Scroll through file documentation.
- DEMO.EXE ----- Demonstration program.
- PRNTDOT.BAT -- Batch file for printing WIND_REZ.DOC.
- PRNTLAS.BAT -- Batch file for printing WIND_REZ.DOC on a
- HP compatible laser printer.
- DECLARE.INC -- INCLUDE file containing DECLARE
- statements for all routines.
- ORDER.ME ----- Order form for WINDOWS R-E-Z.
- READ.ME ----- Update information.
- * QUICKREF.DOC - Quick reference guide.
- * PRNTDOT2.BAT - Batch file for printing QUICKREF.DOC.
- * PRNTLAS2.BAT - Batch file for printing QUICKREF.DOC on a
- HP compatible laser printer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- * Not included with the unenhanced version of WINDOWS R-E-Z.
- ** Not included with the enhanced version of WINDOWS R-E-Z.
-
-
-
- 105
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- Errors
-
- The following is a listing of the errors WINDOWS R-E-Z
- will detect.
-
- ERROR # DESCRIPTION
- ------------------------------------------------------------
-
- ERROR 1 There is no active window. SCRLWIND, RESAVE
- CLRWIND, PRINTW, PRINTWHOT, LINEW, NEWCOLOR,
- and BOXW require an active window.
-
-
- ERROR 2 SETWIND has not been called to initialize
- window memory. This error will also be reported
- if the program uses a CLEAR statement and SETWIND
- has not be called to re-initialize window
- memory.
-
-
- ERROR 3 A window number has been specified which is
- out of range for the calling routine. Window
- number 20 is the maximum window number for all
- routines. Window number 1 is the minimum
- window number for SAVEWIND, DELWIND, RESAVE
- and RSTRWIND. Window number 0 is the minimum
- window number for MAKEWIND and CHNGWIND.
-
-
- ERROR 4 The window will not fit on the screen or the
- window is too small. The left column plus the
- window's width makes the window too wide or the
- top row plus the number of rows makes the
- window too tall. The left column and top row
- must be greater than 0. The width and number
- of rows must be greater than 2. The left column
- or row are out of permissible range.
-
- GETANS makes a window with a width predicated
- on the width of the prompt.
-
- INPTWIND makes a window with a width based on
- the length of the prompt plus the width of the
- input field. Input windows with < OK > and
- < CANCEL > buttons require additional rows.
-
- PULLDOWN windows have a width based on the
- longest item in the pulldown window's list.
- The number or rows in a pulldown window are
- based on the number of selections and segmenting
- lines in same.
-
-
-
-
- 106
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- CHOICEWIND makes a window with a width based
- on the longest line of text in it or the width of
- the choices in it. The length is based on the
- number of lines of text in the choice window.
-
- This error is reported for INPTWIND and GETANS
- if no window is specified ( BORDER%=0 ) and the
- width of the prompt and/or field will not fit on
- the screen.
-
-
- ERROR 5 The border designation is not valid for the
- calling routine. GETANS does not allow title
- windows. PULLDOWN does not allow title
- windows and only allows right-bottom shadows.
- SEE THE BORDER DESIGNATION CHART.
-
-
- ERROR 6 A request was made to CHNGWIND to make the
- active window a non-existent window or a
- window saved via SAVEWIND. The active window
- can only be a window generated by MAKEWIND.
-
-
- ERROR 8 An window specified in a call to MAKEWIND or
- SAVEWIND previously existed. A window must be
- deleted via a call to DELWIND or RSTRWIND
- before the number assigned to it can be used
- again. This error will not be reported for
- window number 0 as it is not saved.
-
-
- ERROR 9 A call to INPTINIT was not made to initialize
- input memory. INPTINIT must be called once in
- every program prior to calling routines INPTWIND
- MULTINPT, CHOICEWIND, CHOICEBAR or SCRLWIND with
- buttons. If a CLEAR statememt is executed,
- INPTINIT must be called again.
-
-
- ERROR 11 A bad row number was specified in a call to
- PRINTW, PRINTWHOT, LINEW or BOXW. The row
- number must be greater than 0. PRINTW and
- PRINTWHOT allow print on the bottom border.
- LINEW does not. The string specified in a call
- to PRINTW or PRINTWHOT will not fit in the
- window due to it's length or it's left column
- ( start print ) position. The entire box in a
- call to BOXW will not fit in the active window.
- BOXW does not allow row or column value to
- equal 100 to center then box.
-
-
-
-
- 107
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ERROR 12 The position or width of the info-line in a call
- to INFOLINE or PRINTINFO is illegal.
-
- The position or width of the menubar in a call
- to SETPULL or PULLDOWN is illegal.
-
- The position or width of the choicebar in a call to
- CHOICEBAR is illegal.
-
- The left column position is out of range. A
- combination of the left column position plus the
- specified width will not allow the info-line,
- menubar or choicebar to fit on one line. The
- menubar selection or choicebar selections will
- not fit in the specified width. The minimum row
- position, left column position and left column
- plus the width are checked on the calls to INFOLINE
- SETPULL, and CHOICEBAR. The maximum row position
- is checked on the calls to PRINTINFO, PULLDOWN and
- CHOICEBAR and is based on the active number of
- display rows at the time of the call.
-
-
- ERROR 13 This is an array dimension error.
-
- The array ( LIST$() ) in a call to SCRLWIND
- has a lower dimension greater than 1 or an
- upper dimension less then the number of entries
- ( ENTRIES% ) in the list.
-
- The array ( RTRN$() ) specified in a call to
- MULTINPT has a lower dimension of greater than
- one or an upper dimension less than the number
- of fields in the multi-field input screen.
-
-
- ERROR 14 A routine was called with an illegal number of
- selections.
-
- The number of entries ( selections ) in a call
- to SCRLWIND must be greater than one.
-
- The number of selections in an "EXTENDED" scroll
- window exceeds the number or interior rows in the
- scroll window.
-
- The number of selections in a pulldown window's
- menubar, set by routine SETPULL must equal one to
- ten. Routine SETPULL attempted to make a pulldown
- window with no selections in same. This consecutive
- "***"'s may be in the data stream.
-
-
-
-
- 108
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- The number of choices in a call to CHOICEWIND or
- CHOICEBAR must equal one to ten.
-
-
- ERROR 15 The minimum size of a scroll window when routine
- SCRLWIND is called not wide enough or does not
- contain enough rows. The size varies if < OK >
- and < CANCEL > buttons are used. See the descrip-
- tion for routine SCRLWIND for details.
-
-
- ERROR 16 At least one of the strings in the list for a
- scroll window ( SCRLWIND ) will not fit in the
- window, allowing for a space on either side of
- the string. ( non-virtual scroll windows only )
-
-
- ERROR 21 The screen number specified in a call to SETINPT,
- MAKEFIELD, or MULTINPT does not equal one to 10.
-
- The screen number specified in a call to MULTINPT
- or MAKEFIELD has not been defined by a previous
- call to SETINPT. MULTINPT has been called with
- no fields previously defined by MAKEFIELD.
-
-
- ERROR 22 A bad field number has been specified.
-
- Routine MAKEFIELD may use field numbers one to
- 150. The field, however, must not be greater than
- the highest previously defined field number plus
- one.
-
- The TOFLD% argument in a call to MULTINPT is
- attempting to access a field which does not exist
- for the specified MULTI-FIELD input screen
-
- The FROMFLD% argument in a call to MULTINPT does
- not equal zero or a valid field number for the
- specified MULTI-FIELD input screen.
-
-
- ERROR 23 The color of a field in a call to INPTWIND or
- MAKEFIELD equals zero. This includes the field's
- inactive color, active color, or mouse active
- color in a call to MAKEFIELD.
-
-
-
-
-
-
-
-
-
- 109
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- ERROR 24 The field code in INPTWIND does not consist of
- legal characters. ("0","1","2","3","4","5","6",
- "A","L","U","D","P0","P1","P2","P3","P4","P5,
- "P6, "R" or "RP" )
-
- The field code in a call to MAKEFIELD is illegal.
- SEE THE FIELD CODE CHART IN THE APPENDIX.
-
-
- ERROR 25 The requested width of in input field in
- INPTWIND or MAKEFIELD is out of range. The
- maximum width is 15 for numeric fields. The
- minimum width for a numeric field, 0 to 6
- decimal places, is the number decimal places
- plus one. The width for a date field must be
- eight or ten. The minimum width for a alpha-
- numeric field is one. The maximum width is
- 79. The maximum width for windowed fields in
- routine INPTWIND depends on the windows
- location, and the use of buttons.
-
-
- ERROR 26 The left column position plus the width of a
- field defined in a call to MAKEFIELD will not
- allow the field to fit on the screen. The row
- or column position is less than one. The row
- position of a field is greater than the display
- length specified by the previous call to
- SETINPT.
-
-
- ERROR 27 The number of characters in a restrict string
- for an individual field defined in a call to
- MAKEFIELD is greater than 255.
-
-
- ERROR 28 The cumulative total of restrict characters
- for all fields for a multi-field input screen
- defined via MAKEFIELD is greater than 1023.
-
-
- ERROR 29 The screen length when MULTINPT was called was
- not the same as specified when the multi-field
- input screen was defined by SETINPT.
-
- The screen length specified in a call to SETINPT
- was not 25, 43, or 50.
-
-
- ERROR 30 All fields defined by MAKEFIELD are protected
- fields. No input is possible. This error is
- detected when MULTINPT is called.
-
-
-
- 110
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- APPENDIX I
- Color Attribute Chart
-
- ATTRIBUTE BACKGROUND FOREGROUND
-
- START END
-
- 0 ------ 15 BLACK NORMAL
- 16 ------ 31 BLUE NORMAL
- 32 ------ 47 GREEN NORMAL
- 48 ------ 63 CYAN NORMAL
- 64 ------ 79 RED NORMAL
- 80 ------ 95 MAGENTA NORMAL
- 96 ------ 111 BROWN NORMAL
- 112 ----- 127 LIGHT GRAY NORMAL
- 128 ----- 143 BLACK FLASHING
- 144 ----- 159 BLUE FLASHING
- 160 ----- 175 GREEN FLASHING
- 176 ----- 191 CYAN FLASHING
- 192 ----- 207 RED FLASHING
- 208 ----- 223 MAGENTA FLASHING
- 224 ----- 239 BROWN FLASHING
- 240 ----- 255 LIGHT GRAY FLASHING
- -----------------------------------------------------------
- OFFSET FROM START FOREGROUND
-
- 0 BLACK
- 1 BLUE
- 2 GREEN
- 3 CYAN
- 4 RED
- 5 MAGENTA
- 6 BROWN
- 7 LIGHT GRAY
- 8 DARK GRAY
- 9 LIGHT BLUE
- 10 LIGHT GREEN
- 11 LIGHT CYAN
- 12 LIGHT RED
- 13 LIGHT MAGENTA
- 14 YELLOW
- 15 WHITE
-
-
- EXAMPLE: If the attribute = 242 then the background color is
- light gray and the foreground flashes. The offset
- from start = 242 - 240 or 2, so the foreground color
- is green.
-
- NOTE: GETANS and SCRLWIND allow a flashing border only.
- CHNGPULL, PULLDOWN, AND MULTINPT will not allow a flashing
- border or text.
-
-
-
- 111
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- APPENDIX II
- MAKEFIELD code chart
-
- The code for each field can be up to five digits long. The
- digits are numbered 5,4,3,2 and 1, with 1 being the least
- significant digit and 5 the most significant digit.
-
- DIGIT NUMBER ------- 5 4 3 2 1
-
- EXAMPLE CODE% ------ 2 1 0 1 6
-
- - Digits 1 and 2 set the field type and can be:
-
- 00 ------ Numeric - no decimal places.
- 01 to 06 - Numeric - 1 to 6 decimal places
- 10 ------- Numeric - no decimal places - padded with leading
- zeros.
- 11 to 16 - Numeric - 1 to 6 decimal places - padded with
- leading zeros.
- 30 ------- Numeric - real number.
- 40 ------- Numeric - real number - padded with leading zeros.
-
- 07 ------- Alpha/numeric
- 17 ------- Alpha/numeric -- UPPER CASE
- 27 ------- Alpha/numeric -- lower case
-
- 08 ------- Date ( Type determined by call to INPTINIT. )
-
- - Digit 3 sets a protected field ( No entry ) and can be:
-
- 0 -------- Field is NOT protected.
- 1 -------- Field is protected. ( or "mouse only selectable" )
-
- - Digit 4 sets an Auto-advance field and can be:
-
- 0 -------- Field is NOT Auto-advance.
- 1 -------- Field is Auto-advance.
-
- - Digit ---- 5 sets an Auto-exit field and can be:
-
- 0 -------- Field is NOT Auto-exit.
- 1 -------- Field is Auto-exit.
- 3 -------- Field is Fixed-choice. ( also auto-exit ). Use
- for buttons, fixed choice, or "mouse selectable".
-
- EXAMPLE: IF CODE% = 11016 the field is decimal with padded
- zero's, Auto-advance, and Auto-exit.
-
- NOTE: If digit 3 is set to 1 (protected) digits 4 and 5 are
- ignored. EXCEPTION: If the field code = 30100 the field
- is a "mouse only selectable field"
-
-
-
-
- 112
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- APPENDIX III
-
- Border Designations
-
- DIGIT NUMBER 3 2 1
- EXAMPLE BORDER% 1 2 1 ( 121 )
-
- Digit 1 = Border Digit 2 = Shadow Digit 3 = Title Box
-
- Example (121) = title box/ left bottom shadow/ single line border
- ------------------------------------------------------------------
- :---Border---: :------- Shadow -----------:
- Border Single Double Title Right Left Left Right
- Value Line Line Box Bottom Bottom Top Top
-
- 0 No border, title box, or shadow
- 1 X
- 2 X
- 10 X
- 11 X X
- 12 X X
- 20 X
- 21 X X
- 22 X X
- 30 X
- 31 X X
- 32 X X
- 40 X
- 41 X X
- 42 X X
-
- 100 X
- 101 X X
- 102 X X
- 110 X X
- 111 X X X
- 112 X X X
- 120 X X
- 121 X X X
- 122 X X X
- 130 X X
- 131 X X X
- 132 X X X
- 140 X X
- 141 X X X
- 142 X X X
- -------------------------------------------------------------------
- See individual routines for restrictions.
-
-
-
-
-
-
-
- 113
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- APPENDIX IV
-
- GETAKEY CODE VALUES
-
- GETAKEY% Key(s)
-
- 1 to 255 The equivalent key which produces the
- corresponding ASCII/IBM code.
- ( 65 = A, 66 = B etc. )
-
- 15104 F1
- 15360 F2
- 15616 F3
- 15872 F4
- 16128 F5
- 16384 F6
- 16640 F7
- 16896 F8
- 17152 F9
- 17408 F10
- 18432 UP ARROW
- 20480 DOWN ARROW
- 19200 LEFT ARROW
- 19712 RIGHT ARROW
- 18688 PGUP
- 20736 PGDN
- 18176 HOME
- 20224 END
- 20992 INSERT
- 21248 DELETE
- 29952 CTRL-END
- 30464 CTRL-HOME
-
- NOTE: THIS LIST IS NOT ALL INCLUSIVE. IT DOES PROVIDE
- VALUES FOR COMMON KEYS OR KEY COMBINATIONS.
-
- To find the values for other keys or key combinations this
- small program can be used. Press ESC to end the program.
-
- DECLARE FUNCTION GETAKEY%%
-
- DO
- DO
- A%= GETAKEY%
- LOOP WHILE A% = 0
- PRINT A%
- LOOP WHILE A% <> 27
- END
-
- As a key or key combination is pressed the corresponding
- value will print on the screen.
-
-
-
-
- 114
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-
-
-
-
-
-
- RESTRICTIONS
-
- ------------------------------------------------------------
- UNENHANCED LIBRARY
-
- THE UNENHANCED LIBRARY IS OFFERED ON A TRIAL BASIS.
- IT MAY BE USED FOR EVALUATION. EXECUTABLE PROGRAMS MADE
- FROM THE UNENHANCED LIBRARY MAY NOT BE DISTRIBUTED. IF YOU
- DECIDE THE ROUTINES ARE USEFUL, REGISTRATION MAY BE
- ACCOMPLISHED BY VIRTUE OF SECURING THE ENHANCED VERSION.
- THE UNENHANCED LIBRARY MAY NOT BE ALTERED. THE UNENHANCED
- LIBRARY MAY BE DISTRIBUTED, PROVIDED IT IS DISTRIBUTED WITH
- ALL OF THE FILES INCLUDED IN QWEZ60.ZIP, PWEZ60.ZIP OR
- VWEZ60.ZIP.
-
- THE FILES, QWEZ60.ZIP, PWEZ60.ZIP, OR VWEZ60.ZIP MAY BE
- UP-LOADED IN THEIR ENTIRETY TO ANY PUBLIC OR PRIVATE BULLETIN
- BOARD. INDIVIDUAL FILES NOT BE UP-LOADED.
-
- ------------------------------------------------------------
- ENHANCED VERSION
-
- ALL OF THE SOURCE CODE, OBJECT CODE, AND LIBRARIES
- INCLUDED IN WINDOWS R-E-Z IS COPYRIGHTED. COPYING AND
- DISTRIBUTING ANY OF THE MATERIAL IS PROHIBITED. PROGRAMS
- MADE USING ANY OF THE PROCEDURES FROM WINDOWS R-E-Z IN THE
- EXECUTABLE (.EXE ) FORM MAY BE DISTRIBUTED FREELY BY
- ORIGINAL PURCHASERS.
-
- ------------------------------------------------------------
- COPYRIGHT WARNING
-
- EXTRANEOUS CODE HAS BEEN INSERTED IN THE LIBRARY
- FILES. ANY PROGRAM MADE USING THE LIBRARY FILES IS
- DISTINGUISHABLE AS ORIGINATING FROM WINDOWS R-E-Z. CONNECT
- SOFTWARE WILL TAKE APPROPRIATE ACTION IF COPYRIGHT
- INFRINGEMENT IS DISCOVERED.
-
- ------------------------------------------------------------
- DISCLAIMER
-
- ANY LOSS INCURRED FROM THE USE OF THE PROCEDURES CON-
- TAINED IN WINDOWS R-E-Z, OR ANY LOSS BELIEVED TO BE CAUSED
- FROM THE PROCEDURES CONTAINED IN WINDOWS R-E-Z IS NOT THE
- RESPONSIBILITY OF CONNECT SOFTWARE. USERS OF WINDOWS R-E-Z
- ASSUME FULL RESPONSIBILITY FOR THE USE OF ANY PROCEDURES
- CONTAINED WITHIN.
- ------------------------------------------------------------
-
-
-
-
-
-
-
- 115
- Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
-
-
-
-