home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / QWINDO.ZIP / QWMANUAL.DOC < prev    next >
Encoding:
Text File  |  1990-01-01  |  117.0 KB  |  4,028 lines

  1.  
  2.  
  3.   ##########################\      ###\                                 ###\
  4.   ##########################\      ###\                                 ###\
  5.   ###\                   ###\       ###\                               ###\
  6.   ###\                   ###\       ###\                               ###\
  7.   ###\                   ###\        ###\                             ###\
  8.   ###\                   ###\        ###\                             ###\
  9.   ###\                   ###\         ###\          ######\          ###\
  10.   ###\                   ###\         ###\          ######\          ###\
  11.   ###\                   ###\          ###\        ###\ ###\        ###\
  12.   ###\                   ###\          ###\        ###\ ###\        ###\
  13.   ###\                   ###\           ###\      ###\   ###\      ###\
  14.   ###\                   ###\           ###\      ###\   ###\      ###\
  15.   ###\          ###\     ###\            ###\    ###\     ###\    ###\
  16.   ###\           ###\    ###\            ###\    ###\     ###\    ###\
  17.   ##########################\   ###\      ###\  ###\       ###\  ###\   ###\
  18.   ##########################\   ###\       #######\        #########\   ###\
  19.                    ###\
  20.                     ###\
  21.                      ###\
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                        QUICKWINDOWS USERS GUIDE
  31.  
  32.                              Revision 1.2
  33.  
  34.                              Oct 15, 1987
  35.  
  36.                       Manual Rev. Date 12/31/89
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.                    Software Interphase Incorporated
  53.                            5 Bradley Street
  54.                       Providence, RI 02908-2304
  55.                             (401) 274-5465
  56.  
  57.  
  58.     Entire contents copyrighted 1987 by Software Interphase, Inc.
  59.                          All rights reserved.
  60.  
  61. LICENSE AGREEMENT
  62.  
  63. Software Interphase, Inc. provides these programs and grants you a
  64. TEMPORARY non-exclusive license for their use. This license is
  65. expires 30 days after you begin using QuickWindows, unless you
  66. register your copy with us. At that time you will be granted a full
  67. (Not time-limited) license. This known as FREE-WARE of SHAREWARE.
  68.  
  69. You assume responsibility for selection of these programs for your
  70. purposes, and for the installation, use, and results from use of the
  71. programs.
  72.  
  73. QuickWindows is distributed freely in this form so that a maximum
  74. number of people will be able to try it. We expect that if you
  75. continue to use it for more than 30 days, you will respect our work
  76. enough that you will either register your copy with us, or purchase
  77. QuickWindows Advanced, our commercially available library.
  78.  
  79. See the text file README.TXT for more information
  80. regarding registration of QuickWindows, and how you can receive
  81. QuickWindows Advanced at a discount.
  82.  
  83. This license is effective from December 31, 1989 until terminated.
  84.  
  85. This License is governed by the laws of the State of Rhode Island.
  86.  
  87. LIMITED WARRANTY
  88.  
  89.   THE PROGRAMS CONTAINED IN THIS PACKAGE ARE PROVIDED "AS IS" WITHOUT
  90. WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
  91. TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  92. PURPOSE. THE ENTIRE RISK RELATED TO THE QUALITY AND PERFORMANCE OF THE
  93. PROGRAMS IS ON YOU. IN THE EVENT THERE IS ANY DEFECT, YOU ASSUME THE ENTIRE
  94. COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. SOME STATES DO NOT
  95. ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT
  96. APPLY TO YOU. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS WHICH VARY FROM
  97. STATE TO STATE.
  98.  
  99.   Software Interphase, Inc. does not warrant that the functions contained in
  100. the programs will meet your requirements or that the operation of the
  101. programs will be uninterrupted or error-free. 
  102.  
  103. U.S. GOVERNMENT RESTRICTED RIGHTS
  104. The software and documentation is provided with restricted rights. The use,
  105. duplication, or disclosure by the Government is subject to restrictions as
  106. set forth in subdivision (b)(3)(ii) of The Rights in Technical Data and
  107. Computer Software clause at 252.227-7013. Contractor/manufacturer is
  108. Software Interphase, Inc., 5 Bradley Street, Providence, RI 02908.
  109.  
  110. QuickWindows and Syslink are trademarks of:
  111.  
  112.     Software Interphase, Inc.
  113.     5 Bradley Street
  114.     Providence, RI 02908-2304
  115.  
  116.  
  117.  
  118.  
  119.                           TABLE OF CONTENTS
  120. ----------------------------------------------------------------------
  121.  
  122.  
  123. CHAPTER ONE: PRODUCT OVERVIEW
  124.         Chapter Summary . . . . . . . . . . . . . . . . .   1
  125.         What is QuickWindows? . . . . . . . . . . . . . .   2
  126.         QuickWindows Function Summary . . . . . . . . . .   3
  127.         Hardware Required . . . . . . . . . . . . . . . .   4
  128.         Software Requirements . . . . . . . . . . . . . .   5
  129.         Limitations . . . . . . . . . . . . . . . . . . .   6
  130.         Disk Contents . . . . . . . . . . . . . . . . . .   8
  131.  
  132.  
  133. CHAPTER TWO: GETTING STARTED
  134.     Chapter Summary . . . . . . . . . . . . . . . . .   9
  135.         Installation  . . . . . . . . . . . . . . . . . .  10
  136.         Running QuickBASIC with QuickWindows  . . . . . .  11
  137.         The QuickWindows Demo program . . . . . . . . . .  12
  138.         Rules for using QuickWindows with your programs .  13
  139.         Template code for programs using QuickWindows . .  14
  140.  
  141. CHAPTER THREE: USING QUICKWINDOWS
  142.     Chapter Summary . . . . . . . . . . . . . . . . .  17
  143.         Definitions . . . . . . . . . . . . . . . . . . .  18
  144.         Windows . . . . . . . . . . . . . . . . . . . . .  19
  145.         Pop-up and Pull-down Menus  . . . . . . . . . . .  20
  146.         Message Boxes . . . . . . . . . . . . . . . . . .  20
  147.         Dialog Boxes  . . . . . . . . . . . . . . . . . .  20
  148.         List Boxes  . . . . . . . . . . . . . . . . . . .  21
  149.  
  150.  
  151. CHAPTER FOUR: WINDOW FUNCTION REFERENCE
  152.         Window Function Summary . . . . . . . . . . . . .  22
  153.         WATTR      Change Attribute of Window . . . . . .  23
  154.         WBOX       Draw a Box in a Window . . . . . . . .  24
  155.         WBUTTONGET Get Button Selection Status  . . . . .  25
  156.         WBUTTONSET Define an Input Button . . . . . . . .  26
  157.         WCATTR     Change Attribute of a Column . . . . .  28
  158.         WCLEAR     Clear a Portion of a Window  . . . . .  29
  159.         WCLOSE     Close a Window . . . . . . . . . . . .  30
  160.         WCLOSEALL  Close All Opened Windows . . . . . . .  31
  161.         WCLS       Clear a Specified Window . . . . . . .  32
  162.         WCOLOR     Set Default Back/Foreground Color  . .  33
  163.         WCOPYSTR   Copy String Array into Window  . . . .  34
  164.         WCSROFF    Turn off Visible Cursor  . . . . . . .  35
  165.         WCSRON     Turn on Visible Cursor . . . . . . . .  36
  166.         WCSRPOS    Return Cursor Position within Window .  37
  167.         WDELROW    Delete a Row . . . . . . . . . . . . .  38
  168.         WGETCH     Get Character & Attribute from Window.  39
  169.         WHINT      Set Row to High-Intensity Mode . . . .  40
  170.  
  171.  
  172.                           TABLE OF CONTENTS
  173. ----------------------------------------------------------------------
  174.  
  175.  
  176.         WINPUT     General Purpose Window Input . . . . .  41
  177.         WINSROW    Insert Row in Window . . . . . . . . .  46
  178.         WLINT      Set Row to Low-Intensity Mode  . . . .  47
  179.         WLOCATE    Set Relative Cursor Pos in Window  . .  48
  180.         WMOUSE     Get Relative Mouse Position in Window.  49
  181.         WOPEN      Open a New Window  . . . . . . . . . .  50
  182.         WPRINT     Output a String to a Window  . . . . .  52
  183.         WPUTCH     Put a Character & Attribute in Window.  53
  184.         WRATTR     Change Attribute of a Row in Window  .  54
  185.         WREV       Reverse Attributes of Entire Window  .  55
  186.         WREVLINE   Reverse Attributes of Line in Window .  56
  187.         WSELECT    Select Window for Default Output . . .  57
  188.         WTITLE     Put a Title at Top-Center of Window  .  58
  189.         WVSCROLL   Scroll Window Vertically Up or Down  .  59
  190.         WWRAP      Turn Word Wrap On/Off in Window  . . .  60
  191.  
  192.  
  193. CHAPTER FIVE: MENU FUNCTION REFERENCE
  194.         Menu Function Reference . . . . . . . . . . . . .  61
  195.         HELPMENU   Display Help Information . . . . . . .  62
  196.         MENUBAR    Define a Menu Bar  . . . . . . . . . .  64
  197.         MENUGET    Make Selection from Menu . . . . . . .  65
  198.         MENUOFF    Turn Off Menu Bar  . . . . . . . . . .  67
  199.         MENUON     Turn On Menu Bar . . . . . . . . . . .  68
  200.         MENUOPTION Enable/Disable a Menu Option . . . . .  69
  201.         MENUSET    Define a Set of Option for Menu  . . .  70
  202.         POPMENU    Display a Pop-up Menu  . . . . . . . .  72
  203.         POPMENU1   Show a Pop-up Menu (W/Option Attribs).  74
  204.         POPMENUH   Display a Pop-up Horizontal Menu . . .  75
  205.         POPMENUV   Display a Pop-up Vertical Menu . . . .  78
  206.  
  207.  
  208. CHAPTER SIX: SCREEN FUNCTION REFERENCE
  209.         Screen Function Summary . . . . . . . . . . . . .  81
  210.         ATTRSCRN   Set the Screen Attributes  . . . . . .  82
  211.         BOX        Draw a Box on the Screen . . . . . . .  83
  212.         BOX8SET    Define a Box Style . . . . . . . . . .  84
  213.         DMASCRN    Enable/Disable Video Retrace Wait  . .  85
  214.         GETCH      Get Character & Attribute from Screen.  86
  215.         GETSCRN    Store Portion of Screen into Array . .  87
  216.         PUTCH      Put Character & Attribute onto Screen.  88
  217.         PUTSCRN    Restore Portion of Screen from Array .  89
  218.         REVSCRN    Reverse Foreground/Background Attribs.  90
  219.         VSCROLL    Scroll Portion of Screen Vertically. .  91
  220.  
  221.  
  222.                           TABLE OF CONTENTS
  223. ----------------------------------------------------------------------
  224.  
  225. CHAPTER SEVEN: MOUSE FUNCTION REFERENCE
  226.         Mouse Function Summary  . . . . . . . . . . . . .  92
  227.         MBPRESS    Get Button Pressed Status  . . . . . .  93
  228.         MBREL      Get Button Released Status . . . . . .  94
  229.         MHIDE      Turn Off the Mouse Cursor  . . . . . .  95
  230.         MINIT      Initialize the Mouse . . . . . . . . .  96
  231.         MOUSE      Get Mouse Position & Button Status . .  97
  232.         MPENOFF    Turn Off Light Pen Emulation Mode  . .  98
  233.         MPENON     Turn On Light Pen Emulation Mode . . .  99
  234.         MRATIO     Set Mouse Step Ratio . . . . . . . . . 100
  235.         MSETPOS    Set the Mouse Cursor Position  . . . . 101
  236.         MSETX      Set the Min/Max (x-axis) Coordinates . 102
  237.         MSETY      Set the Min/Max (y-axis) Coordinates . 103
  238.         MSHOW      Turn On the Mouse Cursor . . . . . . . 104
  239.  
  240. APPENDIX
  241.         Appendix 1 (Screen Attributes). . . . . . . . . . 105
  242.     Appendix 2 (Keyboard Scan Codes). . . . . . . . . 106
  243.  
  244.  
  245.                                PREFACE
  246. ----------------------------------------------------------------------
  247.  
  248.  
  249. WHY QUICKWINDOWS?
  250.  
  251.      The much-maligned basic programming language is still going strong
  252. after years of use by millions of programmers world-wide.  Even
  253. though it is "fashionable" to program in 'C', Modula, Prolog or one
  254. of the other new languages, Basic still holds its own as the language
  255. of choice for MOST of the programmers out there.  Please note we are
  256. not trying to suggest that Basic is BETTER, but equal to, the others for
  257. everyday jobs.
  258.  
  259. Why? Because it is easy to learn, use, and debug programs in Basic. 
  260. Basic is used so often because more can be done in shorter time than
  261. with almost any other language.
  262.  
  263. IT IS IN THIS SAME SPIRIT THAT QUICKWINDOWS WAS DEVELOPED!
  264.  
  265. For the first time the Basic programmer can develop those
  266. user-friendly applications with windows, pull-down menus, and a
  267. mouse interface.  All with the speed of assembly language, and the
  268. ease of use for the programmer of the Basic language.
  269.  
  270. In short, A VERSATILE USER INTERFACE SYSTEM!
  271.  
  272.  
  273. QuickWindows was conceived, written and developed by Don Lambert.
  274. Don is a professional programmer whose credits include the famous
  275. Syslink bulletin board system and Waste Information Management
  276. Software. QuickWindows was initially developed as an in-house tool
  277. to speed up the development of applications. After we used it
  278. awhile, we realized the time and effort saved could be appreciated by
  279. ALL Basic programmers.  We decided to offer QuickWindows as a
  280. complete windowing/menu/mouse system.  And here you have it.
  281.  
  282. ENJOY!
  283.  
  284.                            ACKNOWLEDGEMENTS
  285. ----------------------------------------------------------------------
  286.  
  287. Thanks first go to my family and close friends who have put up with
  288. the ridiculous hours I put in working on the development of
  289. QuickWindows and bringing it to you.
  290.  
  291. Second thanks to Mark Titterington and Solution Design for their
  292. support and help with the package, and particularly the documentation.
  293.  
  294. Finally I'd like to thank Bill Gates and Microsoft for providing the
  295. programming world with a great language dialect, interpreters, and
  296. compilers (especially QuickBASIC).
  297.  
  298. And to all the rest of you..... THANKS!
  299.  
  300.  
  301.  
  302.                                              Don Lambert
  303.  
  304.                           TECHNICAL SUPPORT
  305. ----------------------------------------------------------------------
  306. Technical Support is provided through Syslink, our Bulletin Board
  307. System (BBS). You can leave a message to the SYSOP there describing
  308. your problem and we will leave a response as soon as possible.
  309.  
  310.  
  311. NOTE: IF YOU HAVE NOT REGISTERED YOUR COPY OF QUICKWINDOWS, YOU ARE
  312. NOT ENTITLED TO TECH SUPPORT. 
  313.  
  314. If you decide to upgrade to QuickWindows Advanced (A commercial
  315. product), then you will receive normal telephone support in addition
  316. to the BBS.
  317.  
  318. The BBS can be reached at (401) 272-1138 or (401) 272-1239.
  319.  300, 1200, 2400, or 9600 baud.
  320.  24 hours a day.
  321.  
  322.  Anyone can sign-up and use the BBS, but there may be areas which are
  323.  restricted to people who have purchased (or registered) a product 
  324.  from us. There are example programs on the BBS, and demo programs
  325.  for all our products.
  326.  
  327.  
  328.                                                             Page 01
  329.  
  330.  
  331.                              CHAPTER ONE
  332.  
  333. INTRODUCTION
  334.  
  335.  
  336. 1.1     Product Overview
  337.  
  338. 1.2     QuickWindows Function List
  339.  
  340. 1.3     Hardware Requirements
  341.  
  342. 1.4     Software Requirements
  343.  
  344. 1.5     Limitations Of QuickWindows
  345.  
  346. 1.6     QuickWindows Distribution Disk Contents
  347.  
  348.                                                             Page 02
  349.  
  350.  
  351. 1.1  PRODUCT OVERVIEW
  352. ----------------------------------------------------------------------
  353.  
  354.  
  355.  
  356.  
  357.    WHAT IS QUICKWINDOWS?
  358.  
  359.    QuickWindows is a complete screen, window, and menu
  360.    handling system designed for the Basic programmer. The
  361.    idea is that rather than "re-inventing the  wheel" as
  362.    they say, you can benefit by the work that's already
  363.    been done by us.
  364.  
  365.    The system is in the form of a "Library".  This library
  366.    is a special file which contains only the machine
  367.    language form of all the functions included. If the
  368.    library is used from within QuickBASIC, then the
  369.    compiler generates calls to the routines in the library
  370.    each time you compile in memory.
  371.  
  372.    If a stand-alone program is generated, then the
  373.    routines from the library are linked into the file with
  374.    the machine code generated from your basic code. Each
  375.    function is accessed by "calling" it from your QuickBASIC
  376.    or BASIC application.
  377.  
  378.    The system consists of functions logically grouped into
  379.    four sections: WINDOWS, MENU, SCREEN, and MOUSE.
  380.  
  381.    For more information, see section 3.0 "Using
  382.    QuickWindows", and the appropriate reference section of
  383.    this manual.
  384.                                                             Page 03
  385.  
  386.  
  387. 1.2  QUICKWINDOWS FUNCTION LIST
  388. ----------------------------------------------------------------------
  389.  
  390.  
  391.         WINDOW HANDLING FUNCTIONS
  392.  
  393.         WATTR       WBOX        WBUTTONGET     WBUTTONSET
  394.         WCATTR      WCLEAR      WCLOSE         WCLOSEALL
  395.         WCLS        WCOLOR      WCOPYSTR       WCSROFF
  396.         WCSRON      WCSRPOS     WDELROW        WGETCH
  397.         WHINT       WINPUT      WINSROW        WLINT
  398.         WLOCATE     WMOUSE      WOPEN          WPRINT
  399.         WPUTCH      WRATTR      WREV           WREVLINE
  400.         WSELECT     WSETCSR     WTITLE         WVSCROLL
  401.         WWRAP
  402.  
  403.  
  404.         MENU HANDLING FUNCTIONS
  405.  
  406.         HELPMENU    MENUBAR     MENUGET        MENUOFF
  407.         MENUON      MENUOPTION  MENUSET        POPMENU1
  408.         POPMENU     POPMENUH    POPMENUV
  409.  
  410.  
  411.  
  412.         SCREEN HANDLING FUNCTIONS
  413.  
  414.         ATTRSCRN    BOX         BOX8SET        DMASCRN
  415.         GETCH       GETSCRN     PUTCH          PUTSCRN
  416.         REVSCRN     VSCROLL
  417.  
  418.  
  419.  
  420.         MOUSE HANDLING FUNCTIONS
  421.  
  422.         MBPRESS     MBREL       MHIDE          MINIT
  423.         MOUSE       MPENOFF     MPENON         MSETPOS
  424.         MSETX       MSETY       MSHOW          MRATIO
  425.                                                             Page 04
  426.  
  427.  
  428. 1.3  HARDWARE REQUIREMENTS
  429. ----------------------------------------------------------------------
  430.  
  431.  
  432.  
  433.         HARDWARE REQUIREMENTS
  434.  
  435.    QuickWindows has been designed to work properly on the
  436.    (*)IBM-PC, IBM-XT, IBM-AT, PS/2, and any close compatible.  By
  437.    close compatibles we mean most clones.  As long as the
  438.    video memory is mapped to standard locations (B8000H CGA
  439.    and B0000H Mono), and the video boards are hardware
  440.    compatible with IBM MGA or IBM CGA cards, there should
  441.    not be any problem.  QuickWindows should also work under
  442.    an EGA emulating the MGA/CGA text modes (80 x 25).
  443.  
  444.    The computer should have either a hard disk or at least
  445.    two floppy disk drives.  Although it's certainly possible
  446.    to run off one floppy drive, it's really impractical.
  447.  
  448.  
  449.    MEMORY REQUIRED
  450.  
  451.    QuickWindows adds approximately 21K to your object
  452.    code.  As a practical matter, you should have a minimum
  453.    of at least 320K of AVAILABLE memory before you run
  454.    QuickBASIC with the library.  With the inexpensive cost
  455.    of memory devices these days, we recommend that you have
  456.    at least 512K of memory installed.
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474. * IBM-PC, IBM-XT, IBM-AT are trademarks of International Business Machines
  475.   Corporation, Boca Roton, Florida.
  476.                                                             Page 05
  477.  
  478.  
  479. 1.4  SOFTWARE REQUIREMENTS
  480. ----------------------------------------------------------------------
  481.  
  482.  
  483.  
  484.         OPERATING SYSTEMS
  485.  
  486.         QuickWindows works with PC/MS DOS version 2.1 or later.
  487.  
  488.  
  489.  
  490.         COMPILER COMPATIBILITY
  491.  
  492.         QuickWindows works with Microsoft's BASIC Compiler (versions 5.36,
  493.         6.x, or 7.0) and QuickBASIC compiler (versions 2.x, 3.x, 4.x, and
  494.         QB Extended).
  495.  
  496.  
  497.  
  498.         COMPATIBILITY PROBLEMS
  499.  
  500.         Please report any incompatibility to us as soon as you
  501.         can.  If at all possible, we will correct the problem
  502.         or give you a work-around.
  503.  
  504.  
  505.  
  506.                                                             Page 06
  507.  
  508.  
  509. 1.5  LIMITATIONS OF QUICKWINDOWS
  510. ----------------------------------------------------------------------
  511.  
  512.  
  513.  
  514.  
  515.     VIOLATIONS OF LIMITATIONS
  516.  
  517.    There is no known problem in QuickWindows that can cause
  518.    your program to "crash".  Most routines use an error flag
  519.    by setting the window id = -1 when an internal error
  520.    occurred.  Most programmer errors will cause one or more
  521.    things to happen.
  522.  
  523.    1.) -1 is returned in the window id.
  524.  
  525.    2.) Text in a window will be truncated and/or
  526.        wrapped around in an undesirable fashion.
  527.  
  528.    3.) No action will be taken at all.
  529.  
  530.  
  531.    LIMITATIONS
  532.  
  533.    MAXIMUM NUMBER OF WINDOWS: Up to 32 windows can be
  534.    active or open at one time.
  535.  
  536.    OVERLAPPING WINDOWS: If windows are overlapped, they
  537.    must be removed (closed) in reverse order, (top to
  538.    bottom).  If the windows do not overlap, they can be
  539.    closed in any order.
  540.  
  541.    VIRTUAL SCREENS: QuickWindows presently DOES NOT
  542.    support "virtual screens".  This means you cannot write
  543.    into a window that is underneath another, or is not
  544.    opened.  We feel that this is a minor limitation that
  545.    does not affect 99% of the users, and allows us to keep
  546.    QuickWindows SMALL & FAST.
  547.  
  548.    SCREEN SIZE: In no case exceed 24 lines or 80 columns.
  549.    QuickWindows does very little checking, thus keeping the
  550.    overhead low and the library fast.
  551.  
  552.    MENUBAR: Up to 10 menus may be defined in the menubar.
  553.    Each menu can have up to 16 options.
  554.  
  555.    MENU TEXT: Each menu in the pull-down menu system can
  556.    have up to 300 characters of text for each (not
  557.    including QuickWindows generated spaces).
  558.  
  559.    POPMENUH & POPMENUV: Cannot exceed 255 items in the list.
  560.  
  561.                                                             Page 07
  562.  
  563.  
  564. LIMITATIONS OF QUICKWINDOWS                 (Continued)
  565. ----------------------------------------------------------------------
  566.  
  567.  
  568.  
  569.    ** IMPORTANT BUG **
  570.  
  571.    There is a "bug" (Acknowledged by Microsoft) in
  572.    QuickBASIC versions 2.x and 3.0 which can cause users of
  573.    QuickWindows to encounter an undeserved "Out of String
  574.    Space" error in large programs. The error has to do with
  575.    passing STRING CONSTANTS ONLY.
  576.  
  577.    Each time an assembly language routine is called, any
  578.    string constants are put onto a first-in, last-out stack
  579.    called a "heap".  When the assembler routine returns
  580.    control to QuickBASIC, the string constants should be
  581.    removed from this area, BUT ARE NOT.  So after many calls
  582.    with string constants, the heap runs out of space.  There
  583.    is no safe way for QuickWindows to get around this
  584.    problem unfortunately.
  585.  
  586.    If your application program doesn't use that many
  587.    string constants, this problem won't affect you that
  588.    much.  You can monitor the amount of free string space
  589.    left by using the FRE("") function in BASIC.
  590.  
  591.    However, if you do run into a problem, there is a way to
  592.    work around it.  Equate all your string constants to a
  593.    variable, then use this variable name when you call the
  594.    function.  This is our suggestion, even though it's a
  595.    little cumbersome.  It ensures that your program will not
  596.    crash unexpectedly.  You can allocate one string variable
  597.    name to be used (assigned) over and over, such as A$.
  598.  
  599.         EXAMPLE:
  600.  
  601.         INSTEAD OF:   CALL WPRINT(1,"Hello world")
  602.  
  603.              USE:   A$="Hello world":CALL WPRINT(1,A$)
  604.  
  605.    It has been found out that this bug also affects
  606.    subprograms.  Apparently, subprograms are treated like
  607.    an assembly language call, thus exhibit this same bug
  608.    with the string constants.
  609.  
  610.                                                             Page 08
  611.  
  612.  
  613. 1.6  QUICKWINDOWS DISTRIBUTION DISK CONTENTS
  614. ----------------------------------------------------------------------
  615.  
  616.  
  617.  
  618.  
  619.    The distribution disk supplied contains a file entitled
  620.    "README.TXT".
  621.  
  622.    This file contains a descriptive list of all the files
  623.    on the disk, their use or importance to you and other
  624.    valuable information which for one reason or another
  625.    didn't make it into the manual.  The file is in straight
  626.    ASCII form, so may be viewed on your text/word processor,
  627.    or may be "typed" from the DOS command line.
  628.  
  629.  
  630.         TO VIEW THIS FILE ON SCREEN:
  631.  
  632.    STEP 1 - Change to the drive and directory where the
  633.             file is located.
  634.  
  635.    STEP 2 - ENTER:   TYPE README.TXT <cr>
  636.  
  637.  
  638.  
  639.  
  640.         TO PRINT THIS FILE OUT TO THE PRINTER:
  641.  
  642.    STEP 1 - Change to the drive and directory where the
  643.             file is located.
  644.  
  645.    STEP 2 - ENTER:   TYPE README.TXT > PRN <cr>
  646.                                                             Page 09
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.                              CHAPTER TWO
  654.  
  655.  
  656.                            GETTING STARTED
  657.  
  658.  
  659.  
  660.  
  661.  
  662.         2.1     Installing QuickWindows On Your Computer
  663.  
  664.         2.2     Running QuickBASIC With QuickWindows
  665.  
  666.         2.3     The QuickWindows Demo Program
  667.  
  668.                                                             Page 10
  669.  
  670.  
  671. 2.1  INSTALLING QUICKWINDOWS ON YOUR COMPUTER
  672. ----------------------------------------------------------------------
  673.  
  674.  
  675.    FLOPPY BASED SYSTEMS
  676.  
  677.    If you have a hard (fixed) disk installed in your
  678.    computer, skip this section and proceed to the next
  679.    (Hard disk systems).
  680.  
  681.    First make a copy of your QuickWindows distribution
  682.    disk using the DOS command DISKCOPY.  Put the original
  683.    disks away in a safe location and only use the copies
  684.    you have made.
  685.  
  686.    STEP 1: Format a disk with the DOS format command, and
  687.    the option /S to make a system disk.  Load whatever
  688.    QuickBASIC files are needed.  (Consult your QuickBASIC
  689.    manual)
  690.  
  691.    STEP 2: Copy the QuickWindows library (both .OBJ and
  692.    .EXE versions) onto this disk.  This disk becomes your
  693.    main program disk (ie drive A).  All your source code
  694.    can reside on another disk in drive B.
  695.  
  696.  
  697.  
  698.    HARD DISK SYSTEMS
  699.  
  700.    1. Copy all the files from the distribution disk's root directory to the
  701.    same directory that QB resides in.
  702.  
  703.    2. Copy all the files from the appropriate sub-directory on the
  704.    distribution disk for your version of QuickBASIC.  Subdirectories are
  705.    \QB3 for QB version 2.x or 3.x, \QB4 for QB version 4.0, \QB45 for QB
  706.    version 4.5, and \BC7 for BASIC Compiler version 7.0.  For BASIC compiler
  707.    version 6, use the files in the \QB4 directory.
  708.  
  709.                                                             Page 11
  710.  
  711.  
  712. 2.2  RUNNING QUICKBASIC WITH QUICKWINDOWS
  713. ----------------------------------------------------------------------
  714.  
  715.  
  716.  
  717.  
  718.    USING QUICKWINDOWS WITH PROGRAMS COMPILED IN MEMORY
  719.  
  720.    To start QuickBASIC with the QuickWindows functions
  721.    available:
  722.  
  723.        For QB 3.x, type       QB /L QW.EXE
  724.        For QB 4.x, type       QB /L QW.QLB
  725.        For BASIC 7, type      QBX /L QW.QLB
  726.  
  727.    exactly as it appears above.  This instructs QuickBASIC
  728.    to load the entire library into memory.
  729.  
  730.    You will now have all the QuickWindows functions
  731.    available for your use while your program is compiled
  732.    in memory.
  733.  
  734.  
  735.    MAKING STAND ALONE PROGRAMS WITH QUICKWINDOWS
  736.  
  737.    1.  Compile your program using the BCOM option.
  738.    2a. For all versions of QuickBASIC (just substitute proper BCOM library
  739.        below):
  740.        Link your object code with QuickWindows' library
  741.        and reference the BCOMxx.LIB library:
  742.  
  743.                 OBJECT MODULES [.OBJ]: MYPROG (cr)
  744.                 Run File [MYPROG.EXE]: (cr)
  745.                 List File [NUL.MAP]: (cr)
  746.                 Libraries [.LIB]: BCOM45+QW (assuming QB ver 4.5)
  747.      
  748.    2b. For BASIC 7.0, compile using MAKE .EXE FILE option under the RUN
  749.        menu.  Then select Stand-Alone .EXE, Far Strings, and No string
  750.        compression.  Next select MAKE .EXE and EXIT.  The compiler will
  751.        compile your program and link it with QuickWindows.
  752.        (for compiling large programs with multiple modules, consult the
  753.        BASIC reference manual.  But remember always to link in QW.LIB).
  754.  
  755.    3. Your program will now be in .EXE format and may
  756.       be executed directly from DOS.
  757.                                                             Page 12
  758.  
  759.  
  760. 2.3  THE QUICKWINDOWS DEMO PROGRAM
  761. ----------------------------------------------------------------------
  762.  
  763.  
  764.  
  765.  
  766.      WHY HAVE A DEMO PROGRAM?
  767.  
  768.    QuickWindows comes with a demo program that provides
  769.    you with a few things of interest.
  770.  
  771.    1.) The demo program gives you a general idea of what
  772.        QuickWindows is capable of.
  773.  
  774.    2.) The demo program is INVALUABLE for programmers.
  775.        It gives you information and examples on how to
  776.        use QuickWindows with your programs.  It also
  777.        serves as a tutorial.
  778.  
  779.    Before you start programming with QuickWindows, you
  780.    should make a listing of the demo program on your
  781.    printer.  There is an example of use of most every
  782.    single function in the library.
  783.  
  784.  
  785.                                                             Page 13
  786.  
  787.  
  788. 2.4  RULES FOR USING QUICKWINDOWS WITH YOUR PROGRAMS
  789. ----------------------------------------------------------------------
  790.  
  791. 1. The syntax for all of the QuickWindows commands are the same as
  792.    in the manual, except for the following:
  793.  
  794.    a. The method of passing arrays (integer or string) depends on the
  795.       version of QuickBASIC you are using...
  796.  
  797.          Format for QuickBASIC 4.0, QB 4.5, QBX, BASIC 6.0 and 7.0
  798.          (as described in the manual):
  799.             CALL GETSCRN(1, 1, 80, 24, array%())
  800.             CALL WOPEN(1,1,80,24,2,&H74,"",scrn%(),1)
  801.          CALL MENUSET(n,o,2,&H04,&H0F,&H07,255,VARPTR(menu$(0)))
  802.             Notice that string arrays require VARPTR, while integer arrays
  803.         do not.
  804.  
  805.          QuickBASIC version 3.0 or BASIC Compiler 5.36:
  806.             CALL GETSCRN(1, 1, 80, 24, VARPTR(array%(0)))
  807.             CALL WOPEN(1,1,80,24,2,&H74,"",VARPTR(scrn%(0)),1)
  808.          CALL MENUSET(n,o,2,&H04,&H0F,&H07,255,VARPTR(menu$(0)))
  809.             Notice that both string and integer arrays require VARPTR.
  810.  
  811.       So wherever we reference an array in a call to a QuickWindows
  812.       function, you have to change a reference like ... array%(), 
  813.       to ...VARPTR(array%(0)), .
  814.  
  815. 2. Before using any of the features within the QuickWindows Library, you
  816.    first must call QWINIT.  This command sets up internal variables and
  817.    routines within QuickWindows for your specific BASIC compiler.
  818.  
  819.    For QuickBASIC 3.x or BASIC Compiler 5.36:  CALL QWINIT(3)
  820.    For QuickBASIC 4.x or BASIC Compiler 6.xx:  CALL QWINIT(4)
  821.    For BASIC 7.0 Compiler or QB Extended:  CALL QWINIT(5)
  822.  
  823. 3. Make all the integer arrays passed to QuickWindows DYNAMIC, with the
  824.    metacommand REM $DYNAMIC. 
  825.  
  826. 4. Make sure all the parameters that you pass to QuickWindows are of the
  827.    proper type (ie, integer or string).  Many problems people have reported
  828.    resulted in their passing of floating point numbers.
  829.  
  830. 5. Make sure you have the exact number of parameters as shown in the
  831.    documentation.  Lockups will occur when you use the improper number
  832.    of parameters.  The wrong number of parameters results in the stack
  833.    containing the wrong address of your program for QuickWindows to
  834.    return to.
  835.  
  836.  
  837.                                                             Page 14
  838.  
  839.  
  840. 2.5  TEMPLATE CODE FOR PROGRAMS USING QUICKWINDOWS
  841. ----------------------------------------------------------------------
  842.  
  843.   The following code fragment demonstrates the recommended way of using
  844.   the QuickWindows Library.
  845.  
  846.   REM $DYNAMIC
  847.   DEFINT a-z
  848.  
  849.   COMMON SHARED w1(),w2(),...       'used if your program has many modules.
  850.   DIM SHARED w1(2000),w2(1000)        'size of dimension depends on size of
  851.                     'window.  SHARED is used if you use these
  852.                        'same arrays within Sub-Programs.
  853.   CALL QWINIT(5)            'initialize for BASIC 7.0.
  854.   CALL MINIT(s,b)            'initialize mouse.
  855.  
  856.   CALL WOPEN(1, 1, 80, 24, 2, &H71, "TITLE", w1(), 1)
  857.                     'open a window the size of the whole
  858.                     'screen with a double line border. &H71
  859.                     'sets the window attribute to white
  860.                      'background with blue foreground.  By
  861.                     'using the &H (hex) notation, it is
  862.                     'quicker and easier to set video
  863.                     'attributes once you get the hang of it.
  864.   
  865.  
  866.  
  867.                                                             Page 16
  868.  
  869.  
  870. 2.6  Notes
  871.  
  872.  
  873.                                                             Page 17
  874.  
  875.  
  876.  
  877.                             CHAPTER THREE
  878.  
  879.  
  880.                           USING QUICKWINDOWS
  881.  
  882.  
  883.  
  884.         3.1     Definitions
  885.  
  886.         3.2     Windows
  887.  
  888.         3.3     Pop-Up And Pull-Down Menus
  889.  
  890.         3.4     Message Boxes
  891.  
  892.         3.5     Dialog Boxes
  893.  
  894.         3.6     List Boxes
  895.  
  896.                                                             Page 18
  897.  
  898.  
  899. 3.1 Definitions
  900. ----------------------------------------------------------------------
  901.  
  902.  
  903.  
  904.  
  905. QuickWindows is a powerful library to aid you in creating windows,
  906. pop-up and pull-down menus, message boxes, dialog boxes, and list
  907. boxes.  This chapter provides you with conceptual information on how
  908. to do all of these.  Some specific examples are provided only as 
  909. guidelines.  But first, we'll start off with a few definitions:
  910.  
  911. Pop-up menu         A menu that appears on the screen and
  912.                     presents options to the user. Once an
  913.                     option is selected, the menu disappears
  914.                     and the screen underneath is restored.
  915.  
  916. Pull-down menu      A two-dimensional menuing system whereby
  917.                     the user selects from a group of menus
  918.                     along the top of the screen and another
  919.                     menu "drops down" underneath the chosen
  920.                     menu.  The user then can select an
  921.                     option from the "dropped down" menu.
  922.  
  923. Message boxes       A pop-up window that contains a message
  924.                     and a set of pre-defined input
  925.                     responses.  Once the user has selected a
  926.                     response, the window disappears.
  927.  
  928. Dialog boxes        A pop-up window or a box within a window
  929.                     that allows the user to input text
  930.                     information.  This is the simplest form
  931.                     of a dialog box supported by this version
  932.                     of QuickWindows.
  933.  
  934. List boxes          A pop-up window containing a list of
  935.                     items.  The list may be arranged
  936.                     horizontally or vertically.  The user
  937.                     may scroll page-by-page through the
  938.                     list, and make a choice of one of the
  939.                     items in the list.
  940.                                                             Page 19
  941.  
  942.  
  943. 3.2  Windows
  944. ----------------------------------------------------------------------
  945.  
  946.  
  947.    Creating a window must be done with the WOPEN command.
  948.    You must specify where the window will start and end,
  949.    what color and style the border will be, what title (if
  950.    any), and what the window ID will be.  All subsequent
  951.    window functions will reference this window by its ID.
  952.    Since the screen contents underneath the window will
  953.    automatically be saved, you must also specify an
  954.    INTEGER ARRAY that will hold the screen information.
  955.    You must make sure that the array is DIM'd large enough
  956.    or a program crash may occur.  The size of the integer
  957.    array can be calculated by the following formula:
  958.  
  959.          Window size=(x2-x1+1)*(y2-y1+1)
  960.  
  961.    where   (x1,y1) are the top-left window coordinates,
  962.    and     (x2,y2) are the bottom-right window coordinates
  963.  
  964.    Once a window has been opened, you may write to it,
  965.    take input from it, alter its attributes, clear it,
  966.    etc.  In short, there are functions in QuickWindows
  967.    that treat the window like the regular display.  Here
  968.    are some of the most commonly used functions in dealing
  969.    with windows:
  970.  
  971.    WOPEN, WCLS, WCOLOR, WLOCATE, WCSRPOS, WWRAP, WPRINT,
  972.    WINPUT, and WCLOSE.
  973.  
  974.    QuickWindows offers you other functions to be used as
  975.    building blocks to create your own versions of pop-up
  976.    and pull-down menus, and message and dialog boxes.
  977.  
  978.    See the reference section and the source code to the
  979.    demo program for specific information on opening a
  980.    window, writing to it, and closing it.
  981.  
  982.                                                             Page 20
  983.  
  984.  
  985. 3.3  Pop-up and Pull-down Menus
  986. ----------------------------------------------------------------------
  987.  
  988.    QuickWindows provide you simple functions to design a
  989.    versatile menuing system.  Only one function is needed
  990.    to create a pop-up menu.  Once a selection has been
  991.    made, the menu disappears and the screen is restored.
  992.    For a clear-cut example of designing a pop-up menu
  993.    with QuickWindows, see sample file POPMENU.BAS.
  994.         
  995.    Designing a pull-down menuing system is slightly more
  996.    involved.  First you must define what the menus will
  997.    be along the top of the screen (MENUBAR).  Next you
  998.    have to define the options for each of the menus
  999.    (MENUSET).  Thirdly, the pull-down menu system must be
  1000.    enabled (MENUON).  And lastly, a continuous check
  1001.    must be done to see if the user has made a selection
  1002.    (MENUGET).  See the source code in the sample program
  1003.    for a complete example on how to use the pull-down
  1004.    menuing system.
  1005.  
  1006.  
  1007. 3.4  Message Boxes
  1008. ----------------------------------------------------------------------
  1009.  
  1010.    Making a message box is done simply by opening a
  1011.    window, printing the message, and waiting for some
  1012.    action from the user through the use of WBUTTONSET and
  1013.    WBUTTONGET. See example program BUTTON.BAS
  1014.  
  1015.  
  1016. 3.5  Dialog Boxes
  1017. ----------------------------------------------------------------------
  1018.    Dialog boxes are similar to message boxes except that
  1019.    a text input response is requested from the user.  Note that this
  1020.    idea is a simple form of a dialog box.  Our QuickWindows Advanced
  1021.    library supports even more complex dialog boxes that contain
  1022.    fielded input boxes, checkboxes, radio buttons, pushbuttons,
  1023.    horizontal and vertical scroll lists, and rangebars.     And with our
  1024.    Designer QuickWindows package, laying out dialog boxes is a snap!
  1025.  
  1026.                                                             Page 21
  1027.  
  1028.  
  1029.  
  1030. 3.6  List boxes
  1031. ----------------------------------------------------------------------
  1032.  
  1033.  
  1034.    QuickWindows supports two types of list boxes, vertical
  1035.    (POPMENUV) and horizontal (POPMENUH).  The inherent
  1036.    operation of a list box allows the user to scroll
  1037.    through a list of items (singularly or page-by-page)
  1038.    and make a selection.  The keyboard or a mouse may be
  1039.    used.
  1040.  
  1041.    To make a list box, you must first open a window
  1042.    and set up attribute parameters.  Next put your list
  1043.    of items into a string array.  The array can be sorted
  1044.    for some typical applications.  Lastly, make a call to
  1045.    POPMENUV or POPMENUH for selection.   A scroll bar
  1046.    appears on the right side for POPMENUV and on the
  1047.    bottom for POPMENUH.  Using the mouse with the scroll
  1048.    bar will allow the user to quickly move anywhere within
  1049.    the list of items.
  1050.  
  1051.    See the source code in the demo and the reference
  1052.    section for more detailed information.
  1053.  
  1054.  
  1055.                                                             Page 22
  1056.  
  1057.  
  1058.  
  1059.                              CHAPTER FOUR
  1060.  
  1061.                      REFERENCE FOR WINDOWING FUNCTIONS
  1062.  
  1063.  
  1064.         4.1     WATTR           Change Attribute Of Window
  1065.         4.2     WBOX            Draw A Box In A Window
  1066.         4.3     WBUTTONGET      Get Button Selection Status
  1067.         4.4     WBUTTONSET      Define An Input Button
  1068.         4.5     WCATTR          Change Attribute Of A Column
  1069.         4.6     WCLEAR          Clear Portion Of A Window
  1070.         4.7     WCLOSE          Close A Window
  1071.         4.8     WCLOSEALL       Close All Opened Windows
  1072.         4.9     WCLS            Clear Entire Window
  1073.         4.10    WCOLOR          Set Default Foreground/Background Color
  1074.         4.11    WCOPYSTR        Copy String Array Into Window
  1075.         4.12    WCSROFF         Turn Off Visible Cursor
  1076.         4.13    WCSRON          Turn On Visible Cursor
  1077.         4.14    WCSRPOS         Return Cursor Position Within Window
  1078.         4.15    WDELROW         Delete A Row
  1079.         4.16    WGETCH          Get A Character & Attribute From Window
  1080.         4.17    WHINT           Set Row To High-Intensity Mode
  1081.         4.18    WINPUT          General Purpose Window Input
  1082.         4.19    WINSROW         Insert Row In Window
  1083.         4.20    WLINT           Set Row To Low-Intensity Mode
  1084.         4.21    WLOCATE         Set Relative Cursor Position In Window
  1085.         4.22    WMOUSE          Get Relative Mouse Position In Window
  1086.         4.23    WOPEN           Open A New Window
  1087.         4.24    WPRINT          Output A String To A Window
  1088.         4.25    WPUTCH          Put A Character & Attribute In A Window
  1089.         4.26    WRATTR          Change Attribute Of A Row In Window
  1090.         4.27    WREV            Reverse Attributes Of Entire Window
  1091.         4.28    WREVLINE        Reverse Attributes Of Line In Window
  1092.         4.29    WSELECT         Select Window For Default Output
  1093.         4.30    WSETCSR         Set Cursor Shape In Window
  1094.         4.31    WTITLE          Put A Title At Top-Center Of Window
  1095.         4.32    WVSCROLL        Scroll Window Vertically Up Or Down
  1096.         4.33    WWRAP           Turn Word Wrap On/Off In Window
  1097.  
  1098.  
  1099.                                                             Page 23
  1100.  
  1101.  
  1102. 4.1  WATTR - CHANGE ATTRIBUTE OF WINDOW
  1103. ----------------------------------------------------------------------
  1104.  
  1105. SYNTAX:
  1106.  
  1107. CALL WATTR(id%,attribute%)
  1108.  
  1109. id% = The number of a currently opened window.
  1110.  
  1111. attribute% = The foreground/background attribute value.
  1112.  
  1113.  
  1114.  
  1115. DESCRIPTION:
  1116.  
  1117. Changes attribute of the entire window screen inside the borders.
  1118.  
  1119.  
  1120.  
  1121. See Appendix 1 for determining attribute values.
  1122.  
  1123.  
  1124.  
  1125. SEE ALSO: WCATTR, WRATTR, WCOLOR
  1126.  
  1127.                                                             Page 24
  1128.  
  1129.  
  1130. 4.2  WBOX - DRAW A BOX IN A WINDOW
  1131. ----------------------------------------------------------------------
  1132.  
  1133. SYNTAX:
  1134.  
  1135. CALL WBOX(id%,x1%,y1%,x2%,y2%,style%,color%)
  1136.  
  1137. id% = The current opened window id.
  1138.  
  1139. x1%,y1% = The top-left coordinates inside the opened window,
  1140.             relative to the start of the opened window at
  1141.             (0,0).
  1142.  
  1143. x2%,y2% = The bottom-right coordinates inside the opened
  1144.             window.  x2,y2 must not exceed relative size of
  1145.             opened window.
  1146.  
  1147. style%  = The box style.  Can be one of the following:
  1148.  
  1149.                BOX STYLES 
  1150.  
  1151.            0 - no border
  1152.            1 - single line border
  1153.            2 - double line border
  1154.            3 - light shadow border
  1155.            4 - medium shadow border
  1156.            5 - dark shadow border
  1157.            6 - solid border
  1158.            7 - double line with square corners
  1159.            8 - user definable border (see BOX8SET)
  1160.  
  1161.  
  1162. color%  = The foreground/background attribute value.
  1163.             See Appendix 1 for attribute/color values.
  1164.  
  1165.  
  1166.  
  1167. DESCRIPTION:
  1168.  
  1169. WBOX makes a box within a window.
  1170.  
  1171. The x1,y1,x2,y2 coordinates are relative to the top-left
  1172. corner (0,0) in the window id%.
  1173.                                                             Page 25
  1174.  
  1175.  
  1176. 4.3  WBUTTONGET - GET BUTTON SELECTION STATUS
  1177. ----------------------------------------------------------------------
  1178.  
  1179. SYNTAX:
  1180.  
  1181. CALL WBUTTONGET(focus%,start%,number%,result%)
  1182.  
  1183. focus%  = The button to highlight upon entering this
  1184.           function.
  1185.           
  1186. start%  = Is the button number to start checking.
  1187.           (range 1 to 32)
  1188.  
  1189. number% = Is the number of buttons to check from
  1190.           start% to start%+number%.  Cannot exceed 32.
  1191.  
  1192. result% = Contains a button number that is selected,
  1193.           otherwise a 0 if no selection is made.
  1194.  
  1195.  
  1196.  
  1197. DESCRIPTION:
  1198.  
  1199. When a button is highlighted, the input focus is on that button.
  1200. To move the input focus, the left/right arrow keys may be used or 
  1201. the mouse cursor may be placed on top of the button and the left
  1202. mouse button must be held.
  1203.  
  1204. To select a button, press ENTER or release the left mouse button.
  1205. A button may also be selected by pressing the appropriate key as
  1206. defined in kb% in WBUTTONSET.
  1207.  
  1208. If no button is selected, result%=0. In order to continue to monitor
  1209. button selection status, you must call WBUTTONGET every time result%=0.
  1210.  
  1211.  
  1212.  
  1213. SEE ALSO: WBUTTONSET
  1214.                                                             Page 26
  1215.  
  1216.  
  1217. 4.4  WBUTTONSET - DEFINE AN INPUT BUTTON
  1218. ----------------------------------------------------------------------
  1219.  
  1220. SYNTAX:
  1221.  
  1222. CALL WBUTTONSET(id%,button%,kb%,hstyle%,hattr%,lstyle%,
  1223. lattr%,x%,y%,button$)
  1224.  
  1225.  
  1226. id% = The current opened window id.
  1227.  
  1228. button% = The button number (range 1 to 32).
  1229.  
  1230. kb%     = The keyboard value for directly selecting this button.
  1231.           A value of 0 disables direct selection of this button.
  1232.  
  1233. hstyle% = The button box style for highlighting the input focus.
  1234.           (Currently not used in QuickWindows).
  1235.  
  1236. hattr%  = The attribute of the button when it becomes focused or selected.
  1237.  
  1238. lstyle% = The button box style.
  1239.  
  1240. lattr%  = The button attribute for non-focused mode.
  1241.  
  1242. x%,y%   = The relative starting coordinates of button within specified window.
  1243.           The top-left inside part of a window is considered coordinates (0,0).
  1244.  
  1245. button$ = The text string within button, such as a command or
  1246.           acknowledgement prompt.
  1247.  
  1248.                                                    Cont.....
  1249.  
  1250.                                                             Page 27
  1251.  
  1252.  
  1253. WBUTTONSET - DEFINE AN INPUT BUTTON        (continued)
  1254. ----------------------------------------------------------------------
  1255.  
  1256.  
  1257.  
  1258. DESCRIPTION:
  1259.  
  1260. WBUTTONSET defines an input button within a specified window.
  1261.  
  1262.                BOX STYLES
  1263.  
  1264.            0 - no border
  1265.            1 - single line border
  1266.            2 - double line border
  1267.            3 - light shadow border
  1268.            4 - medium shadow border
  1269.            5 - dark shadow border
  1270.            6 - solid border
  1271.            7 - double line with square corners
  1272.            8 - user definable border (see BOX8SET)
  1273.  
  1274.  
  1275. The height of the button will always be 3 lines deep
  1276. (top border, text, bottom border).
  1277. The width will depend on the length of button$.
  1278. The button will contain a left border, space, text, space, and right
  1279. border. Make sure that the button dimensions will fit within the
  1280. specified window.
  1281.  
  1282. Up to 32 buttons may be defined within any opened window at one time.
  1283.  
  1284. NOTE:  Buttons should be defined consecutively to allow
  1285.        WBUTTONGET to work properly.
  1286.  
  1287.  
  1288.  
  1289. SEE ALSO: WBUTTONGET
  1290.                                                             Page 28
  1291.  
  1292.  
  1293. 4.5  WCATTR - CHANGE ATTRIBUTE OF A COLUMN
  1294. ----------------------------------------------------------------------
  1295.  
  1296. SYNTAX:
  1297.  
  1298. CALL WCATTR(id%,column%,attribute%)
  1299.  
  1300. id% = The number of a currently opened window.
  1301.  
  1302. column% = The column in which the attribute will be changed.
  1303.  
  1304. attribute% = The foreground/background attribute value.
  1305.                See Appendix 1 for determining attribute values.
  1306.  
  1307.  
  1308.  
  1309. DESCRIPTION:
  1310.  
  1311. Changes attribute of a column within a specified window.
  1312.  
  1313.  
  1314.  
  1315. SEE ALSO: WATTR, WRATTR, WCOLOR
  1316.                                                             Page 29
  1317.  
  1318.  
  1319. 4.6  WCLEAR - CLEAR PORTION OF A WINDOW
  1320. ----------------------------------------------------------------------
  1321.  
  1322. SYNTAX:
  1323.  
  1324. CALL WCLEAR(id%,x1%,y1%,x2%,y2%)
  1325.  
  1326. id%     = The number of a currently opened window.
  1327.  
  1328. x1%,y1% = The top-left coordinates inside the opened window, relative to
  1329.           the start of the opened window at (0,0).
  1330.  
  1331. x2%,y2% = The bottom-right coordinates inside the opened window.
  1332.           x2,y2 must not exceed relative size of opened window.
  1333.  
  1334.  
  1335.  
  1336. DESCRIPTION:
  1337.  
  1338. Clears a window within a specified window.
  1339. WCLEAR assumes the attribute defined by the WCOLOR command.
  1340.  
  1341. NOTE:  The mouse cursor is turned off by this command.
  1342.  
  1343.  
  1344.  
  1345. SEE ALSO: WCOLOR, WCLS
  1346.                                                             Page 30
  1347.  
  1348.  
  1349. 4.7  WCLOSE - CLOSE A WINDOW
  1350. ----------------------------------------------------------------------
  1351.  
  1352. SYNTAX:
  1353.  
  1354. CALL WCLOSE(id%)
  1355.  
  1356. id%  = The number of a currently opened window.
  1357.  
  1358.  
  1359.  
  1360. DESCRIPTION:
  1361.  
  1362. Closes a currently opened window and restores the screen beneath the window.
  1363.  
  1364. If a window ID is already closed, no action will be taken.
  1365.  
  1366. NOTE: The mouse cursor is turned off by this command.
  1367.  
  1368.  
  1369.  
  1370. SEE ALSO: WOPEN
  1371.                                                             Page 31
  1372.  
  1373.  
  1374. 4.8  WCLOSEALL - CLOSE ALL OPENED WINDOWS
  1375. ----------------------------------------------------------------------
  1376.  
  1377. SYNTAX:
  1378.  
  1379. CALL WCLOSEALL
  1380.  
  1381.  
  1382.  
  1383. DESCRIPTION:
  1384.  
  1385. Closes all windows that are currently opened. Does not restore screen
  1386. contents to previous values.
  1387.  
  1388. The WCLOSEALL function releases all internal pointers, frees up space
  1389. used by any opened windows, and restores video and keyboard device drivers
  1390. if modified by QuickWindows.
  1391. The function does not clear any windows that may currently be on the screen.
  1392.  
  1393. NOTE: It is recommended that this function be used at the beginning of
  1394. your application program to assure that all internal pointers are reset.
  1395.  
  1396.  
  1397.  
  1398. SEE ALSO: WOPEN, WCLOSE
  1399.                                                             Page 32
  1400.  
  1401.  
  1402. 4.9  WCLS - CLEAR ENTIRE WINDOW
  1403. ----------------------------------------------------------------------
  1404.  
  1405. SYNTAX:
  1406.  
  1407. CALL WCLS(id%)
  1408.  
  1409. id% = The number of a currently opened window.
  1410.  
  1411.  
  1412.  
  1413. DESCRIPTION:
  1414.  
  1415. Clears entire window and homes cursor to top-left corner of the window.
  1416.  
  1417. The attribute of the cleared window will assume the attribute value
  1418. previously defined by the WOPEN or WCOLOR functions. 
  1419.  
  1420. NOTE:  The mouse cursor is turned off by this command.
  1421.  
  1422.  
  1423.  
  1424. SEE ALSO: WOPEN, WCOLOR
  1425.                                                             Page 33
  1426.  
  1427.  
  1428. 4.10  WCOLOR - SET DEFAULT FOREGROUND/BACKGROUND COLOR
  1429. ----------------------------------------------------------------------
  1430.  
  1431. SYNTAX:
  1432.  
  1433. CALL WCOLOR(id%,attrib%)
  1434.  
  1435. id% = The number of a currently opened window.
  1436.  
  1437. attrib% = The foreground/background attribute value.
  1438.  
  1439.  
  1440.  
  1441. DESCRIPTION:
  1442.  
  1443. Sets the foreground/background attribute for all subsequent WPRINT or
  1444. WCOPYSTR operations.
  1445.  
  1446. See Appendix 1 for determining attribute values.
  1447.  
  1448.  
  1449.  
  1450. SEE ALSO: WPRINT, WCOPYSTR
  1451.                                                             Page 34
  1452.  
  1453.  
  1454. 4.11  WCOPYSTR - COPY STRING ARRAY INTO WINDOW
  1455. ----------------------------------------------------------------------
  1456.  
  1457. SYNTAX:
  1458.  
  1459. CALL WCOPYSTR(id%,position%,elements%,VARPTR(array$(start%)))
  1460.  
  1461. id%       = The number of a currently opened window.
  1462.  
  1463. position% = The string starting position (similar to
  1464.             MID$(array$(start%),position%)).
  1465.  
  1466. elements% = The number of array elements to be copied.
  1467.  
  1468. array$    = The string array.
  1469.  
  1470. start%    = The starting element of the string array.
  1471.  
  1472.  
  1473.  
  1474. DESCRIPTION:
  1475.  
  1476. Moves the contents of a string array into specified window as fast as
  1477. possible.
  1478.  
  1479. This function is primarily used for text editing routines and menu display.
  1480. Array display begins at the top-left corner of the window.
  1481. If the WWRAP mode is set to 1, any string elements larger than the window
  1482. width will be truncated (not displayed).
  1483.  
  1484.  
  1485.  
  1486. SEE ALSO: WCOLOR, WWRAP, WPRINT
  1487.                                                             Page 35
  1488.  
  1489.  
  1490. 4.12  WCSROFF - TURN OFF VISIBLE CURSOR
  1491. ----------------------------------------------------------------------
  1492.  
  1493. SYNTAX:
  1494.  
  1495. CALL WCSROFF(id%)
  1496.  
  1497. id% = The number of a currently opened window.
  1498.  
  1499.  
  1500.  
  1501. DESCRIPTION:
  1502.  
  1503. Turns off the physical cursor within specified window.
  1504.  
  1505. Each window has its own physical cursor.
  1506. WCSRON and WCSROFF turn on and off the cursor respectively.
  1507. A physical cursor is the block which follows the text as it is being
  1508. displayed.
  1509.  
  1510.  
  1511.  
  1512. SEE ALSO: WCSRON, WSETCSR, WCSRPOS, WLOCATE
  1513.                                                             Page 36
  1514.  
  1515.  
  1516. 4.13  WCSRON - TURN ON VISIBLE CURSOR
  1517. ----------------------------------------------------------------------
  1518.  
  1519. SYNTAX:
  1520.  
  1521. CALL WCSRON(id%)
  1522.  
  1523. id% = The number of a currently opened window.
  1524.  
  1525.  
  1526.  
  1527. DESCRIPTION:
  1528.  
  1529. Turns on the physical cursor within specified window.
  1530. Each window has its own physical cursor.
  1531. WCSRON and WCSROFF turn on and off the cursor respectively.
  1532. A physical cursor is the block which follows the text as it is being
  1533. displayed.
  1534.  
  1535.  
  1536. SEE ALSO: WCSROFF, WSETCSR, WCSRPOS, WLOCATE
  1537.                                                             Page 37
  1538.  
  1539.  
  1540. 4.14  WCSRPOS - RETURN CURSOR POSITION WITHIN WINDOW
  1541. ----------------------------------------------------------------------
  1542.  
  1543. SYNTAX:
  1544.  
  1545. CALL WCSRPOS(id%,x%,y%)
  1546.  
  1547. id% = The number of a currently opened window.
  1548.  
  1549. x%  = Column position of cursor.
  1550.  
  1551. y%  = Row position of cursor.
  1552.  
  1553.  
  1554. DESCRIPTION:
  1555.  
  1556. Returns the current relative cursor position within specified window.
  1557.  
  1558. This function returns the current relative (column,row) cursor position
  1559. into (x%,y%) respectively.
  1560.  
  1561. The values will fall between (0,0) and (max x,max y) size of the window.
  1562.  
  1563.  
  1564.  
  1565. SEE ALSO: WLOCATE
  1566.                                                             Page 38
  1567.  
  1568.  
  1569. 4.15  WDELROW - DELETE A ROW
  1570. ----------------------------------------------------------------------
  1571.  
  1572. SYNTAX:
  1573.  
  1574. CALL WDELROW(id%,y%)
  1575.  
  1576. id% = The number of a currently opened window.
  1577.  
  1578. y%  = The relative row position within the window.
  1579.  
  1580.  
  1581.  
  1582. DESCRIPTION:
  1583.  
  1584. Deletes a row of characters at y% and moves all subsequent rows up to y%,
  1585. leaving last row blank.
  1586.  
  1587. NOTE: The mouse cursor will be turned off by this command.
  1588.  
  1589.  
  1590.  
  1591. SEE ALSO: WINSROW
  1592.                                                             Page 39
  1593.  
  1594.  
  1595. 4.16  WGETCH - GET A CHARACTER & ATTRIBUTE FROM WINDOW
  1596. ----------------------------------------------------------------------
  1597.  
  1598. SYNTAX:
  1599.  
  1600. CALL WGETCH(id%, x%, y%, char%, attr%)
  1601.  
  1602. id% = The number of a currently opened window.
  1603.  
  1604. x% = The relative column position within the window.
  1605.  
  1606. y% = The relative row position within the window.
  1607.  
  1608.  
  1609.  
  1610. RETURNS:
  1611.  
  1612. char%  = The character at x%,y% in window id%.
  1613.  
  1614. attr%  = The attribute of char%.
  1615.  
  1616.  
  1617.  
  1618. DESCRIPTION:
  1619.  
  1620. WGETCH returns the character and attribute in the specified position of
  1621. the window.
  1622.  
  1623.  
  1624.  
  1625. SEE ALSO: WPUTCH
  1626.                                                             Page 40
  1627.  
  1628.  
  1629. 4.17  WHINT - SET ROW TO HIGH-INTENSITY MODE
  1630. ----------------------------------------------------------------------
  1631.  
  1632. SYNTAX:
  1633.  
  1634. CALL WHINT(id%,y%)
  1635.  
  1636. id% = The number of a currently opened window.
  1637.  
  1638. y%  = The relative row position within the window.
  1639.  
  1640.  
  1641.  
  1642. DESCRIPTION:
  1643.  
  1644. Sets an entire row of characters to high-intensity.
  1645.  
  1646. This function is useful for highlighting certain selectable menu options,
  1647. for example. High-intensity is set regardless of the color of the characters
  1648. in the line. If a character is already high-intensity, it is left alone.
  1649.  
  1650.  
  1651.  
  1652. SEE ALSO: WLINT
  1653.                                                             Page 41
  1654.  
  1655.  
  1656. 4.18  WINPUT - GENERAL PURPOSE WINDOW INPUT
  1657. ----------------------------------------------------------------------
  1658.  
  1659. SYNTAX:
  1660.  
  1661. CALL WINPUT(id%,strinp$,relpos%,edits%,exits%,accept$, kb%,flag%)
  1662.  
  1663. See additional pages for full calling syntax.
  1664.  
  1665.  
  1666.  
  1667. DESCRIPTION:
  1668.  
  1669. General purpose window input command, with many options.
  1670.  
  1671. Inputting begins at the current window cursor position.
  1672. Use WLOCATE to position window cursor.
  1673.  
  1674.  
  1675.  
  1676.                                                  Cont.....
  1677.                                                             Page 42
  1678.  
  1679.  
  1680. WINPUT - INPUT FROM A WINDOW               (continued)
  1681. ----------------------------------------------------------------------
  1682.  
  1683.  
  1684.  
  1685.                           PARAMETERS PASSED
  1686.  
  1687.  
  1688. id% = The number of a currently opened window.
  1689.  
  1690. strinp$ = The target string to hold input.
  1691.           Length of string determines maximum number of characters accepted.
  1692.           The target string cannot have a string length of 0.
  1693.           Initialize the string with the STRING$ function.
  1694.           ie., strinp$=STRING$(10," ")
  1695.  
  1696. relpos%  = The starting relative cursor position within string.
  1697.            The legal range is from 1 to LEN(strinp$).
  1698.  
  1699. accept$ = Contains only the characters to be accepted during input.
  1700.           If this string contains no characters (ie. null string ""), then
  1701.           acceptance of characters is determined by clearing bits 1-4 of
  1702.           edits%.
  1703.  
  1704.  
  1705.  
  1706.                                                    Cont.....
  1707.                                                             Page 43
  1708.  
  1709.  
  1710. WINPUT - INPUT FROM A WINDOW               (continued)
  1711. ----------------------------------------------------------------------
  1712.  
  1713.  
  1714. edits%  = The setting/clearing of certain bits within edits% determine
  1715.           edit options. The number in the left-most column before each
  1716.           bit assignment below is the decimal value of that bit position.
  1717.           To enable certain edit options, merely add up all the decimal
  1718.           values of the desired bits. That final sum would be edits%.
  1719.  
  1720. Setting each of the bits below has the following effect:
  1721.  
  1722.         1       Bit 0 - Keep contents of old strinp$ upon entering
  1723.  
  1724.         2       Bit 1 - Do not allow letters and spaces
  1725.  
  1726.         4       Bit 2 - Do not allow numbers
  1727.  
  1728.         8       Bit 3 - Do not allow +-. characters
  1729.  
  1730.         16      Bit 4 - Do not allow any characters outside those allowed by
  1731.                 clearing bits 1-3. (Clearing bit 4 = allow ALL characters.)
  1732.  
  1733.         32      Bit 5 - Convert inputted lowercase letters to upper.
  1734.  
  1735.         64      Bit 6 - Convert inputted uppercase letters to lower.
  1736.  
  1737.         128     Bit 7 - Beep operator if exceeding maximum number of
  1738.                 characters during input
  1739.  
  1740.         256     Bit 8 - Allow INS/DEL character editing
  1741.  
  1742.         512     Bit 9 - Allow HOME to position cursor to beginning
  1743.                 of the input line
  1744.  
  1745.         1024    Bit 10- Allow END to position cursor at end
  1746.  
  1747.         2048    Bit 11- Allow inserting while inputting (CNTRL-END
  1748.                 toggles this mode at any time)
  1749.  
  1750.         4096    Bit 12- Cancel all edits if exited by the defined
  1751.                 exit keys (exits%)
  1752.  
  1753.         8192    Bit 13- Normal exit when the string buffer is full
  1754.  
  1755.         16384   Bit 14- Exit if the first mouse button is pressed
  1756.  
  1757.                                                    Cont.....
  1758.                                                             Page 44
  1759.  
  1760.  
  1761. WINPUT - INPUT FROM A WINDOW               (continued)
  1762. ----------------------------------------------------------------------
  1763.  
  1764.  
  1765.  
  1766. exits% = Setting the bits of exits% will allow unconditional keyboard
  1767.          exiting from WINPUT, setting flag% to 0.
  1768.  
  1769.  
  1770.         The bit assignments and decimal values are shown below:
  1771.  
  1772.         Weight      BIT#           ACTION
  1773.  
  1774.         1           Bit  0 - Allow exit if F1 pressed
  1775.         2           Bit  1 - Allow exit if F2 pressed
  1776.         4           Bit  2 - Allow exit if F3 pressed
  1777.         8           Bit  3 - Allow exit if F4 pressed
  1778.         16          Bit  4 - Allow exit if F5 pressed
  1779.         32          Bit  5 - Allow exit if F6 pressed
  1780.         64          Bit  6 - Allow exit if F7 pressed
  1781.         128         Bit  7 - Allow exit if F8 pressed
  1782.         256         Bit  8 - Allow exit if F9 pressed
  1783.         512         Bit  9 - Allow exit if F10 pressed
  1784.         1024        Bit 10 - Allow exit if up-arrow pressed
  1785.         2048        Bit 11 - Allow exit if down-arrow pressed
  1786.         4096        Bit 12 - Allow exit if CNTRL-PGUP pressed
  1787.         8192        Bit 13 - Allow exit if CNTRL-PGDN pressed
  1788.         16384       Bit 14 - Allow exit if ESC pressed
  1789.         
  1790.  
  1791.  
  1792.  
  1793.                                                    Cont.....
  1794.                                                             Page 45
  1795.  
  1796.  
  1797. WINPUT - INPUT FROM A WINDOW               (continued)
  1798. ----------------------------------------------------------------------
  1799.  
  1800.  
  1801.  
  1802. RETURNS:
  1803.  
  1804. The following values are returned by WINPUT:
  1805.  
  1806. kb% = keyboard value if exited by pressing one of the exit keys
  1807.       (as defined by exits%).
  1808.       If flag<-1 then kb% contains the mouse XY cursor position when
  1809.       1st mouse button is pressed.  Y=INT(kb%/256):X=kb% MOD 256
  1810.  
  1811. flag%  = 1  If normal exit from WINPUT. (ie., ENTER or buffer full.)
  1812.  
  1813.        = 0  If exited by pressing one of the exit keys.
  1814.  
  1815.        =-1  If parameter error (such as window id% not open).
  1816.  
  1817.        =-2  If 1st mouse button pressed and mouse position is on window
  1818.             border (and bit 14 of edits% is set).
  1819.  
  1820.        =-3  If 1st mouse button pressed and mouse position is inside of
  1821.             window (and bit 14 of edits% is set).
  1822.  
  1823.        =-4  If 1st mouse button pressed and mouse position is outside of
  1824.             window (and bit 14 of edits% is set).
  1825.  
  1826.  
  1827.  
  1828. SEE ALSO: WLOCATE, WPRINT
  1829.                                                             Page 46
  1830.  
  1831.  
  1832. 4.19  WINSROW - INSERT ROW IN WINDOW
  1833. ----------------------------------------------------------------------
  1834.  
  1835. SYNTAX:
  1836.  
  1837. CALL WINSROW(id%,y%)
  1838.  
  1839. id% = The number of a currently opened window.
  1840.  
  1841. y% = The relative row position within the window.
  1842.  
  1843.  
  1844.  
  1845. DESCRIPTION:
  1846.  
  1847. Inserts a row of characters at y% and moves all subsequent rows down to
  1848. y%+1, leaving y% row blank.
  1849.  
  1850. NOTE:  The mouse cursor is turned off by this command.
  1851.  
  1852.  
  1853.  
  1854. SEE ALSO: WDELROW
  1855.                                                             Page 47
  1856.  
  1857.  
  1858. 4.20  WLINT - SET ROW TO LOW-INTENSITY MODE
  1859. ----------------------------------------------------------------------
  1860.  
  1861. SYNTAX:
  1862.  
  1863. CALL WLINT(id%,y%)
  1864.  
  1865. id% = The number of a currently opened window.
  1866.  
  1867. y% = The relative row position within the window.
  1868.  
  1869.  
  1870.  
  1871. DESCRIPTION:
  1872.  
  1873. Sets an entire row of characters to low-intensity.
  1874.  
  1875. This function is the opposite of WHINT.
  1876. Low-intensity is set regardless of the color of the characters in the line.
  1877. If a character is already low-intensity, it is left alone.
  1878.  
  1879.  
  1880.  
  1881. SEE ALSO: WHINT
  1882.                                                             Page 48
  1883.  
  1884.  
  1885. 4.21  WLOCATE - SET RELATIVE CURSOR POSITION IN WINDOW
  1886. ----------------------------------------------------------------------
  1887.  
  1888. SYNTAX:
  1889.  
  1890. CALL WLOCATE(id%,x%,y%)
  1891.  
  1892. id% = The number of a currently opened window.
  1893.  
  1894. x% = The new relative column position.
  1895.  
  1896. y% = The new relative row position.
  1897.  
  1898.  
  1899.  
  1900. DESCRIPTION:
  1901.  
  1902. Sets relative cursor position within specified window.
  1903. The range of the (x%,y%) value must be within the (0,0) and (max x,max y)
  1904. window size limits.
  1905.  
  1906. See WOPEN for more detail.
  1907.  
  1908.  
  1909.  
  1910. SEE ALSO: WCSRPOS, WOPEN, WPRINT
  1911.                                                             Page 49
  1912.  
  1913.  
  1914. 4.22  WMOUSE - GET RELATIVE MOUSE POSITION IN WINDOW
  1915. ----------------------------------------------------------------------
  1916.  
  1917. SYNTAX:
  1918.  
  1919. CALL WMOUSE(id%,buttonstat%,x%,y%,flag%)
  1920.  
  1921.  
  1922. RETURNS:
  1923.  
  1924. buttonstat%  = is mouse button press status.
  1925.                BIT0 set = left mouse button pressed.
  1926.                BIT1 set = right mouse button pressed.
  1927.                BIT2 set = middle mouse button pressed.
  1928.                NOTE: Middle button for Logitech only.
  1929.  
  1930. x% = Current mouse position for x (column)
  1931.  
  1932. y% = Current mouse position for y (row)
  1933.  
  1934. flag% = The value of flag% determines the meaning of x% and y% as follows:
  1935.  
  1936.       = 0   mouse cursor within specified window borders.
  1937.             x%,y% is relative cursor location within window.
  1938.  
  1939.       = 1   mouse cursor lies on the border of specified window.
  1940.             Border position is returned as:
  1941.  
  1942.                    x% = 0   for left border,
  1943.                    x% = 1   for right border and
  1944.                    y% is position on border.
  1945.  
  1946.                             - OR -
  1947.  
  1948.                    y% = 0   for top border,
  1949.                    y% = 1   bottom border and
  1950.                    x% is position on border.
  1951.  
  1952.        = -1  mouse cursor lies outside specified window.
  1953.               x%,y% is actual physical screen position with
  1954.               range  x:0-79, y:0-23.
  1955.  
  1956.  
  1957. DESCRIPTION:
  1958.  
  1959. Returns current mouse position relative to selected window.
  1960. Call this function with id% set to a current opened window.
  1961.                                                             Page 50
  1962.  
  1963.  
  1964. 4.23  WOPEN - OPEN A NEW WINDOW
  1965. ----------------------------------------------------------------------
  1966.  
  1967. SYNTAX:
  1968.  
  1969. CALL WOPEN(x1%,y1%,x2%,y2%,style%,color%,title$, array%(),id%)
  1970.  
  1971. x1%,y1% = The top-left corner of the window in column,row respectively.
  1972.  
  1973. x2%,y2% = The bottom-right corner of the window in column,row respectively.
  1974.  
  1975. style% = One of the 8 following styles:
  1976.  
  1977.                0 - no border
  1978.                1 - single line border
  1979.                2 - double line border
  1980.                3 - light shadow border
  1981.                4 - medium shadow border
  1982.                5 - dark shadow border
  1983.                6 - solid border
  1984.                7 - double line with square corners
  1985.                8 - user definable border (see BOX8SET)
  1986.  
  1987. color% = The foreground/background attributes of the window.
  1988.          See appendix 1 for explanation of values.
  1989.  
  1990. title$ = The window title (top center of window).
  1991.          If you specify "", then no title is given to the window.
  1992.  
  1993. array% = The integer array to hold the screen information beneath the window.
  1994.          The size of the array is calculated by the following formula:
  1995.  
  1996.                    size = (X2%-X1%+1) * (Y2%-Y1%+1)
  1997.  
  1998.              The size should be a positive value.
  1999.              If not, then the window coordinates are improperly set.
  2000.  
  2001.  
  2002.                                                   Cont.....
  2003.                                                             Page 51
  2004.  
  2005.  
  2006. WOPEN - OPEN A NEW WINDOW                  (continued)
  2007. ----------------------------------------------------------------------
  2008.  
  2009.  
  2010.  
  2011. id% = The window data slot to use.  Maximum is 32 slots
  2012.       (ie 32 windows may be opened at one time).  0 is invalid for WOPEN.
  2013.       A window data slot is an internal area of memory that holds all
  2014.       pointers and data about a particular window. If a window data slot is
  2015.       already used (another window is opened under this slot) then the
  2016.       function will be cancelled.
  2017.  
  2018.  
  2019.  
  2020. DESCRIPTION:
  2021.  
  2022. Opens a new window and saves portion of screen under new window.
  2023.  
  2024. The array% should be DIM'd large enough to hold the screen information.
  2025.  
  2026. x1,x2 must fall within the range of 1 to 80.
  2027. y1,y2 must fall within the range of 1 to 25.
  2028.  
  2029. NOTE:  The mouse cursor is turned off by this command.
  2030.  
  2031.  
  2032.  
  2033. SEE ALSO: WCLOSE, BOX8SET
  2034.                                                             Page 52
  2035.  
  2036.  
  2037. 4.24  WPRINT - OUTPUT A STRING TO A WINDOW
  2038. ----------------------------------------------------------------------
  2039.  
  2040. SYNTAX:
  2041.  
  2042. CALL WPRINT(id%,string)
  2043.  
  2044. id% = The number of a currently opened window.
  2045.  
  2046. string = A valid string variable or string expression.
  2047.  
  2048.  
  2049.  
  2050. DESCRIPTION:
  2051.  
  2052. Outputs a string to a specified window.
  2053.  
  2054. A carriage return may be forced by embedding the (~) character within the
  2055. string, rather than including the ...+CHR$(13)+... sequence.
  2056. Example: CALL WPRINT(1,"First line~Second line")
  2057. The (~) character is equivalent to CHR$(126).
  2058.  
  2059. The following control codes are recognized by the WPRINT handling driver:
  2060.  
  2061.         Code      Action                      
  2062.  
  2063.           7       Bell
  2064.           8       Backspace cursor
  2065.           9       TAB stops every 8th position
  2066.          10       CR+LF sequence
  2067.          11       Home cursor
  2068.          12       Clear window and home cursor
  2069.          13       CR+LF sequence
  2070.          126      CR+LF sequence
  2071.  
  2072. NOTE:  The mouse cursor is turned off by this command.
  2073.  
  2074.  
  2075.  
  2076. SEE ALSO: WLOCATE, WCOLOR, WWRAP
  2077.                                                             Page 53
  2078.  
  2079.  
  2080. 4.25  WPUTCH - PUT A CHARACTER & ATTRIBUTE IN A WINDOW
  2081. ----------------------------------------------------------------------
  2082.  
  2083. SYNTAX:
  2084.  
  2085. CALL WPUTCH(id%, x%, y%, char%, attr%)
  2086.  
  2087. id% = The number of a currently opened window.
  2088.  
  2089. x%  = The relative column position within the window.
  2090.  
  2091. y% = The relative row position within the window.
  2092.  
  2093. char% = The character to put at x%, y% in window id%.
  2094.  
  2095. attr% = The attribute of char%.
  2096.  
  2097.  
  2098.  
  2099. DESCRIPTION:
  2100.  
  2101. WPUTCH "puts" a single character and it's attribute into a window at a
  2102. specified position.
  2103.  
  2104.  
  2105.  
  2106. SEE ALSO: WGETCH
  2107.                                                             Page 54
  2108.  
  2109.  
  2110. 4.26  WRATTR - CHANGE ATTRIBUTE OF A ROW IN WINDOW
  2111. ----------------------------------------------------------------------
  2112.  
  2113. SYNTAX:
  2114.  
  2115. CALL WRATTR(id%,row%,attribute%)
  2116.  
  2117. id% = The number of a currently opened window.
  2118.  
  2119. row% = The row number within the window.
  2120.        row% must be between 0 and maximum window size
  2121.  
  2122. attribute%  = The foreground/background attribute value.
  2123.  
  2124.  
  2125. DESCRIPTION:
  2126.  
  2127. Changes attribute of a row within a specified window.
  2128.  
  2129. See Appendix 1 for determining attribute values.
  2130.  
  2131.  
  2132.  
  2133. SEE ALSO: WATTR, WCATTR, WCOLOR
  2134.                                                             Page 55
  2135.  
  2136.  
  2137. 4.27  WREV - REVERSE ATTRIBUTES OF ENTIRE WINDOW
  2138. ----------------------------------------------------------------------
  2139.  
  2140. SYNTAX:
  2141.  
  2142. CALL WREV(id%,mode%)
  2143.  
  2144. id% = The number of a currently opened window.
  2145.  
  2146. mode%   1 = To reverse attribute of window only.
  2147.         0 = To reverse attribute of window including window borders.
  2148.  
  2149.  
  2150.  
  2151. DESCRIPTION:
  2152.  
  2153. Reverses attributes within a specified window.
  2154. If the current window is white on blue, then after executing WREV,
  2155. the window attribute will be blue on white.
  2156.  
  2157. NOTE: Calling WREV does not set the attribute for all WPRINT and WCOPYSTR
  2158. functions.  WCOLOR must be used for this purpose.
  2159.  
  2160.  
  2161.  
  2162. SEE ALSO: WREVLINE
  2163.                                                             Page 56
  2164.  
  2165.  
  2166. 4.28  WREVLINE - REVERSE ATTRIBUTES OF LINE IN WINDOW
  2167. ----------------------------------------------------------------------
  2168.  
  2169. SYNTAX:
  2170.  
  2171. CALL WREVLINE(id%,y%)
  2172.  
  2173. id% = The number of a currently opened window.
  2174.  
  2175. y% = Specifies which line of characters to reverse.
  2176.  
  2177.  
  2178.  
  2179. DESCRIPTION::
  2180.  
  2181. Reverses foreground/background attributes for an entire line within a
  2182. specified window.
  2183.  
  2184. If the line is white on green, then after executing WREVLINE, the line
  2185. attribute will be green on white.
  2186.  
  2187. NOTE: Use of WREVLINE does not set the attribute for all WPRINT and
  2188. WCOPYSTR functions.  WCOLOR must be used for this purpose.
  2189.  
  2190.  
  2191.  
  2192. SEE ALSO: WREV
  2193.  
  2194.                                                             Page 57
  2195.  
  2196.  
  2197. 4.29  WSELECT - SELECT WINDOW FOR DEFAULT OUTPUT
  2198. ----------------------------------------------------------------------
  2199.  
  2200. SYNTAX:
  2201.  
  2202. CALL WSELECT(id%)
  2203.  
  2204. id% = The number of a currently opened window.
  2205.  
  2206.  
  2207.  
  2208. DESCRIPTION:
  2209.  
  2210. Selects a window for default output.
  2211.  
  2212. Window ID of 0 is invalid for this function.
  2213.  
  2214. Default window ID occurs when id% of other functions is set to 0.
  2215. If DOS video device drivers are "hooked" into QuickWindows, the default
  2216. window will be used for all DOS/BIOS display output.
  2217. This way, you can change which window DOS/BIOS uses by merely
  2218. executing the WSELECT function.
  2219.  
  2220.  
  2221.                                                             Page 58
  2222.  
  2223.  
  2224. 4.31  WTITLE - PUT A TITLE AT TOP-CENTER OF WINDOW
  2225. ----------------------------------------------------------------------
  2226.  
  2227. SYNTAX:
  2228.  
  2229. CALL WTITLE(id%,style%,color%,title$)
  2230.  
  2231. id% = The number of a currently opened window.
  2232.  
  2233. style% = Specifies one of the 8 following styles:
  2234.  
  2235.              0 - no border
  2236.              1 - single line border
  2237.              2 - double line border
  2238.              3 - light shadow border
  2239.              4 - medium shadow border
  2240.              5 - dark shadow border
  2241.              6 - solid border
  2242.              7 - double line with square corners
  2243.              8 - user definable border (see BOX8SET)
  2244.  
  2245. color% = The foreground/background attributes of the window.
  2246.          See appendix 1 for explanation of values.
  2247.  
  2248. title$ = A valid string variable or string expression.
  2249.  
  2250.  
  2251.  
  2252. DESCRIPTION:
  2253.  
  2254. WTITLE puts a title on a window. This function can be used to re-write or
  2255. change the old title of a window.
  2256.  
  2257. NOTE: The length of the new title$ must be greater or equal to the length
  2258. of the old title.
  2259.  
  2260.  
  2261.  
  2262. SEE ALSO: WOPEN
  2263.                                                             Page 59
  2264.  
  2265.  
  2266. 4.32  WVSCROLL - SCROLL WINDOW VERTICALLY UP OR DOWN
  2267. ----------------------------------------------------------------------
  2268.  
  2269. SYNTAX:
  2270.  
  2271. CALL WVSCROLL(id%,times%,direction%)
  2272.  
  2273. id% = The number of a currently opened window.
  2274.  
  2275. times% = The number of times to scroll.
  2276.          A value of 0 will clear the window.
  2277.  
  2278. direction%  = 0 to scroll upward.
  2279.             = 1 to scroll downward.
  2280.  
  2281.  
  2282.  
  2283. DESCRIPTION:
  2284.  
  2285. Scroll specified window vertically for specified number of times up or down.
  2286.  
  2287. This function is identical to BIOS function calls 6 and 7 (INT 10H), but for
  2288. the window specified by id%.
  2289.  
  2290. NOTE:  The mouse cursor is turned off by this command.
  2291.  
  2292.  
  2293.  
  2294. SEE ALSO: WINSROW, WDELROW
  2295.                                                             Page 60
  2296.  
  2297.  
  2298. 4.33  WWRAP - TURN WORD WRAP ON/OFF IN WINDOW
  2299. ----------------------------------------------------------------------
  2300.  
  2301. SYNTAX:
  2302.  
  2303. CALL WWRAP(id%,mode%)
  2304.  
  2305.  
  2306. id% = The number of a currently opened window.
  2307.  
  2308. mode% = 0  All text sent to a window will be "wrapped around" to the next
  2309.            line if the text exceeds the boundaries of the window.
  2310.  
  2311.       = 1  If the text exceeds the boundaries of the window, all subsequent
  2312.            text is lost until a carriage return is sent to the window. At
  2313.            this point text display resumes on the next line.
  2314.  
  2315.  
  2316.  
  2317. DESCRIPTION:
  2318.  
  2319. Selects mode for outputting to specified window.
  2320.  
  2321.  
  2322.  
  2323. SEE ALSO: WPRINT, WCOPYSTR
  2324.                                                             Page 61
  2325.  
  2326.  
  2327.  
  2328.  
  2329.                              CHAPTER FIVE
  2330.  
  2331.                      REFERENCE FOR MENU FUNCTIONS
  2332.  
  2333.  
  2334.  
  2335.         5.1     HELPMENU        Display Help Information
  2336.  
  2337.         5.2     MENUBAR         Define A Menubar
  2338.         
  2339.         5.3     MENUGET         Make Selection From Menu
  2340.  
  2341.         5.4     MENUOFF         Turn Off Menubar
  2342.  
  2343.         5.5     MENUON          Turn On Menubar
  2344.  
  2345.         5.6     MENUOPTION      Enable/Disable A Menu Option
  2346.  
  2347.         5.7     MENUSET         Define Pull-Down Menus
  2348.  
  2349.         5.8     POPMENU         Display A Pop-Up Menu
  2350.  
  2351.         5.9     POPMENU1        Display A Pop-Up Menu (W/Option Attribs)
  2352.  
  2353.         5.10    POPMENUH        Display A Pop-Up Horizontal List Box
  2354.  
  2355.         5.11    POPMENUV        Display A Pop-Up Vertical List Box
  2356.  
  2357.                                                             Page 62
  2358.  
  2359.  
  2360. 5.1  HELPMENU - DISPLAY HELP INFORMATION
  2361. ----------------------------------------------------------------------
  2362.  
  2363.  
  2364.  
  2365.  
  2366. SYNTAX:
  2367.  
  2368. CALL HELPMENU(id%,0,battr%,lines, VARPTR(menu$(start%)),flg%)
  2369.  
  2370. id% = The number of a currently opened window.
  2371.  
  2372. battr% = The attribute of the scroll bar at the right of the window.
  2373.  
  2374. menu$() = A string array containing the page(s) of help
  2375.             information to be displayed.  Each line in the
  2376.             help window is one element of the string array.
  2377.  
  2378. start% = The starting position within the string array.     For simplicity,
  2379.      make all arrays start at 0.
  2380.  
  2381. lines% = The number of lines of the array to allow for display in the
  2382.          help window.
  2383.  
  2384.  
  2385.  
  2386. RETURNS:
  2387.  
  2388. flg% = Always returns a 0 when exiting from HELPMENU.
  2389.  
  2390.  
  2391.  
  2392. DESCRIPTION:
  2393.  
  2394. HELPMENU allows a currently opened window to be used as a "help window".
  2395. The user can scroll through pages of text contained in a string array.
  2396. HELPMENU works exactly like POPMENUV but doesn't allow the selection
  2397. of options.
  2398.  
  2399.                                                    Cont.....
  2400.                                                             Page 63
  2401.  
  2402.  
  2403. HELPMENU - DISPLAY HELP INFORMATION        (continued)
  2404. ----------------------------------------------------------------------
  2405.  
  2406.  
  2407.  
  2408.  
  2409.                        KEYBOARD USE ON HELPMENU
  2410.  
  2411.  
  2412.         HOME..........Goes to the beginning of the help page.
  2413.  
  2414.         END...........Goes to the end of the help page.
  2415.  
  2416.         PGDN..........Moves to next help page.
  2417.  
  2418.         PGUP..........Moves to previous help page.
  2419.  
  2420.         ESC...........Exits the help screen.
  2421.  
  2422.  
  2423.                         MOUSE USE ON HELPMENU
  2424.  
  2425.  
  2426.         PREVIOUS PAGE:  Click mouse button between up arrow and
  2427.                         scroll bar position marker.
  2428.  
  2429.         NEXT PAGE:      Click mouse button between down arrow and
  2430.                         scroll bar position marker.
  2431.  
  2432.         MOVE POINTER:   The position marker in the scroll bar
  2433.                         approximates the position within the help
  2434.                         array. To move to another relative position,
  2435.                         place mouse cursor on scroll bar position marker,
  2436.                         hold left mouse button, move to desired area on
  2437.                         scroll bar, and release mouse button.
  2438.  
  2439.         FIRST PAGE:     Click mouse on up arrow.
  2440.  
  2441.         LAST PAGE:      Click mouse on down arrow.
  2442.  
  2443.         EXIT:           Move mouse cursor to the top-left corner of
  2444.                         the window and press the left mouse button.
  2445.  
  2446.  
  2447. SEE ALSO: WOPEN, WCOLOR
  2448.                                                             Page 64
  2449.  
  2450.  
  2451. 5.2  MENUBAR - DEFINE A MENUBAR
  2452. ----------------------------------------------------------------------
  2453.  
  2454.  
  2455.  
  2456.  
  2457. SYNTAX:
  2458.  
  2459. CALL MENUBAR(numb%,attr%,kb%(),VARPTR(bar$(0)))
  2460.  
  2461. numb% = The number of menus selectable along the top.
  2462.         Up to 10 menus may be defined.
  2463.  
  2464. attr% = The attribute of the menubar.
  2465.  
  2466. kb()  = An integer array of keyboard values that would directly select
  2467.         a menu.  Each position in the array corresponds to one menu.
  2468.         There must be numb% number of keyboard values in the array.
  2469.  
  2470. bar$() = A string array containing the names of the menus, which are
  2471.          displayed along the top.  Each position in the array corresponds
  2472.          to one menu.
  2473.          There must be numb% number of menu titles in the array.
  2474.  
  2475.  
  2476.  
  2477.  
  2478. DESCRIPTION:
  2479.  
  2480. The MENUBAR command is the first of four necessary commands to design a
  2481. pull-down menuing system.
  2482.  
  2483. See sample program pulldown.bas for an example of usage.
  2484.  
  2485.  
  2486. SEE ALSO: MENUSET, MENUOPTION, MENUGET, MENUON, MENUOFF
  2487.                                                             Page 65
  2488.  
  2489.  
  2490. 5.3  MENUGET - MAKE SELECTION FROM MENU
  2491. ----------------------------------------------------------------------
  2492.  
  2493.  
  2494.  
  2495.  
  2496. SYNTAX:
  2497.  
  2498. CALL MENUGET(menu%,opt%,flag%)
  2499.  
  2500.  
  2501.  
  2502. RETURNS:
  2503.  
  2504. menu% = The menu number selected.
  2505.  
  2506. opt% = The option of the menu selected.
  2507.  
  2508. flag% = (-1)  If a selection has been made.
  2509.       = (1)   If user has pressed the ESC key.
  2510.       = (0)   If no activity.
  2511.  
  2512.  
  2513.  
  2514. DESCRIPTION:
  2515.  
  2516. Allows mouse or keyboard to make a selection from a pulldown menu.
  2517. The last of four necessary commands to design an active pulldown menuing
  2518. system.
  2519.  
  2520. The MENUGET function must be called continually until a selection is made.
  2521. It is also possible for the application program to go off and do something
  2522. else if flag%=0, but make continual calls to the function.
  2523.  
  2524. The MENUGET function has the following internal keyboard operation.
  2525. Pressing one of the previously defined menu selection keys (kb array in
  2526. menubar), will pop up a menu underneath the selected menu title.
  2527. Then an option may be highlighted by moving the up/down arrow keys.
  2528. Next it may be selected by pressing ENTER, or cancelled by pressing
  2529. ESCAPE. After a selection has been made, the screen under the menu is
  2530. restored. If a menu option has been disabled, a 0 is returned in the
  2531. flag% variable.
  2532.  
  2533.  
  2534.                                                             Page 66
  2535.  
  2536.  
  2537. 5.3  MENUGET - MAKE SELECTION FROM MENU         (Continued)
  2538. ----------------------------------------------------------------------
  2539.  
  2540.  
  2541.  
  2542.  
  2543. Selecting a menu option with a mouse is accomplished as follows.
  2544. Place the mouse cursor on top of the desired menu title, press and hold the
  2545. left mouse button, drag the mouse down along the menu to the option desired,
  2546. and release the mouse button.  The option will be selected and the
  2547. menu will go away.
  2548.  
  2549.  
  2550.  
  2551. SEE ALSO: MENUBAR, MENUSET, MENUOPTION, MENUON, MENUOFF
  2552.                                                             Page 67
  2553.  
  2554.  
  2555. 5.4  MENUOFF - TURN OFF MENUBAR
  2556. ----------------------------------------------------------------------
  2557.  
  2558.  
  2559.  
  2560.  
  2561. SYNTAX:
  2562.  
  2563. CALL MENUOFF
  2564.  
  2565.  
  2566.  
  2567. DESCRIPTION:
  2568.  
  2569. The MENUOFF command clears the menubar along the top and disables menu
  2570. checking by forcing the flag% in MENUGET to always return a 0.
  2571.  
  2572.  
  2573.  
  2574. SEE ALSO: MENUBAR, MENUSET, MENUGET, MENUON
  2575.                                                             Page 68
  2576.  
  2577.  
  2578. 5.5  MENUON - TURN ON MENUBAR
  2579. ----------------------------------------------------------------------
  2580.  
  2581.  
  2582.  
  2583.  
  2584. SYNTAX:
  2585.  
  2586. CALL MENUON
  2587.  
  2588.  
  2589.  
  2590. DESCRIPTION:
  2591.  
  2592. Displays the menubar and enables menu checking.
  2593. MENUON is the third of four commands in designing an active pulldown menuing
  2594. system. The menu bar, previously defined by MENUBAR, is displayed along the
  2595. top row of the screen.
  2596.  
  2597.  
  2598.  
  2599. SEE ALSO: MENUBAR, MENUSET, MENUGET, MENUOPTION, MENUOFF
  2600.                                                             Page 69
  2601.  
  2602.  
  2603. 5.6  MENUOPTION - ENABLE / DISABLE A MENU OPTION
  2604. ----------------------------------------------------------------------
  2605.  
  2606.  
  2607.  
  2608.  
  2609. SYNTAX:
  2610.  
  2611. CALL MENUOPTION(menu%,option%,flag%)
  2612.  
  2613.  
  2614.  
  2615. DESCRIPTION:
  2616.  
  2617. Enables or disables a menu option.
  2618. When a menu option is enabled, it may be selected from the menu.
  2619. If it is disabled, the flag% of MENUGET contains a 0 if it is selected.
  2620.  
  2621. The MENUOPTION command has the following parameters:
  2622.  
  2623. menu% = The menu number (range 1 to 10).
  2624.  
  2625. option% = The option of the menu to modify (1 to 16).
  2626.  
  2627. flag% = 1 to enable the option.
  2628.       = 0 to disable the option.
  2629.  
  2630. Technically, the MENUOPTION modifies the previously defined bit mask of
  2631. MENUSET. Thus MENUOPTION is only used to modify the option enable/disable
  2632. status after all the menus have been defined.
  2633.  
  2634.  
  2635.  
  2636. SEE ALSO: MENUSET, MENUGET
  2637.                                                             Page 70
  2638.  
  2639.  
  2640. 5.7  MENUSET - DEFINE PULL-DOWN MENUS
  2641. ----------------------------------------------------------------------
  2642.  
  2643.  
  2644.  
  2645.  
  2646. SYNTAX:
  2647.  
  2648. CALL MENUSET(numb%,options%,style%,battr%,cattren%, cattrdis%, bitmask%,
  2649.             VARPTR(menu$(0)))
  2650.  
  2651. numb% = The menu number between 1 and 10.
  2652.  
  2653. options% = The number of options for this menu (numb%).
  2654.            Up to 16 options per menu is allowed.
  2655.  
  2656. style% = The box style for the menu window that pops down when a menu is
  2657.          selected.
  2658.          Style% has a range between 1 and 8.
  2659.          See WOPEN for a list of styles.
  2660.          Use BOX8SET to define your own style #8.
  2661.  
  2662. battr%  = The border attribute of the pull down menu window.
  2663.  
  2664. cattren% = The character attribute when the option is enabled.
  2665.  
  2666. cattrdis% = The character attribute when the option is disabled.
  2667.  
  2668. bitmask% = The option enable/disable bit mask.
  2669.            Each bit 0 to 15 corresponds to options 1 to 16.
  2670.            If the bit is set (1), the option is enabled for selection.
  2671.            If the bit is cleared (0), the option is disabled.
  2672.            To enable all options, for example, bit mask would equal
  2673.            (-1) decimal.
  2674.            NOTE: This is because in QuickBASIC there cannot be an integer
  2675.            equal to 65535 dec, or 1111 1111 1111 1111 binary or FFFFH hex.
  2676.  
  2677. menu$() = A string array containing all the option names to be displayed
  2678.           when the menu pops down. The total number of characters for all
  2679.           the options for each menu numb% cannot exceed 400. A table
  2680.           is maintained internally to Quickwindows which contains the
  2681.           option names for each menu numb%.
  2682.  
  2683.  
  2684.                                                    Cont.....
  2685.                                                             Page 71
  2686.  
  2687.  
  2688. 5.7  MENUSET - DEFINE PULL-DOWN MENUS                (continued)
  2689. ----------------------------------------------------------------------
  2690.  
  2691.  
  2692.  
  2693.  
  2694. DESCRIPTION:
  2695.  
  2696. Defines a set of options for a specific menu.
  2697. MENUSET is the second of four commands needed to define an active menuing
  2698. system.
  2699.  
  2700.  
  2701.  
  2702. SEE ALSO: MENUBAR, MENUGET, MENUON, MENUOFF, MENUOPTION, WOPEN
  2703.                                                             Page 72
  2704.  
  2705.  
  2706. 5.8  POPMENU - DISPLAY A POP-UP MENU
  2707. ----------------------------------------------------------------------
  2708.  
  2709.  
  2710.  
  2711.  
  2712. SYNTAX:
  2713.  
  2714. CALL POPMENU(result%,kb%,style%,battr%,cattr%,x%,y%, options%,
  2715.              VARPTR(menu$(0)))
  2716.  
  2717. The following parameters are passed upon calling POPMENU:
  2718.  
  2719. kb% = The setting of the bits of kb% determine which keys will cause
  2720.       immediate exit from POPMENU without selection. Bits 0 to 9 correspond
  2721.       to function keys 1 to 10. Bit 10 is the left arrow key and bit 11
  2722.       is the right arrow key.  The ESC key will always cause an exit
  2723.       regardless of the value of kb%.
  2724.  
  2725. style% = The window style for the popup menu with range between 1 and 8.
  2726.          See WOPEN for styles.
  2727.  
  2728. battr% = The window border attribute of the menu box.
  2729.  
  2730. cattr% = The character attribute for each of the menu options within the
  2731.          menu box.
  2732.  
  2733. x%,y%  = The starting physical screen coordinates of the menu box.
  2734.          x% has range between 1 and 80, y% has range between 1 and 24.
  2735.          Naturally x% and y% must be set so that the menu box will not
  2736.          exceed limits of the screen.  The height of the menu box will be
  2737.          determined by the number of options, and the width will be
  2738.          determined by the length of the longest menu option name.
  2739.  
  2740. options% = The number of menu options. This value cannot exceed the total
  2741.            number of lines available for the menu box minus the two borders.
  2742.            Thus if the menu box starts on display row #3, then options
  2743.            cannot exceed 20.
  2744.  
  2745. menu$() = A string array containing all of the menu option names to be
  2746.           displayed. The string with the most number of characters will
  2747.           determine the overall width of the menu box. The length of the
  2748.           string cannot exceed the number of columns available for display
  2749.           from the start of x%.
  2750.  
  2751.                                                             Page 73
  2752.  
  2753.  
  2754. 5.8  POPMENU - DISPLAY A POP-UP MENU           (continued)
  2755. ----------------------------------------------------------------------
  2756.  
  2757.  
  2758.  
  2759.  
  2760. RETURNS:
  2761.  
  2762. The following values are returned from POPMENU when exiting:
  2763.  
  2764. result% = The option number selected, or 0 if ESC or one of the exit keys
  2765.           is pressed.
  2766.  
  2767. kb% = The keyboard value of one of the exit keys if it is pressed.
  2768.  
  2769.  
  2770.  
  2771. DESCRIPTION:
  2772.  
  2773. Displays a popup menu and allows user to make a selection with the keyboard
  2774. or mouse.
  2775.  
  2776. KEYBOARD -
  2777. To make a selection from the menu with the keyboard, move the up or down
  2778. arrows to highlight an option and press ENTER. To hightlight an option
  2779. directly, press the key corresponding to the first letter of an option.
  2780.  
  2781. MOUSE -
  2782. To make a selection with the mouse, position the mouse cursor over the
  2783. option desired and press the left mouse button. Pressing ESC (or one of
  2784. the previously defined exit keys) will exit POPMENU, setting result%=0.
  2785.  
  2786.  
  2787.  
  2788. SEE ALSO: POPMENU1
  2789.                                                             Page 74
  2790.  
  2791.  
  2792. 5.9  POPMENU1 - DISPLAY A POP-UP MENU (W/OPTION ATTRIBS)
  2793. ----------------------------------------------------------------------
  2794.  
  2795.  
  2796.  
  2797.  
  2798. SYNTAX:
  2799.  
  2800. CALL POPMENU1(result%,kb%,style%,battr%,cattr%(), x%,y%, options%,
  2801.               VARPTR(menu$(0)))
  2802.  
  2803.  
  2804. Another version of POPMENU but allows each option to have its own attribute.
  2805.  
  2806.  
  2807. DESCRIPTION:
  2808.  
  2809. Same as POPMENU but with the following parameter difference:
  2810.  
  2811. cattr%() = Each element of the array contains the attribute for each
  2812.            option displayed.  Thus it is possible to have option #1 green,
  2813.            option #2 red, and so on.
  2814.  
  2815.  
  2816.  
  2817. SEE ALSO: POPMENU
  2818.                                                             Page 75
  2819.  
  2820.  
  2821. 5.10  POPMENUH - DISPLAY A POP-UP HORIZONTAL LIST BOX
  2822. ----------------------------------------------------------------------
  2823.  
  2824.  
  2825.  
  2826. SYNTAX:
  2827.  
  2828. CALL POPMENUH(id%,relpos%,width%,options%,battr%, VARPTR(menu$(0)),
  2829.               result%,flag%)
  2830.  
  2831. The following parameters are passed:
  2832.  
  2833. id% = A currently opened window id.
  2834.  
  2835. relpos% = The option number to highlight upon entering POPMENUH.
  2836.           This value cannot be 0.
  2837.  
  2838. width% = The width of one column of options. For example, all the options
  2839.          are less than 8 characters each. Set width%=10 (the extra two
  2840.          spaces make the menu list look neat).
  2841.  
  2842. options% = The total number of menu options available.
  2843.  
  2844. battr% = The attribute of the scroll bar at the bottom of the window.
  2845.  
  2846. menu$() = A string array containing all the menu options available for
  2847.           selection. menu$() must contain at least options% number of
  2848.           options.
  2849.  
  2850.  
  2851.  
  2852. RETURNS:
  2853.  
  2854. The following parameters are passed from POPMENUH:
  2855.  
  2856. result% = The number of the menu option selected, or 0 if ESC was pressed.
  2857.  
  2858. flag% = 1 if a normal selection has been made.
  2859.       = 0 if ESC pressed.
  2860.  
  2861.                                                    Cont.....
  2862.                                                             Page 76
  2863.  
  2864.  
  2865. 5.10  POPMENUH - DISPLAY A POP-UP HORIZONTAL LIST BOX   (continued)
  2866. ----------------------------------------------------------------------
  2867.  
  2868.  
  2869.  
  2870.  
  2871. DESCRIPTION:
  2872.  
  2873. Popup menu with horizontal scrolling/paging through options.
  2874. A window must already be opened to use this function.
  2875. The window must be wide enough to accomodate at least one column of
  2876. options (inside window width=width%). Window width would equal the number
  2877. of columns desired times the width%, but must not exceed the total
  2878. width of the physical screen.
  2879.  
  2880.  
  2881.                        KEYBOARD USE ON POPMENUH
  2882.  
  2883.  
  2884.         HOME..........Positions option pointer to first option.
  2885.  
  2886.         END...........Positions option pointer to last option.
  2887.  
  2888.         RIGHT ARROW...Moves pointer to next column in list.
  2889.  
  2890.         LEFT ARROW....Moves pointer to previous column in list.
  2891.  
  2892.         DOWN ARROW....Moves pointer to next option in list.
  2893.  
  2894.         UP ARROW......Moves pointer to previous option in list.
  2895.  
  2896.         PGDN..........Moves to next page of options.
  2897.  
  2898.         PGUP..........Moves to previous page of options.
  2899.  
  2900.         ENTER.........Selects an option and exits POPMENUH.
  2901.  
  2902.         ESC...........Aborts selection of option and exits POPMENUH.
  2903.                                                             Page 77
  2904.  
  2905.  
  2906. 5.10  POPMENUH - DISPLAY A POP-UP HORIZONTAL LIST BOX   (continued)
  2907. ----------------------------------------------------------------------
  2908.  
  2909.  
  2910.  
  2911.  
  2912.                         MOUSE USE ON POPMENUH
  2913.  
  2914.  
  2915.         PREVIOUS COLUMN: Click mouse on left arrow on scroll bar to
  2916.                          move option pointer to previous column.
  2917.  
  2918.         NEXT COLUMN:     Click mouse on right arrow on scroll bar to
  2919.                          move option pointer to next column.
  2920.  
  2921.         PREVIOUS PAGE:   Click mouse between left arrow and scroll bar
  2922.                          position marker to turn to previous page of options.
  2923.  
  2924.         NEXT PAGE:       Click mouse between right arrow and scroll bar
  2925.                          position marker to turn to next page of options.
  2926.  
  2927.         MOVE POINTER:    To move option pointer to a column within option
  2928.                          list, position mouse on scroll bar position marker,
  2929.                          hold left mouse button, move to desired area on
  2930.                          scroll bar, and release mouse button.
  2931.  
  2932.         SELECT OPTION:   To select an option, move mouse cursor on top of
  2933.                          desired option and press the left mouse button.
  2934.  
  2935.         EXIT:            To exit without selecting an option, move
  2936.                          mouse cursor to the top-left corner of the
  2937.                          window and press the left mouse button.
  2938.  
  2939.  
  2940.  
  2941. SEE ALSO: WOPEN, WCOLOR
  2942.                                                             Page 78
  2943.  
  2944.  
  2945. 5.11  POPMENUV - DISPLAY A POP-UP VERTICAL LIST BOX
  2946. ----------------------------------------------------------------------
  2947.  
  2948.  
  2949.  
  2950.  
  2951. SYNTAX:
  2952.  
  2953. CALL POPMENUV(id%,relpos%,battr%,options%, VARPTR(menu$(0)), result%,
  2954.               flag%)
  2955.  
  2956. The following parameters are passed:
  2957.  
  2958. id% = A currently opened window id.
  2959.  
  2960. relpos% = The option number to highlight upon entering POPMENUV.
  2961.           This value cannot be 0.
  2962.  
  2963. battr% = The attribute of the scroll bar at the right of the window.
  2964.  
  2965. options% = The total number of menu options available.
  2966.  
  2967. menu$() = A string array containing all the menu options available for
  2968.           selection.
  2969.           menu$() must contain at least options% number of options.
  2970.  
  2971.  
  2972.  
  2973. RETURNS:
  2974.  
  2975. The following parameters are passed from POPMENUV:
  2976.  
  2977. result% = The number of the menu option selected, or 0 if ESC was pressed.
  2978.  
  2979. flag% = 1 if a normal selection has been made.
  2980.       = 0 if ESC pressed.
  2981.  
  2982.                                                    Cont.....
  2983.                                                             Page 79
  2984.  
  2985.  
  2986. 5.11  POPMENUV - DISPLAY A POP-UP VERTICAL LIST BOX   (continued)
  2987. ----------------------------------------------------------------------
  2988.  
  2989.  
  2990.  
  2991.  
  2992. DESCRIPTION:
  2993.  
  2994. Popup menu with vertical scrolling/paging through options.
  2995. A window must already be opened to use this function.
  2996. The window must be wide enough to accomodate the longest option length.
  2997.  
  2998.  
  2999.                        KEYBOARD USE ON POPMENUV
  3000.  
  3001.  
  3002.         HOME..........Positions option pointer to first option.
  3003.  
  3004.         END...........Positions option pointer to last option.
  3005.  
  3006.         DOWN ARROW....Moves pointer to next option in list.
  3007.  
  3008.         UP ARROW......Moves pointer to previous option in list.
  3009.  
  3010.         PGDN..........Moves to next page of options.
  3011.  
  3012.         PGUP..........Moves to previous page of options.
  3013.  
  3014.         ENTER.........Selects an option and exits POPMENUV.
  3015.  
  3016.         ESC...........Aborts selection of option and exits POPMENUV.
  3017.                                                             Page 80
  3018.  
  3019.  
  3020. 5.11  POPMENUV - DISPLAY A POP-UP VERTICAL LIST BOX   (continued)
  3021. ----------------------------------------------------------------------
  3022.  
  3023.  
  3024.  
  3025.  
  3026.                         MOUSE USE ON POPMENUV
  3027.  
  3028.  
  3029.         FIRST PAGE:      Click mouse on up arrow on scroll bar to
  3030.                          move option pointer to first page.
  3031.  
  3032.         LAST PAGE:       Click mouse on down arrow on scroll bar to
  3033.                          move option pointer to last page.
  3034.  
  3035.         PREVIOUS PAGE:   Click mouse between up arrow and scroll
  3036.                          bar position marker to turn to previous
  3037.                          page of options.
  3038.  
  3039.         NEXT PAGE:       Click mouse between down arrow and scroll
  3040.                          bar position marker to turn to next page of
  3041.                          options.
  3042.  
  3043.         MOVE POINTER:    To move option pointer to a column within
  3044.                          option list, position mouse on scroll bar
  3045.                          position marker, hold left mouse button,
  3046.                          move to desired area on scroll bar, and
  3047.                          release mouse button.
  3048.  
  3049.         SELECT OPTION:   To select an option, move mouse cursor on
  3050.                          top of desired option and press the left
  3051.                          mouse button.
  3052.  
  3053.         EXIT:            To exit without selecting an option, move
  3054.                          mouse cursor to the top-left corner of the
  3055.                          window and press the left mouse button.
  3056.  
  3057.  
  3058.  
  3059. SEE ALSO: WOPEN, WCOLOR
  3060.                                                             Page 81
  3061.  
  3062.  
  3063.  
  3064.  
  3065.                              CHAPTER SIX
  3066.  
  3067.                REFERENCE FOR SCREEN HANDLING FUNCTIONS
  3068.  
  3069.  
  3070.         6.1     ATTRSCRN        Set The Screen Attributes
  3071.  
  3072.         6.2     BOX             Draw A Box On The Screen
  3073.  
  3074.         6.3     BOX8SET         Define A Box Style
  3075.  
  3076.         6.4     DMASCRN         Enable/Disable Video Retrace Wait (Snow)
  3077.  
  3078.         6.5     GETCH           Get A Character & Attribute From Screen
  3079.  
  3080.         6.6     GETSCRN         Store A Portion Of The Screen Into An Array
  3081.  
  3082.         6.7     PUTCH           Put A Character & Attribute On The Screen
  3083.  
  3084.         6.8     PUTSCRN         Restore A Portion Of Screen From An Array
  3085.  
  3086.         6.9     REVSCRN         Reverse Foreground/Background Attributes
  3087.  
  3088.         6.10    VSCROLL         Scroll Portion Of Screen Vertically
  3089.                                                             Page 82
  3090.  
  3091.  
  3092. 6.1  ATTRSCRN - CHANGE THE ATTRIBUTES OF THE SCREEN
  3093. ----------------------------------------------------------------------
  3094.  
  3095.  
  3096.  
  3097.  
  3098. SYNTAX:
  3099.  
  3100. CALL ATTRSCRN(x1%,y1%,x2%,y2%,attribute%)
  3101.  
  3102. x1%,y1%  = The top-left coordinates of the box relative to the start of
  3103.            the screen at (1,1).
  3104.  
  3105. x2%,y2%  = The bottom-right coordinates of the box relative to the start
  3106.            of the screen at (1,1). x2,y2 must not exceed the maximum size
  3107.            of the screen (80,24).
  3108.  
  3109. attribute% = The new foreground/background attribute value.
  3110.  
  3111.  
  3112.  
  3113. DESCRIPTION:
  3114.  
  3115. Changes the screen attribute for the specified area on the screen.
  3116.  
  3117. See Appendix 1 for determining attribute values.
  3118.                                                             Page 83
  3119.  
  3120.  
  3121. 6.2  BOX - DRAW A BOX ON THE SCREEN
  3122. ----------------------------------------------------------------------
  3123.  
  3124.  
  3125.  
  3126.  
  3127. SYNTAX:
  3128.  
  3129. CALL BOX(x1%,y1%,x2%,y2%,style%,color%,title$)
  3130.  
  3131. x1%,y1% = The top-left coordinates of the box relative to the start of the
  3132.           screen (1,1).
  3133.  
  3134. x2%,y2% = The bottom-right coordinates of the box relative to the start of
  3135.           the screen at (1,1).  x2,y2 must not exceed the maximum size of
  3136.           the screen (80,24).
  3137.  
  3138. style% = The box style.  Can be one of the following:
  3139.  
  3140.                           BOX STYLES 
  3141.  
  3142.                    0 - no border
  3143.                    1 - single line border
  3144.                    2 - double line border
  3145.                    3 - light shadow border
  3146.                    4 - medium shadow border
  3147.                    5 - dark shadow border
  3148.                    6 - solid border
  3149.                    7 - double line with square corners
  3150.                    8 - user definable border (see BOX8SET)
  3151.  
  3152.  
  3153. color% = The foreground/background attribute value.
  3154.          See Appendix 1 for attribute/color values.
  3155.  
  3156. title$ = Specifies which title to give the box.
  3157.          If you specify "", then no title is given to the box.
  3158.  
  3159.  
  3160.  
  3161. DESCRIPTION:
  3162.  
  3163. BOX makes a box on the screen.
  3164.  
  3165. The x1,y1,x2,y2 coordinates are relative to the top-left corner of the
  3166. screen (1,1).
  3167.                                                             Page 84
  3168.  
  3169.  
  3170. 6.3  BOX8SET - DEFINE A BOX STYLE
  3171. ----------------------------------------------------------------------
  3172.  
  3173.  
  3174.  
  3175.  
  3176. SYNTAX:
  3177.  
  3178. CALL BOX8SET(TL,TR,TA,BL,BR,BA,SIDES,LTITLE,RTITLE,0,0,0)
  3179.  
  3180. TL = Top left border character.
  3181.  
  3182. TR = Top right border character.
  3183.  
  3184. TA = Top horizontal (across) border character.
  3185.  
  3186. BL = Bottom left border character.
  3187.  
  3188. BR = Bottom right border character.
  3189.  
  3190. BA = Bottom horizontal (across) border character.
  3191.  
  3192. SIDES = Side border character.
  3193.  
  3194. LTITLE = Character used on left of title.
  3195.  
  3196. RTITLE = Character used on right of title.
  3197.  
  3198. 0 = Not used in this version of QW, but must be included.
  3199.  
  3200. 0 = Not used in this version of QW, but must be included.
  3201.  
  3202. 0 = Not used in this version of QW, but must be included.
  3203.  
  3204.  
  3205.  
  3206. DESCRIPTION:
  3207.  
  3208. BOX8SET lets you design a box style of your own.
  3209. The box that you have designed may be used by any QuickWindows function
  3210. which has a box style parameter.
  3211.  
  3212. NOTE: You must call this function at least once before using any functions
  3213. that utilize the eighth box type.
  3214.                                                             Page 85
  3215.  
  3216.  
  3217. 6.4  DMASCRN - ENABLE/DISABLE VIDEO RETRACE WAIT (SNOW)
  3218. ----------------------------------------------------------------------
  3219.  
  3220.  
  3221.  
  3222.  
  3223. SYNTAX:
  3224.  
  3225. CALL DMASCRN(mode%)
  3226.  
  3227. mode% = 0  All video reads/writes will wait for beginning of the retrace.
  3228.            This provides for a "snow-free" display on CGA cards, with a
  3229.            small loss in speed.
  3230.  
  3231.       = 1  All video reads/writes will be done immediately. There may be
  3232.            some "snow" on the display with CGA cards while the actual
  3233.            reads/writes are performed.
  3234.  
  3235.  
  3236.  
  3237. DESCRIPTION:
  3238.  
  3239. Calling DMASCRN determines whether video accesses (done by QuickWindows)
  3240. will be done immediately or will wait for the beginning of the retrace
  3241. period.
  3242.  
  3243. DMASCRN defaults to a mode 0 when starting QuickWindows.
  3244.                                                             Page 86
  3245.  
  3246.  
  3247. 6.5  GETCH - GET A CHARACTER & ATTRIBUTE FROM SCREEN
  3248. ----------------------------------------------------------------------
  3249.  
  3250.  
  3251.  
  3252.  
  3253. SYNTAX:
  3254.  
  3255. CALL GETCH(row%,col%,char%,attr%)
  3256.  
  3257. row% = The absolute row number on the screen.
  3258.        row% must be between 1 and 24.
  3259.  
  3260. col% = The absolute column number on the screen.
  3261.        col% must be between 1 and 80.
  3262.  
  3263.  
  3264.  
  3265. RETURNS:
  3266.  
  3267. char% = The character at (row%,col%)
  3268.  
  3269. attr% = The attribute of (char%).
  3270.  
  3271.  
  3272.  
  3273. DESCRIPTION:
  3274.  
  3275. GETCH gets a character and its attribute from a designated position in 
  3276. the window.
  3277.  
  3278.  
  3279.  
  3280. SEE ALSO: PUTCH
  3281.                                                             Page 87
  3282.  
  3283.  
  3284. 6.6  GETSCRN - STORE A PORTION OF THE SCREEN INTO AN ARRAY
  3285. ----------------------------------------------------------------------
  3286.  
  3287.  
  3288.  
  3289.  
  3290. SYNTAX:
  3291.  
  3292. CALL GETSCRN(x1%,y1%,x2%,y2%, array%())
  3293.  
  3294. x1%,y1% = The top-left coordinates of the portion of the screen to be saved.
  3295.  
  3296. x2%,y2% = The bottom-right coordinates of the portion of the screen to be
  3297.           saved.
  3298.  
  3299. array% = The integer array to hold the screen information.
  3300.  
  3301.  
  3302.  
  3303.  
  3304. DESCRIPTION:
  3305.  
  3306. GETSCRN saves a portion (or all) of the screen into an integer array.
  3307.  
  3308. The size of the array is calculated by the following formula: 
  3309. size% = (x2%-x1%+1) * (y2%-y1%+1)
  3310.  
  3311. The size should be a positive value.
  3312. If not, then the window coordinates are improperly set.
  3313.  
  3314.  
  3315.  
  3316. SEE ALSO: PUTSCRN
  3317.                                                             Page 88
  3318.  
  3319.  
  3320. 6.7  PUTCH - PUT A CHARACTER & ATTRIBUTE ON THE SCREEN
  3321. ----------------------------------------------------------------------
  3322.  
  3323.  
  3324.  
  3325.  
  3326. SYNTAX:
  3327.  
  3328. CALL PUTCH(row%,col%,char%,attr%)
  3329.  
  3330. row% = The absolute row number on the screen.
  3331.        row% must be between 1 and 24.
  3332.  
  3333. col% = The absolute column number on the screen.
  3334.        col% must be between 1 and 80.
  3335.  
  3336. char% = The character to put at (row%,col%)
  3337.  
  3338. attr% = The attribute of char%.
  3339.  
  3340.  
  3341.  
  3342. DESCRIPTION:
  3343.  
  3344. PUTCH "puts" a single character and its attribute onto the screen at a
  3345. specified position.
  3346.  
  3347.  
  3348.  
  3349. SEE ALSO: GETCH
  3350.                                                             Page 89
  3351.  
  3352.  
  3353. 6.8  PUTSCRN - RESTORE A PORTION OF SCREEN FROM AN ARRAY
  3354. ----------------------------------------------------------------------
  3355.  
  3356.  
  3357.  
  3358.  
  3359. SYNTAX:
  3360.  
  3361. CALL PUTSCRN(x1%,y1%,x2%,y2%,array%())
  3362.  
  3363. x1%,y1% = The top-left coordinates of the portion of the screen to be
  3364.           restored.
  3365.  
  3366. x2%,y2% = The bottom-right coordinates of the portion of the screen to be
  3367.           restored.
  3368.  
  3369. array% = The integer array that holds the screen information.
  3370.  
  3371.  
  3372.  
  3373.  
  3374. DESCRIPTION:
  3375.  
  3376. PUTSCRN restores a portion (or all) of the screen from an integer array.
  3377.  
  3378. The size of the array is calculated by the following formula:
  3379. size% = (x2%-x1%+1) * (y2%-y1%+1)
  3380.  
  3381. The size should be a positive value.
  3382. If not, then the window coordinates are improperly set.
  3383.  
  3384. NOTE: By using GETSCRN and PUTSCRN, it is possible to move screen contents
  3385. from one position to another.
  3386.  
  3387.  
  3388.  
  3389. SEE ALSO: GETSCRN
  3390.                                                             Page 90
  3391.  
  3392.  
  3393. 6.9  REVSCRN - REVERSE FOREGROUND/BACKGROUND ATTRIBUTES
  3394. ----------------------------------------------------------------------
  3395.  
  3396.  
  3397.  
  3398.  
  3399. SYNTAX:
  3400.  
  3401. CALL REVSCRN(x1%,y1%,x2%,y2%)
  3402.  
  3403. x1%,y1%  = The top-left coordinates of the portion of the
  3404.              screen to be reversed.
  3405.  
  3406. x2%,y2%  = The bottom-right coordinates of the portion of
  3407.              the screen to be reversed.
  3408.  
  3409.  
  3410.  
  3411. DESCRIPTION:
  3412.  
  3413. REVSCRN reverses the foreground and background attributes for all the
  3414. characters within a specified portion of the screen.
  3415.  
  3416. Example, if the attributes are blue on white, then upon executing
  3417. REVSCRN, the attributes will be switched to white on blue.
  3418.                                                             Page 91
  3419.  
  3420.  
  3421. 6.10  VSCROLL - SCROLL PORTION OF SCREEN VERTICALLY
  3422. ----------------------------------------------------------------------
  3423.  
  3424.  
  3425.  
  3426.  
  3427. SYNTAX:
  3428.  
  3429. CALL VSCROLL(x1%,y1%,x2%,y2%,times%,attr%,direction%)
  3430.  
  3431. x1%,y1% = The top-left coordinates of the portion of the screen to be
  3432.           scrolled.
  3433.  
  3434. x2%,y2% = The bottom-right coordinates of the portion of the screen to be
  3435.           scrolled.
  3436.  
  3437. times%     = The number of times to scroll.
  3438.          A value of 0 will clear the portion of the screen.
  3439.  
  3440. attr%     = The attribute of the lines inserted as the screen area is scrolled.
  3441.  
  3442. direction%  = 0  to scroll upward.
  3443.             = 1  to scroll downward.
  3444.  
  3445.  
  3446.  
  3447. DESCRIPTION:
  3448.  
  3449. Scroll specified area vertically for specified number of times up or down,
  3450. and replace lines with blank lines of a specified attribute.
  3451.  
  3452. This function is identical to BIOS function calls 6 and 7 (INT 10H).
  3453.                                                             Page 92
  3454.  
  3455.  
  3456.  
  3457.                             CHAPTER SEVEN
  3458.  
  3459.                     REFERENCE FOR MOUSE FUNCTIONS
  3460.  
  3461.  
  3462.         7.1     MBPRESS         Get Button Pressed Status
  3463.  
  3464.         7.2     MBREL           Get Button Released Status
  3465.  
  3466.         7.3     MHIDE           Turn Off The Mouse Cursor
  3467.  
  3468.         7.4     MINIT           Initialize The Mouse
  3469.  
  3470.         7.5     MOUSE           Get Mouse Position & Button Status
  3471.  
  3472.         7.6     MPENOFF         Turn Off Light Pen Emulation Mode
  3473.  
  3474.         7.7     MPENON          Turn On Light Pen Emulation Mode
  3475.  
  3476.         7.8     MRATIO          Set Mouse Step Ratio
  3477.  
  3478.         7.9     MSETPOS         Set The Mouse Cursor Position
  3479.  
  3480.         7.10    MSETX           Set The Min & Max (X axis) Coordinates
  3481.  
  3482.         7.11    MSETY           Set The Min & Max (Y axis) Coordinates
  3483.  
  3484.         7.12    MSHOW           Turn On The Mouse Cursor
  3485.                                                             Page 93
  3486.  
  3487.  
  3488. 7.1  MBPRESS - GET BUTTON PRESSED STATUS
  3489. ----------------------------------------------------------------------
  3490.  
  3491.  
  3492.  
  3493.  
  3494. SYNTAX:
  3495.  
  3496. CALL MBPRESS(status%,number%,x%,y%)
  3497.  
  3498. status% = The button to check for, represented by bits:
  3499.  
  3500.           Bit 0 = Set if checking for left button.
  3501.           Bit 1 = Set if checking for right button.
  3502.           Bit 2 = Set if checking for middle button.
  3503.                   (Logitech only)
  3504.  
  3505.  
  3506.  
  3507. RETURNS:
  3508.  
  3509. status% = Button pressed status.
  3510.           Bit(s) are set if button(s) checked for is pressed.
  3511.  
  3512. number% = A count of the number of button presses made since the last
  3513.           call to this function.
  3514.  
  3515. x%,y% = Position of mouse cursor (column,row) the last time the button
  3516.         was pressed.
  3517.  
  3518.          x% range = (0-639), y% range = (0-191)
  3519.  
  3520.  
  3521.  
  3522. DESCRIPTION:
  3523.  
  3524. MBPRESS returns the button pressed status since last call to this function.
  3525. This function is the opposite of MBREL.
  3526.  
  3527. The value returned for x% and y% are for GRAPHIC modes.
  3528.  
  3529. For TEXT modes, the values are evenly divisible by 8.
  3530. So, to find out where the mouse is on a text screen:
  3531.  
  3532.         column = INT(x%/8)   and    row = INT(y%/8)
  3533.  
  3534.  
  3535.  
  3536. SEE ALSO: MOUSE, MBREL
  3537.                                                             Page 94
  3538.  
  3539.  
  3540. 7.2  MBREL - GET BUTTON RELEASED STATUS
  3541. ----------------------------------------------------------------------
  3542.  
  3543.  
  3544.  
  3545.  
  3546. SYNTAX:
  3547.  
  3548. CALL MBREL(status%,number%,x%,y%)
  3549.  
  3550. status% = The button to check for, represented by bits:
  3551.  
  3552.           Bit 0 = Set if checking for left button.
  3553.           Bit 1 = Set if checking for right button.
  3554.           Bit 2 = Set if checking for middle button.
  3555.                   (Logitech only)
  3556.  
  3557.  
  3558.  
  3559. RETURNS:
  3560.  
  3561. status% = Button pressed status.
  3562.           Bit(s) are set if button(s) checked for is pressed.
  3563.  
  3564. number% = A count of the number of button releases made since the last call
  3565.           to this function.
  3566.  
  3567. x%,y% = Position of mouse cursor (column,row) the last time the button
  3568.         was released.
  3569.  
  3570.         x% range = (0-639), y% range = (0-191)
  3571.  
  3572.  
  3573.  
  3574. DESCRIPTION:
  3575.  
  3576. MBREL returns the button release status since last call to this function.
  3577. This function is the opposite of MBPRESS.
  3578.  
  3579. The value returned for x% and y% are for GRAPHIC modes.
  3580.  
  3581. For TEXT modes, the values are evenly divisible by 8.
  3582. So, to find out where the mouse is on a text screen:
  3583.  
  3584.         column = INT(x%/8)   and    row = INT(y%/8)
  3585.  
  3586.  
  3587.  
  3588. SEE ALSO: MOUSE, MBPRESS
  3589.                                                             Page 95
  3590.  
  3591.  
  3592.  
  3593. 7.3  MHIDE - TURN OFF THE MOUSE CURSOR
  3594. ----------------------------------------------------------------------
  3595.  
  3596.  
  3597.  
  3598.  
  3599. SYNTAX:
  3600.  
  3601. CALL MHIDE
  3602.  
  3603.  
  3604.  
  3605. RETURNS:
  3606.  
  3607. NOTHING
  3608.  
  3609.  
  3610.  
  3611. DESCRIPTION:
  3612.  
  3613. MHIDE turns off the mouse cursor, making it invisible.
  3614. The mouse driver still tracks the position of the mouse, even though it
  3615. has been turned off.
  3616. MHIDE requires no parameters.
  3617.  
  3618. IMPORTANT:  The mouse cursor should be turned off anytime characters are
  3619. written to the video display. Otherwise, the mouse driver would restore the
  3620. old character under the mouse cursor when the cursor is moved.
  3621.  
  3622.  
  3623.  
  3624. SEE ALSO: MSHOW
  3625.                                                             Page 96
  3626.  
  3627.  
  3628. 7.4  MINIT - INITIALIZE THE MOUSE
  3629. ----------------------------------------------------------------------
  3630.  
  3631.  
  3632.  
  3633.  
  3634. SYNTAX:
  3635.  
  3636. CALL MINIT(status%,buttons%)
  3637.  
  3638.  
  3639.  
  3640. RETURNS:
  3641.  
  3642. status%  = -1   if the mouse is installed.
  3643.          = 0    if the mouse is not installed.
  3644.  
  3645. buttons% = The number of buttons on the mouse.
  3646.            If there is no mouse installed, this value will always be 0.
  3647.  
  3648.  
  3649.  
  3650. DESCRIPTION:
  3651.  
  3652. MINIT performs a combined function of verifying that a mouse is installed,
  3653. and initializing the mouse software in QuickWindows.
  3654.  
  3655. You should ALWAYS initialize the mouse every time you run your application
  3656. program, because calling MINIT sets up internal variables in QuickWindows.
  3657.  
  3658. In order to utilize the mouse functions of QuickWindows, a mouse driver
  3659. must be installed. See the instruction manual included with your mouse
  3660. for instructions on installing the driver.
  3661.  
  3662. Both the Microsoft and Logitech drivers have been tested and work
  3663. properly with QuickWindows.
  3664.                                                             Page 97
  3665.  
  3666.  
  3667. 7.5  MOUSE - GET MOUSE POSITION & BUTTON STATUS
  3668. ----------------------------------------------------------------------
  3669.  
  3670.  
  3671.  
  3672.  
  3673. SYNTAX:
  3674.  
  3675. CALL MOUSE(button%,x%,y%)
  3676.  
  3677.  
  3678.  
  3679. RETURNS:
  3680.  
  3681. button%   (bit 0) = Set if left button pressed.
  3682.           (bit 1) = Set if right button pressed.
  3683.           (bit 2) = Set if middle button pressed (Logitech).
  3684.  
  3685. x% = Current column mouse cursor in (0 to 639).
  3686.  
  3687. y% = Current row mouse cursor in (0 to 192).
  3688.  
  3689.  
  3690.  
  3691. DESCRIPTION:
  3692.  
  3693. MOUSE returns the present mouse position and button status.
  3694.  
  3695. The values returned for x% and y% are for GRAPHIC modes.
  3696. For TEXT modes, the values are evenly divisible by 8.
  3697. So, to find out where the mouse is on a text screen:
  3698.  
  3699.        Column = INT(x%/8)   and   row = INT(y%/8)
  3700.  
  3701.  
  3702.  
  3703. SEE ALSO: WMOUSE, MSETPOS, MBPRESS, MBREL
  3704.                                                             Page 98
  3705.  
  3706.  
  3707. 7.6  MPENOFF - TURN OFF LIGHT PEN EMULATION MODE
  3708. ----------------------------------------------------------------------
  3709.  
  3710.  
  3711.  
  3712.  
  3713. SYNTAX:
  3714.  
  3715. CALL MPENOFF(x%,y%)
  3716.  
  3717. x% = The new mouse cursor column position (range 0 to 639).
  3718.  
  3719. y% = The new mouse cursor row position (range 0 to 191).
  3720.  
  3721.  
  3722.  
  3723. DESCRIPTION:
  3724.  
  3725. MPENOFF turns off the light pen emulation mode of the mouse driver.
  3726.  
  3727.  
  3728.  
  3729. SEE ALSO: MPENON
  3730.                                                             Page 99
  3731.  
  3732.  
  3733. 7.7  MPENON - TURN ON LIGHT PEN EMULATION MODE
  3734. ----------------------------------------------------------------------
  3735.  
  3736.  
  3737.  
  3738.  
  3739. SYNTAX:
  3740.  
  3741. CALL MPENON
  3742.  
  3743.  
  3744.  
  3745. DESCRIPTION:
  3746.  
  3747. MPENON turns on the light pen emulation mode of the mouse driver.
  3748. By doing this, the PEN functions in QuickBASIC will work under with the
  3749. mouse, although a little differently. Instead of registering "pen" positions
  3750. all the time as with the MOUSE function, the PEN function will only
  3751. return the current mouse position when any one of the mouse buttons
  3752. are pressed. 
  3753.  
  3754.  
  3755.  
  3756. SEE ALSO: MPENOFF
  3757.                                                             Page 100
  3758.  
  3759.  
  3760. 7.8  MRATIO - SET MOUSE STEP RATIO
  3761. ----------------------------------------------------------------------
  3762.  
  3763.  
  3764.  
  3765.  
  3766. SYNTAX:
  3767.  
  3768. CALL MRATIO(xstep%,ystep%)
  3769.  
  3770. xstep% = Sets the vertical mouse movement - pixel ratio.
  3771.  
  3772. ystep% = Sets the horizontal mouse movement - pixel ratio.
  3773.  
  3774.  
  3775.  
  3776. DESCRIPTION:
  3777.  
  3778. MRATIO sets the amount of physical mouse movement necessary to move the mouse
  3779. cursor eight pixels on the display.
  3780. In effect, this sets the "sensitivity" of the mouse.
  3781. The ratio is stated as number of "counts" to physically move the mouse
  3782. versus the mouse cursor moving eight pixels on the screen.
  3783.  
  3784. NOTE:  Both xstep% and ystep% have range of 1 to 32767.
  3785.  
  3786. xstep default = 16 "counts" = move 8 pixels.
  3787. ystep default =  8 "counts" = move 8 pixels.
  3788.                                                             Page 101
  3789.  
  3790.  
  3791. 7.9  MSETPOS - SET THE MOUSE CURSOR POSITION
  3792. ----------------------------------------------------------------------
  3793.  
  3794.  
  3795.  
  3796.  
  3797. SYNTAX:
  3798.  
  3799. CALL MSETPOS(x%,y%)
  3800.  
  3801. x% = The new column position (range 0 to 639).
  3802.  
  3803. y% = The new row position (range 0 to 191).
  3804.  
  3805.  
  3806.  
  3807. DESCRIPTION:
  3808.  
  3809. MSETPOS sets the mouse cursor to a new position.
  3810.  
  3811. For GRAPHIC modes, the values may be in increments of 1.
  3812. For TEXT modes, the values must be in increments of 8.
  3813. So, to set the mouse to location (5,10) on the text screen, the values
  3814. would be: x% = (5-1) * 8
  3815.                      y% = (10-1) * 8
  3816.  
  3817.  
  3818.  
  3819. SEE ALSO: WMOUSE, MOUSE, MBPRESS, MBREL
  3820.                                                             Page 102
  3821.  
  3822.  
  3823. 7.10  MSETX - SET THE MIN & MAX (X axis) COORDINATES
  3824. ----------------------------------------------------------------------
  3825.  
  3826.  
  3827.  
  3828.  
  3829. SYNTAX:
  3830.  
  3831. CALL MSETX(min%,max%)
  3832.  
  3833.  
  3834. min% = The minimum x-position (range 0 to 639).
  3835.  
  3836. max% = The maximum x-position (range 0 to 639).
  3837.  
  3838.  
  3839.  
  3840. DESCRIPTION:
  3841.  
  3842. Sets the minimum and maximum x-positions on the screen for the mouse cursor.
  3843.  
  3844. NOTE: max% must be greater than min%.
  3845.  
  3846. All mouse cursor movement is restricted to this area. Any attempt to move
  3847. cursor outside these boundaries will just keep the cursor on the boundary.
  3848.  
  3849. For GRAPHIC modes, the values may be in increments of 1.
  3850.  
  3851. For TEXT modes, the values must be in increments of 8.
  3852.  
  3853.  
  3854.  
  3855. SEE ALSO: MSETPOS
  3856.                                                             Page 103
  3857.  
  3858.  
  3859. 7.11  MSETY - SET THE MIN & MAX (Y axis) COORDINATES
  3860. ----------------------------------------------------------------------
  3861.  
  3862.  
  3863.  
  3864.  
  3865. SYNTAX:
  3866.  
  3867. CALL MSETY(min%,max%)
  3868.  
  3869.  
  3870. min% = The minimum y-position (range 0 to 191).
  3871.  
  3872. max% = The maximum y-position (range 0 to 191).
  3873.  
  3874.  
  3875.  
  3876. DESCRIPTION:
  3877.  
  3878. Sets the minimum and maximum y-positions on the screen for the mouse cursor.
  3879.  
  3880. All mouse cursor movement is restricted to this area. Any attempt to move
  3881. cursor outside these boundaries will just keep the cursor on the boundary.
  3882.  
  3883. NOTE: max% must be greater than min%.
  3884.  
  3885. For GRAPHIC modes, the values may be in increments of 1.
  3886.  
  3887. For TEXT modes, the values must be in increments of 8.
  3888.  
  3889.  
  3890.  
  3891. SEE ALSO: MSETPOS
  3892.                                                             Page 104
  3893.  
  3894.  
  3895. 7.12  MSHOW - TURN ON THE MOUSE CURSOR
  3896. ----------------------------------------------------------------------
  3897.  
  3898.  
  3899.  
  3900.  
  3901. SYNTAX:
  3902.  
  3903. CALL MSHOW
  3904.  
  3905.  
  3906.  
  3907. RETURNS:
  3908.  
  3909. NOTHING
  3910.  
  3911.  
  3912.  
  3913. DESCRIPTION:
  3914.  
  3915. MSHOW turns on the mouse cursor on the display, making it visible.
  3916. MSHOW requires no parameters and returns nothing.
  3917. The mouse cursor tracks the motion of the mouse, changing position as the
  3918. mouse changes position.  Even if the mouse cursor is turned off, the
  3919. mouse driver still tracks the motion of the mouse.
  3920.  
  3921.  
  3922.  
  3923. SEE ALSO: MHIDE
  3924.                                                             Page 105
  3925.  
  3926.  
  3927.  
  3928.                    Appendix 1    Screen Attributes
  3929. ---------------------------------------------------------------------------
  3930.  
  3931.  
  3932. The following table shows the attributes for both the color and monochrome
  3933. display adapters. To get the attribute value, combine the first hex value
  3934. for the background attribute with the 2nd hex value for the foreground
  3935. attribute.  Precede this 2-digit hex value with "&H" in your BASIC
  3936. programs. For example the value for RED foreground on WHITE
  3937. background would be &H74.
  3938.  
  3939.  
  3940.                               Monochrome
  3941.  
  3942. Hex Value   Background               Foreground
  3943.  
  3944.    0        Off                      Off
  3945.    1        On                       Underlined
  3946.    2        On                       On
  3947.    3        On                       On
  3948.    4        On                       On
  3949.    5        On                       On
  3950.    6        On                       On
  3951.    7        On                       On
  3952.    8        Off                      Off
  3953.    9        Blink                    Intense Underlined
  3954.    A        Blink                    Intense
  3955.    B        Blink                    Intense
  3956.    C        Blink                    Intense
  3957.    D        Blink                    Intense
  3958.    E        Blink                    Intense
  3959.    F        Blink                    Intense
  3960.  
  3961.                            Color
  3962.  
  3963. Hex Value   Background               Foreground
  3964.  
  3965.    0        Black                    Black
  3966.    1        Blue                     Blue
  3967.    2        Green                    Green
  3968.    3        Cyan                     Cyan
  3969.    4        Red                      Red
  3970.    5        Magenta                  Magenta
  3971.    6        Brown                    Brown
  3972.    7        White                    White
  3973.    8        Black-Blink              Gray
  3974.    9        Blue-Blink               Light Blue
  3975.    A        Green-Blink              Light Green
  3976.    B        Cyan-Blink               Light Cyan
  3977.    C        Red-Blink                Light Red
  3978.    D        Magenta-Blink            Light Magenta
  3979.    E        Brown-Blink              Yellow
  3980.    F        White-Blink              Bright White
  3981.                                                             Page 106
  3982.  
  3983.  
  3984.  
  3985.                   Appendix 2     Keyboard Scan Codes
  3986. ---------------------------------------------------------------------------
  3987.  
  3988.  
  3989. The following table lists the scan codes for the most useful keys used in
  3990. programming. These values can be obtained through the use of the INKEY$
  3991. function:
  3992. DO
  3993.     a$=INKEY$
  3994. WHILE a$ = ""
  3995. a$=a$+CHR$(0)
  3996. kbval=CVI(a$)
  3997.  
  3998.  
  3999.  Key    Value   CNTRL+key       ALT+key         SHIFT+key
  4000.  
  4001.  F1     15104   24064           26624           21504
  4002.  F2     15360   24320           26880           21760
  4003.  F3     15616   24576           27136           22016
  4004.  F4     15872   24832           27392           22272
  4005.  F5     16128   25088           27648           22528
  4006.  F6     16384   25344           27904           22784
  4007.  F7     16640   25600           28160           23040
  4008.  F8     16896   25856           28416           23296
  4009.  F9     17152   26112           28672           23552
  4010.  F10    17408   26368           28928           23808
  4011.  
  4012. Ins     20992   -               -                       -
  4013. Del     21248   -               -                       -
  4014. Home    18176   30464           -                       -
  4015. End     20224   29952           -                       -
  4016. PgUp    18688   -31744          -                       -
  4017. PgDn    20736   30208           -                       -
  4018. s       19200   29440           -                       -
  4019. a       20480   -               -                       -
  4020. w       19712   29696           -                       -
  4021. q       18432   -               -                       -
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.