home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-01 | 117.0 KB | 4,028 lines |
-
-
- ##########################\ ###\ ###\
- ##########################\ ###\ ###\
- ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ######\ ###\
- ###\ ###\ ###\ ######\ ###\
- ###\ ###\ ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ###\ ###\ ###\ ###\
- ###\ ###\ ###\ ###\ ###\ ###\ ###\
- ##########################\ ###\ ###\ ###\ ###\ ###\ ###\
- ##########################\ ###\ #######\ #########\ ###\
- ###\
- ###\
- ###\
-
-
-
-
-
-
-
-
- QUICKWINDOWS USERS GUIDE
-
- Revision 1.2
-
- Oct 15, 1987
-
- Manual Rev. Date 12/31/89
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Software Interphase Incorporated
- 5 Bradley Street
- Providence, RI 02908-2304
- (401) 274-5465
-
-
- Entire contents copyrighted 1987 by Software Interphase, Inc.
- All rights reserved.
-
- LICENSE AGREEMENT
-
- Software Interphase, Inc. provides these programs and grants you a
- TEMPORARY non-exclusive license for their use. This license is
- expires 30 days after you begin using QuickWindows, unless you
- register your copy with us. At that time you will be granted a full
- (Not time-limited) license. This known as FREE-WARE of SHAREWARE.
-
- You assume responsibility for selection of these programs for your
- purposes, and for the installation, use, and results from use of the
- programs.
-
- QuickWindows is distributed freely in this form so that a maximum
- number of people will be able to try it. We expect that if you
- continue to use it for more than 30 days, you will respect our work
- enough that you will either register your copy with us, or purchase
- QuickWindows Advanced, our commercially available library.
-
- See the text file README.TXT for more information
- regarding registration of QuickWindows, and how you can receive
- QuickWindows Advanced at a discount.
-
- This license is effective from December 31, 1989 until terminated.
-
- This License is governed by the laws of the State of Rhode Island.
-
- LIMITED WARRANTY
-
- THE PROGRAMS CONTAINED IN THIS PACKAGE ARE PROVIDED "AS IS" WITHOUT
- WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. THE ENTIRE RISK RELATED TO THE QUALITY AND PERFORMANCE OF THE
- PROGRAMS IS ON YOU. IN THE EVENT THERE IS ANY DEFECT, YOU ASSUME THE ENTIRE
- COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. SOME STATES DO NOT
- ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT
- APPLY TO YOU. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS WHICH VARY FROM
- STATE TO STATE.
-
- Software Interphase, Inc. does not warrant that the functions contained in
- the programs will meet your requirements or that the operation of the
- programs will be uninterrupted or error-free.
-
- U.S. GOVERNMENT RESTRICTED RIGHTS
- The software and documentation is provided with restricted rights. The use,
- duplication, or disclosure by the Government is subject to restrictions as
- set forth in subdivision (b)(3)(ii) of The Rights in Technical Data and
- Computer Software clause at 252.227-7013. Contractor/manufacturer is
- Software Interphase, Inc., 5 Bradley Street, Providence, RI 02908.
-
- QuickWindows and Syslink are trademarks of:
-
- Software Interphase, Inc.
- 5 Bradley Street
- Providence, RI 02908-2304
-
-
-
-
- TABLE OF CONTENTS
- ----------------------------------------------------------------------
-
-
- CHAPTER ONE: PRODUCT OVERVIEW
- Chapter Summary . . . . . . . . . . . . . . . . . 1
- What is QuickWindows? . . . . . . . . . . . . . . 2
- QuickWindows Function Summary . . . . . . . . . . 3
- Hardware Required . . . . . . . . . . . . . . . . 4
- Software Requirements . . . . . . . . . . . . . . 5
- Limitations . . . . . . . . . . . . . . . . . . . 6
- Disk Contents . . . . . . . . . . . . . . . . . . 8
-
-
- CHAPTER TWO: GETTING STARTED
- Chapter Summary . . . . . . . . . . . . . . . . . 9
- Installation . . . . . . . . . . . . . . . . . . 10
- Running QuickBASIC with QuickWindows . . . . . . 11
- The QuickWindows Demo program . . . . . . . . . . 12
- Rules for using QuickWindows with your programs . 13
- Template code for programs using QuickWindows . . 14
-
- CHAPTER THREE: USING QUICKWINDOWS
- Chapter Summary . . . . . . . . . . . . . . . . . 17
- Definitions . . . . . . . . . . . . . . . . . . . 18
- Windows . . . . . . . . . . . . . . . . . . . . . 19
- Pop-up and Pull-down Menus . . . . . . . . . . . 20
- Message Boxes . . . . . . . . . . . . . . . . . . 20
- Dialog Boxes . . . . . . . . . . . . . . . . . . 20
- List Boxes . . . . . . . . . . . . . . . . . . . 21
-
-
- CHAPTER FOUR: WINDOW FUNCTION REFERENCE
- Window Function Summary . . . . . . . . . . . . . 22
- WATTR Change Attribute of Window . . . . . . 23
- WBOX Draw a Box in a Window . . . . . . . . 24
- WBUTTONGET Get Button Selection Status . . . . . 25
- WBUTTONSET Define an Input Button . . . . . . . . 26
- WCATTR Change Attribute of a Column . . . . . 28
- WCLEAR Clear a Portion of a Window . . . . . 29
- WCLOSE Close a Window . . . . . . . . . . . . 30
- WCLOSEALL Close All Opened Windows . . . . . . . 31
- WCLS Clear a Specified Window . . . . . . . 32
- WCOLOR Set Default Back/Foreground Color . . 33
- WCOPYSTR Copy String Array into Window . . . . 34
- WCSROFF Turn off Visible Cursor . . . . . . . 35
- WCSRON Turn on Visible Cursor . . . . . . . . 36
- WCSRPOS Return Cursor Position within Window . 37
- WDELROW Delete a Row . . . . . . . . . . . . . 38
- WGETCH Get Character & Attribute from Window. 39
- WHINT Set Row to High-Intensity Mode . . . . 40
-
-
- TABLE OF CONTENTS
- ----------------------------------------------------------------------
-
-
- WINPUT General Purpose Window Input . . . . . 41
- WINSROW Insert Row in Window . . . . . . . . . 46
- WLINT Set Row to Low-Intensity Mode . . . . 47
- WLOCATE Set Relative Cursor Pos in Window . . 48
- WMOUSE Get Relative Mouse Position in Window. 49
- WOPEN Open a New Window . . . . . . . . . . 50
- WPRINT Output a String to a Window . . . . . 52
- WPUTCH Put a Character & Attribute in Window. 53
- WRATTR Change Attribute of a Row in Window . 54
- WREV Reverse Attributes of Entire Window . 55
- WREVLINE Reverse Attributes of Line in Window . 56
- WSELECT Select Window for Default Output . . . 57
- WTITLE Put a Title at Top-Center of Window . 58
- WVSCROLL Scroll Window Vertically Up or Down . 59
- WWRAP Turn Word Wrap On/Off in Window . . . 60
-
-
- CHAPTER FIVE: MENU FUNCTION REFERENCE
- Menu Function Reference . . . . . . . . . . . . . 61
- HELPMENU Display Help Information . . . . . . . 62
- MENUBAR Define a Menu Bar . . . . . . . . . . 64
- MENUGET Make Selection from Menu . . . . . . . 65
- MENUOFF Turn Off Menu Bar . . . . . . . . . . 67
- MENUON Turn On Menu Bar . . . . . . . . . . . 68
- MENUOPTION Enable/Disable a Menu Option . . . . . 69
- MENUSET Define a Set of Option for Menu . . . 70
- POPMENU Display a Pop-up Menu . . . . . . . . 72
- POPMENU1 Show a Pop-up Menu (W/Option Attribs). 74
- POPMENUH Display a Pop-up Horizontal Menu . . . 75
- POPMENUV Display a Pop-up Vertical Menu . . . . 78
-
-
- CHAPTER SIX: SCREEN FUNCTION REFERENCE
- Screen Function Summary . . . . . . . . . . . . . 81
- ATTRSCRN Set the Screen Attributes . . . . . . 82
- BOX Draw a Box on the Screen . . . . . . . 83
- BOX8SET Define a Box Style . . . . . . . . . . 84
- DMASCRN Enable/Disable Video Retrace Wait . . 85
- GETCH Get Character & Attribute from Screen. 86
- GETSCRN Store Portion of Screen into Array . . 87
- PUTCH Put Character & Attribute onto Screen. 88
- PUTSCRN Restore Portion of Screen from Array . 89
- REVSCRN Reverse Foreground/Background Attribs. 90
- VSCROLL Scroll Portion of Screen Vertically. . 91
-
-
- TABLE OF CONTENTS
- ----------------------------------------------------------------------
-
- CHAPTER SEVEN: MOUSE FUNCTION REFERENCE
- Mouse Function Summary . . . . . . . . . . . . . 92
- MBPRESS Get Button Pressed Status . . . . . . 93
- MBREL Get Button Released Status . . . . . . 94
- MHIDE Turn Off the Mouse Cursor . . . . . . 95
- MINIT Initialize the Mouse . . . . . . . . . 96
- MOUSE Get Mouse Position & Button Status . . 97
- MPENOFF Turn Off Light Pen Emulation Mode . . 98
- MPENON Turn On Light Pen Emulation Mode . . . 99
- MRATIO Set Mouse Step Ratio . . . . . . . . . 100
- MSETPOS Set the Mouse Cursor Position . . . . 101
- MSETX Set the Min/Max (x-axis) Coordinates . 102
- MSETY Set the Min/Max (y-axis) Coordinates . 103
- MSHOW Turn On the Mouse Cursor . . . . . . . 104
-
- APPENDIX
- Appendix 1 (Screen Attributes). . . . . . . . . . 105
- Appendix 2 (Keyboard Scan Codes). . . . . . . . . 106
-
-
- PREFACE
- ----------------------------------------------------------------------
-
-
- WHY QUICKWINDOWS?
-
- The much-maligned basic programming language is still going strong
- after years of use by millions of programmers world-wide. Even
- though it is "fashionable" to program in 'C', Modula, Prolog or one
- of the other new languages, Basic still holds its own as the language
- of choice for MOST of the programmers out there. Please note we are
- not trying to suggest that Basic is BETTER, but equal to, the others for
- everyday jobs.
-
- Why? Because it is easy to learn, use, and debug programs in Basic.
- Basic is used so often because more can be done in shorter time than
- with almost any other language.
-
- IT IS IN THIS SAME SPIRIT THAT QUICKWINDOWS WAS DEVELOPED!
-
- For the first time the Basic programmer can develop those
- user-friendly applications with windows, pull-down menus, and a
- mouse interface. All with the speed of assembly language, and the
- ease of use for the programmer of the Basic language.
-
- In short, A VERSATILE USER INTERFACE SYSTEM!
-
-
- QuickWindows was conceived, written and developed by Don Lambert.
- Don is a professional programmer whose credits include the famous
- Syslink bulletin board system and Waste Information Management
- Software. QuickWindows was initially developed as an in-house tool
- to speed up the development of applications. After we used it
- awhile, we realized the time and effort saved could be appreciated by
- ALL Basic programmers. We decided to offer QuickWindows as a
- complete windowing/menu/mouse system. And here you have it.
-
- ENJOY!
-
- ACKNOWLEDGEMENTS
- ----------------------------------------------------------------------
-
- Thanks first go to my family and close friends who have put up with
- the ridiculous hours I put in working on the development of
- QuickWindows and bringing it to you.
-
- Second thanks to Mark Titterington and Solution Design for their
- support and help with the package, and particularly the documentation.
-
- Finally I'd like to thank Bill Gates and Microsoft for providing the
- programming world with a great language dialect, interpreters, and
- compilers (especially QuickBASIC).
-
- And to all the rest of you..... THANKS!
-
-
-
- Don Lambert
-
- TECHNICAL SUPPORT
- ----------------------------------------------------------------------
- Technical Support is provided through Syslink, our Bulletin Board
- System (BBS). You can leave a message to the SYSOP there describing
- your problem and we will leave a response as soon as possible.
-
-
- NOTE: IF YOU HAVE NOT REGISTERED YOUR COPY OF QUICKWINDOWS, YOU ARE
- NOT ENTITLED TO TECH SUPPORT.
-
- If you decide to upgrade to QuickWindows Advanced (A commercial
- product), then you will receive normal telephone support in addition
- to the BBS.
-
- The BBS can be reached at (401) 272-1138 or (401) 272-1239.
- 300, 1200, 2400, or 9600 baud.
- 24 hours a day.
-
- Anyone can sign-up and use the BBS, but there may be areas which are
- restricted to people who have purchased (or registered) a product
- from us. There are example programs on the BBS, and demo programs
- for all our products.
-
-
- Page 01
-
-
- CHAPTER ONE
-
- INTRODUCTION
-
-
- 1.1 Product Overview
-
- 1.2 QuickWindows Function List
-
- 1.3 Hardware Requirements
-
- 1.4 Software Requirements
-
- 1.5 Limitations Of QuickWindows
-
- 1.6 QuickWindows Distribution Disk Contents
-
- Page 02
-
-
- 1.1 PRODUCT OVERVIEW
- ----------------------------------------------------------------------
-
-
-
-
- WHAT IS QUICKWINDOWS?
-
- QuickWindows is a complete screen, window, and menu
- handling system designed for the Basic programmer. The
- idea is that rather than "re-inventing the wheel" as
- they say, you can benefit by the work that's already
- been done by us.
-
- The system is in the form of a "Library". This library
- is a special file which contains only the machine
- language form of all the functions included. If the
- library is used from within QuickBASIC, then the
- compiler generates calls to the routines in the library
- each time you compile in memory.
-
- If a stand-alone program is generated, then the
- routines from the library are linked into the file with
- the machine code generated from your basic code. Each
- function is accessed by "calling" it from your QuickBASIC
- or BASIC application.
-
- The system consists of functions logically grouped into
- four sections: WINDOWS, MENU, SCREEN, and MOUSE.
-
- For more information, see section 3.0 "Using
- QuickWindows", and the appropriate reference section of
- this manual.
- Page 03
-
-
- 1.2 QUICKWINDOWS FUNCTION LIST
- ----------------------------------------------------------------------
-
-
- WINDOW HANDLING FUNCTIONS
-
- WATTR WBOX WBUTTONGET WBUTTONSET
- WCATTR WCLEAR WCLOSE WCLOSEALL
- WCLS WCOLOR WCOPYSTR WCSROFF
- WCSRON WCSRPOS WDELROW WGETCH
- WHINT WINPUT WINSROW WLINT
- WLOCATE WMOUSE WOPEN WPRINT
- WPUTCH WRATTR WREV WREVLINE
- WSELECT WSETCSR WTITLE WVSCROLL
- WWRAP
-
-
- MENU HANDLING FUNCTIONS
-
- HELPMENU MENUBAR MENUGET MENUOFF
- MENUON MENUOPTION MENUSET POPMENU1
- POPMENU POPMENUH POPMENUV
-
-
-
- SCREEN HANDLING FUNCTIONS
-
- ATTRSCRN BOX BOX8SET DMASCRN
- GETCH GETSCRN PUTCH PUTSCRN
- REVSCRN VSCROLL
-
-
-
- MOUSE HANDLING FUNCTIONS
-
- MBPRESS MBREL MHIDE MINIT
- MOUSE MPENOFF MPENON MSETPOS
- MSETX MSETY MSHOW MRATIO
- Page 04
-
-
- 1.3 HARDWARE REQUIREMENTS
- ----------------------------------------------------------------------
-
-
-
- HARDWARE REQUIREMENTS
-
- QuickWindows has been designed to work properly on the
- (*)IBM-PC, IBM-XT, IBM-AT, PS/2, and any close compatible. By
- close compatibles we mean most clones. As long as the
- video memory is mapped to standard locations (B8000H CGA
- and B0000H Mono), and the video boards are hardware
- compatible with IBM MGA or IBM CGA cards, there should
- not be any problem. QuickWindows should also work under
- an EGA emulating the MGA/CGA text modes (80 x 25).
-
- The computer should have either a hard disk or at least
- two floppy disk drives. Although it's certainly possible
- to run off one floppy drive, it's really impractical.
-
-
- MEMORY REQUIRED
-
- QuickWindows adds approximately 21K to your object
- code. As a practical matter, you should have a minimum
- of at least 320K of AVAILABLE memory before you run
- QuickBASIC with the library. With the inexpensive cost
- of memory devices these days, we recommend that you have
- at least 512K of memory installed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- * IBM-PC, IBM-XT, IBM-AT are trademarks of International Business Machines
- Corporation, Boca Roton, Florida.
- Page 05
-
-
- 1.4 SOFTWARE REQUIREMENTS
- ----------------------------------------------------------------------
-
-
-
- OPERATING SYSTEMS
-
- QuickWindows works with PC/MS DOS version 2.1 or later.
-
-
-
- COMPILER COMPATIBILITY
-
- QuickWindows works with Microsoft's BASIC Compiler (versions 5.36,
- 6.x, or 7.0) and QuickBASIC compiler (versions 2.x, 3.x, 4.x, and
- QB Extended).
-
-
-
- COMPATIBILITY PROBLEMS
-
- Please report any incompatibility to us as soon as you
- can. If at all possible, we will correct the problem
- or give you a work-around.
-
-
-
- Page 06
-
-
- 1.5 LIMITATIONS OF QUICKWINDOWS
- ----------------------------------------------------------------------
-
-
-
-
- VIOLATIONS OF LIMITATIONS
-
- There is no known problem in QuickWindows that can cause
- your program to "crash". Most routines use an error flag
- by setting the window id = -1 when an internal error
- occurred. Most programmer errors will cause one or more
- things to happen.
-
- 1.) -1 is returned in the window id.
-
- 2.) Text in a window will be truncated and/or
- wrapped around in an undesirable fashion.
-
- 3.) No action will be taken at all.
-
-
- LIMITATIONS
-
- MAXIMUM NUMBER OF WINDOWS: Up to 32 windows can be
- active or open at one time.
-
- OVERLAPPING WINDOWS: If windows are overlapped, they
- must be removed (closed) in reverse order, (top to
- bottom). If the windows do not overlap, they can be
- closed in any order.
-
- VIRTUAL SCREENS: QuickWindows presently DOES NOT
- support "virtual screens". This means you cannot write
- into a window that is underneath another, or is not
- opened. We feel that this is a minor limitation that
- does not affect 99% of the users, and allows us to keep
- QuickWindows SMALL & FAST.
-
- SCREEN SIZE: In no case exceed 24 lines or 80 columns.
- QuickWindows does very little checking, thus keeping the
- overhead low and the library fast.
-
- MENUBAR: Up to 10 menus may be defined in the menubar.
- Each menu can have up to 16 options.
-
- MENU TEXT: Each menu in the pull-down menu system can
- have up to 300 characters of text for each (not
- including QuickWindows generated spaces).
-
- POPMENUH & POPMENUV: Cannot exceed 255 items in the list.
-
- Page 07
-
-
- LIMITATIONS OF QUICKWINDOWS (Continued)
- ----------------------------------------------------------------------
-
-
-
- ** IMPORTANT BUG **
-
- There is a "bug" (Acknowledged by Microsoft) in
- QuickBASIC versions 2.x and 3.0 which can cause users of
- QuickWindows to encounter an undeserved "Out of String
- Space" error in large programs. The error has to do with
- passing STRING CONSTANTS ONLY.
-
- Each time an assembly language routine is called, any
- string constants are put onto a first-in, last-out stack
- called a "heap". When the assembler routine returns
- control to QuickBASIC, the string constants should be
- removed from this area, BUT ARE NOT. So after many calls
- with string constants, the heap runs out of space. There
- is no safe way for QuickWindows to get around this
- problem unfortunately.
-
- If your application program doesn't use that many
- string constants, this problem won't affect you that
- much. You can monitor the amount of free string space
- left by using the FRE("") function in BASIC.
-
- However, if you do run into a problem, there is a way to
- work around it. Equate all your string constants to a
- variable, then use this variable name when you call the
- function. This is our suggestion, even though it's a
- little cumbersome. It ensures that your program will not
- crash unexpectedly. You can allocate one string variable
- name to be used (assigned) over and over, such as A$.
-
- EXAMPLE:
-
- INSTEAD OF: CALL WPRINT(1,"Hello world")
-
- USE: A$="Hello world":CALL WPRINT(1,A$)
-
- It has been found out that this bug also affects
- subprograms. Apparently, subprograms are treated like
- an assembly language call, thus exhibit this same bug
- with the string constants.
-
- Page 08
-
-
- 1.6 QUICKWINDOWS DISTRIBUTION DISK CONTENTS
- ----------------------------------------------------------------------
-
-
-
-
- The distribution disk supplied contains a file entitled
- "README.TXT".
-
- This file contains a descriptive list of all the files
- on the disk, their use or importance to you and other
- valuable information which for one reason or another
- didn't make it into the manual. The file is in straight
- ASCII form, so may be viewed on your text/word processor,
- or may be "typed" from the DOS command line.
-
-
- TO VIEW THIS FILE ON SCREEN:
-
- STEP 1 - Change to the drive and directory where the
- file is located.
-
- STEP 2 - ENTER: TYPE README.TXT <cr>
-
-
-
-
- TO PRINT THIS FILE OUT TO THE PRINTER:
-
- STEP 1 - Change to the drive and directory where the
- file is located.
-
- STEP 2 - ENTER: TYPE README.TXT > PRN <cr>
- Page 09
-
-
-
-
-
-
- CHAPTER TWO
-
-
- GETTING STARTED
-
-
-
-
-
- 2.1 Installing QuickWindows On Your Computer
-
- 2.2 Running QuickBASIC With QuickWindows
-
- 2.3 The QuickWindows Demo Program
-
- Page 10
-
-
- 2.1 INSTALLING QUICKWINDOWS ON YOUR COMPUTER
- ----------------------------------------------------------------------
-
-
- FLOPPY BASED SYSTEMS
-
- If you have a hard (fixed) disk installed in your
- computer, skip this section and proceed to the next
- (Hard disk systems).
-
- First make a copy of your QuickWindows distribution
- disk using the DOS command DISKCOPY. Put the original
- disks away in a safe location and only use the copies
- you have made.
-
- STEP 1: Format a disk with the DOS format command, and
- the option /S to make a system disk. Load whatever
- QuickBASIC files are needed. (Consult your QuickBASIC
- manual)
-
- STEP 2: Copy the QuickWindows library (both .OBJ and
- .EXE versions) onto this disk. This disk becomes your
- main program disk (ie drive A). All your source code
- can reside on another disk in drive B.
-
-
-
- HARD DISK SYSTEMS
-
- 1. Copy all the files from the distribution disk's root directory to the
- same directory that QB resides in.
-
- 2. Copy all the files from the appropriate sub-directory on the
- distribution disk for your version of QuickBASIC. Subdirectories are
- \QB3 for QB version 2.x or 3.x, \QB4 for QB version 4.0, \QB45 for QB
- version 4.5, and \BC7 for BASIC Compiler version 7.0. For BASIC compiler
- version 6, use the files in the \QB4 directory.
-
- Page 11
-
-
- 2.2 RUNNING QUICKBASIC WITH QUICKWINDOWS
- ----------------------------------------------------------------------
-
-
-
-
- USING QUICKWINDOWS WITH PROGRAMS COMPILED IN MEMORY
-
- To start QuickBASIC with the QuickWindows functions
- available:
-
- For QB 3.x, type QB /L QW.EXE
- For QB 4.x, type QB /L QW.QLB
- For BASIC 7, type QBX /L QW.QLB
-
- exactly as it appears above. This instructs QuickBASIC
- to load the entire library into memory.
-
- You will now have all the QuickWindows functions
- available for your use while your program is compiled
- in memory.
-
-
- MAKING STAND ALONE PROGRAMS WITH QUICKWINDOWS
-
- 1. Compile your program using the BCOM option.
- 2a. For all versions of QuickBASIC (just substitute proper BCOM library
- below):
- Link your object code with QuickWindows' library
- and reference the BCOMxx.LIB library:
-
- OBJECT MODULES [.OBJ]: MYPROG (cr)
- Run File [MYPROG.EXE]: (cr)
- List File [NUL.MAP]: (cr)
- Libraries [.LIB]: BCOM45+QW (assuming QB ver 4.5)
-
- 2b. For BASIC 7.0, compile using MAKE .EXE FILE option under the RUN
- menu. Then select Stand-Alone .EXE, Far Strings, and No string
- compression. Next select MAKE .EXE and EXIT. The compiler will
- compile your program and link it with QuickWindows.
- (for compiling large programs with multiple modules, consult the
- BASIC reference manual. But remember always to link in QW.LIB).
-
- 3. Your program will now be in .EXE format and may
- be executed directly from DOS.
- Page 12
-
-
- 2.3 THE QUICKWINDOWS DEMO PROGRAM
- ----------------------------------------------------------------------
-
-
-
-
- WHY HAVE A DEMO PROGRAM?
-
- QuickWindows comes with a demo program that provides
- you with a few things of interest.
-
- 1.) The demo program gives you a general idea of what
- QuickWindows is capable of.
-
- 2.) The demo program is INVALUABLE for programmers.
- It gives you information and examples on how to
- use QuickWindows with your programs. It also
- serves as a tutorial.
-
- Before you start programming with QuickWindows, you
- should make a listing of the demo program on your
- printer. There is an example of use of most every
- single function in the library.
-
-
- Page 13
-
-
- 2.4 RULES FOR USING QUICKWINDOWS WITH YOUR PROGRAMS
- ----------------------------------------------------------------------
-
- 1. The syntax for all of the QuickWindows commands are the same as
- in the manual, except for the following:
-
- a. The method of passing arrays (integer or string) depends on the
- version of QuickBASIC you are using...
-
- Format for QuickBASIC 4.0, QB 4.5, QBX, BASIC 6.0 and 7.0
- (as described in the manual):
- CALL GETSCRN(1, 1, 80, 24, array%())
- CALL WOPEN(1,1,80,24,2,&H74,"",scrn%(),1)
- CALL MENUSET(n,o,2,&H04,&H0F,&H07,255,VARPTR(menu$(0)))
- Notice that string arrays require VARPTR, while integer arrays
- do not.
-
- QuickBASIC version 3.0 or BASIC Compiler 5.36:
- CALL GETSCRN(1, 1, 80, 24, VARPTR(array%(0)))
- CALL WOPEN(1,1,80,24,2,&H74,"",VARPTR(scrn%(0)),1)
- CALL MENUSET(n,o,2,&H04,&H0F,&H07,255,VARPTR(menu$(0)))
- Notice that both string and integer arrays require VARPTR.
-
- So wherever we reference an array in a call to a QuickWindows
- function, you have to change a reference like ... array%(),
- to ...VARPTR(array%(0)), .
-
- 2. Before using any of the features within the QuickWindows Library, you
- first must call QWINIT. This command sets up internal variables and
- routines within QuickWindows for your specific BASIC compiler.
-
- For QuickBASIC 3.x or BASIC Compiler 5.36: CALL QWINIT(3)
- For QuickBASIC 4.x or BASIC Compiler 6.xx: CALL QWINIT(4)
- For BASIC 7.0 Compiler or QB Extended: CALL QWINIT(5)
-
- 3. Make all the integer arrays passed to QuickWindows DYNAMIC, with the
- metacommand REM $DYNAMIC.
-
- 4. Make sure all the parameters that you pass to QuickWindows are of the
- proper type (ie, integer or string). Many problems people have reported
- resulted in their passing of floating point numbers.
-
- 5. Make sure you have the exact number of parameters as shown in the
- documentation. Lockups will occur when you use the improper number
- of parameters. The wrong number of parameters results in the stack
- containing the wrong address of your program for QuickWindows to
- return to.
-
-
- Page 14
-
-
- 2.5 TEMPLATE CODE FOR PROGRAMS USING QUICKWINDOWS
- ----------------------------------------------------------------------
-
- The following code fragment demonstrates the recommended way of using
- the QuickWindows Library.
-
- REM $DYNAMIC
- DEFINT a-z
-
- COMMON SHARED w1(),w2(),... 'used if your program has many modules.
- DIM SHARED w1(2000),w2(1000) 'size of dimension depends on size of
- 'window. SHARED is used if you use these
- 'same arrays within Sub-Programs.
- CALL QWINIT(5) 'initialize for BASIC 7.0.
- CALL MINIT(s,b) 'initialize mouse.
-
- CALL WOPEN(1, 1, 80, 24, 2, &H71, "TITLE", w1(), 1)
- 'open a window the size of the whole
- 'screen with a double line border. &H71
- 'sets the window attribute to white
- 'background with blue foreground. By
- 'using the &H (hex) notation, it is
- 'quicker and easier to set video
- 'attributes once you get the hang of it.
-
-
-
- Page 16
-
-
- 2.6 Notes
-
-
- Page 17
-
-
-
- CHAPTER THREE
-
-
- USING QUICKWINDOWS
-
-
-
- 3.1 Definitions
-
- 3.2 Windows
-
- 3.3 Pop-Up And Pull-Down Menus
-
- 3.4 Message Boxes
-
- 3.5 Dialog Boxes
-
- 3.6 List Boxes
-
- Page 18
-
-
- 3.1 Definitions
- ----------------------------------------------------------------------
-
-
-
-
- QuickWindows is a powerful library to aid you in creating windows,
- pop-up and pull-down menus, message boxes, dialog boxes, and list
- boxes. This chapter provides you with conceptual information on how
- to do all of these. Some specific examples are provided only as
- guidelines. But first, we'll start off with a few definitions:
-
- Pop-up menu A menu that appears on the screen and
- presents options to the user. Once an
- option is selected, the menu disappears
- and the screen underneath is restored.
-
- Pull-down menu A two-dimensional menuing system whereby
- the user selects from a group of menus
- along the top of the screen and another
- menu "drops down" underneath the chosen
- menu. The user then can select an
- option from the "dropped down" menu.
-
- Message boxes A pop-up window that contains a message
- and a set of pre-defined input
- responses. Once the user has selected a
- response, the window disappears.
-
- Dialog boxes A pop-up window or a box within a window
- that allows the user to input text
- information. This is the simplest form
- of a dialog box supported by this version
- of QuickWindows.
-
- List boxes A pop-up window containing a list of
- items. The list may be arranged
- horizontally or vertically. The user
- may scroll page-by-page through the
- list, and make a choice of one of the
- items in the list.
- Page 19
-
-
- 3.2 Windows
- ----------------------------------------------------------------------
-
-
- Creating a window must be done with the WOPEN command.
- You must specify where the window will start and end,
- what color and style the border will be, what title (if
- any), and what the window ID will be. All subsequent
- window functions will reference this window by its ID.
- Since the screen contents underneath the window will
- automatically be saved, you must also specify an
- INTEGER ARRAY that will hold the screen information.
- You must make sure that the array is DIM'd large enough
- or a program crash may occur. The size of the integer
- array can be calculated by the following formula:
-
- Window size=(x2-x1+1)*(y2-y1+1)
-
- where (x1,y1) are the top-left window coordinates,
- and (x2,y2) are the bottom-right window coordinates
-
- Once a window has been opened, you may write to it,
- take input from it, alter its attributes, clear it,
- etc. In short, there are functions in QuickWindows
- that treat the window like the regular display. Here
- are some of the most commonly used functions in dealing
- with windows:
-
- WOPEN, WCLS, WCOLOR, WLOCATE, WCSRPOS, WWRAP, WPRINT,
- WINPUT, and WCLOSE.
-
- QuickWindows offers you other functions to be used as
- building blocks to create your own versions of pop-up
- and pull-down menus, and message and dialog boxes.
-
- See the reference section and the source code to the
- demo program for specific information on opening a
- window, writing to it, and closing it.
-
- Page 20
-
-
- 3.3 Pop-up and Pull-down Menus
- ----------------------------------------------------------------------
-
- QuickWindows provide you simple functions to design a
- versatile menuing system. Only one function is needed
- to create a pop-up menu. Once a selection has been
- made, the menu disappears and the screen is restored.
- For a clear-cut example of designing a pop-up menu
- with QuickWindows, see sample file POPMENU.BAS.
-
- Designing a pull-down menuing system is slightly more
- involved. First you must define what the menus will
- be along the top of the screen (MENUBAR). Next you
- have to define the options for each of the menus
- (MENUSET). Thirdly, the pull-down menu system must be
- enabled (MENUON). And lastly, a continuous check
- must be done to see if the user has made a selection
- (MENUGET). See the source code in the sample program
- for a complete example on how to use the pull-down
- menuing system.
-
-
- 3.4 Message Boxes
- ----------------------------------------------------------------------
-
- Making a message box is done simply by opening a
- window, printing the message, and waiting for some
- action from the user through the use of WBUTTONSET and
- WBUTTONGET. See example program BUTTON.BAS
-
-
- 3.5 Dialog Boxes
- ----------------------------------------------------------------------
- Dialog boxes are similar to message boxes except that
- a text input response is requested from the user. Note that this
- idea is a simple form of a dialog box. Our QuickWindows Advanced
- library supports even more complex dialog boxes that contain
- fielded input boxes, checkboxes, radio buttons, pushbuttons,
- horizontal and vertical scroll lists, and rangebars. And with our
- Designer QuickWindows package, laying out dialog boxes is a snap!
-
- Page 21
-
-
-
- 3.6 List boxes
- ----------------------------------------------------------------------
-
-
- QuickWindows supports two types of list boxes, vertical
- (POPMENUV) and horizontal (POPMENUH). The inherent
- operation of a list box allows the user to scroll
- through a list of items (singularly or page-by-page)
- and make a selection. The keyboard or a mouse may be
- used.
-
- To make a list box, you must first open a window
- and set up attribute parameters. Next put your list
- of items into a string array. The array can be sorted
- for some typical applications. Lastly, make a call to
- POPMENUV or POPMENUH for selection. A scroll bar
- appears on the right side for POPMENUV and on the
- bottom for POPMENUH. Using the mouse with the scroll
- bar will allow the user to quickly move anywhere within
- the list of items.
-
- See the source code in the demo and the reference
- section for more detailed information.
-
-
- Page 22
-
-
-
- CHAPTER FOUR
-
- REFERENCE FOR WINDOWING FUNCTIONS
-
-
- 4.1 WATTR Change Attribute Of Window
- 4.2 WBOX Draw A Box In A Window
- 4.3 WBUTTONGET Get Button Selection Status
- 4.4 WBUTTONSET Define An Input Button
- 4.5 WCATTR Change Attribute Of A Column
- 4.6 WCLEAR Clear Portion Of A Window
- 4.7 WCLOSE Close A Window
- 4.8 WCLOSEALL Close All Opened Windows
- 4.9 WCLS Clear Entire Window
- 4.10 WCOLOR Set Default Foreground/Background Color
- 4.11 WCOPYSTR Copy String Array Into Window
- 4.12 WCSROFF Turn Off Visible Cursor
- 4.13 WCSRON Turn On Visible Cursor
- 4.14 WCSRPOS Return Cursor Position Within Window
- 4.15 WDELROW Delete A Row
- 4.16 WGETCH Get A Character & Attribute From Window
- 4.17 WHINT Set Row To High-Intensity Mode
- 4.18 WINPUT General Purpose Window Input
- 4.19 WINSROW Insert Row In Window
- 4.20 WLINT Set Row To Low-Intensity Mode
- 4.21 WLOCATE Set Relative Cursor Position In Window
- 4.22 WMOUSE Get Relative Mouse Position In Window
- 4.23 WOPEN Open A New Window
- 4.24 WPRINT Output A String To A Window
- 4.25 WPUTCH Put A Character & Attribute In A Window
- 4.26 WRATTR Change Attribute Of A Row In Window
- 4.27 WREV Reverse Attributes Of Entire Window
- 4.28 WREVLINE Reverse Attributes Of Line In Window
- 4.29 WSELECT Select Window For Default Output
- 4.30 WSETCSR Set Cursor Shape In Window
- 4.31 WTITLE Put A Title At Top-Center Of Window
- 4.32 WVSCROLL Scroll Window Vertically Up Or Down
- 4.33 WWRAP Turn Word Wrap On/Off In Window
-
-
- Page 23
-
-
- 4.1 WATTR - CHANGE ATTRIBUTE OF WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WATTR(id%,attribute%)
-
- id% = The number of a currently opened window.
-
- attribute% = The foreground/background attribute value.
-
-
-
- DESCRIPTION:
-
- Changes attribute of the entire window screen inside the borders.
-
-
-
- See Appendix 1 for determining attribute values.
-
-
-
- SEE ALSO: WCATTR, WRATTR, WCOLOR
-
- Page 24
-
-
- 4.2 WBOX - DRAW A BOX IN A WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WBOX(id%,x1%,y1%,x2%,y2%,style%,color%)
-
- id% = The current opened window id.
-
- x1%,y1% = The top-left coordinates inside the opened window,
- relative to the start of the opened window at
- (0,0).
-
- x2%,y2% = The bottom-right coordinates inside the opened
- window. x2,y2 must not exceed relative size of
- opened window.
-
- style% = The box style. Can be one of the following:
-
- BOX STYLES
-
- 0 - no border
- 1 - single line border
- 2 - double line border
- 3 - light shadow border
- 4 - medium shadow border
- 5 - dark shadow border
- 6 - solid border
- 7 - double line with square corners
- 8 - user definable border (see BOX8SET)
-
-
- color% = The foreground/background attribute value.
- See Appendix 1 for attribute/color values.
-
-
-
- DESCRIPTION:
-
- WBOX makes a box within a window.
-
- The x1,y1,x2,y2 coordinates are relative to the top-left
- corner (0,0) in the window id%.
- Page 25
-
-
- 4.3 WBUTTONGET - GET BUTTON SELECTION STATUS
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WBUTTONGET(focus%,start%,number%,result%)
-
- focus% = The button to highlight upon entering this
- function.
-
- start% = Is the button number to start checking.
- (range 1 to 32)
-
- number% = Is the number of buttons to check from
- start% to start%+number%. Cannot exceed 32.
-
- result% = Contains a button number that is selected,
- otherwise a 0 if no selection is made.
-
-
-
- DESCRIPTION:
-
- When a button is highlighted, the input focus is on that button.
- To move the input focus, the left/right arrow keys may be used or
- the mouse cursor may be placed on top of the button and the left
- mouse button must be held.
-
- To select a button, press ENTER or release the left mouse button.
- A button may also be selected by pressing the appropriate key as
- defined in kb% in WBUTTONSET.
-
- If no button is selected, result%=0. In order to continue to monitor
- button selection status, you must call WBUTTONGET every time result%=0.
-
-
-
- SEE ALSO: WBUTTONSET
- Page 26
-
-
- 4.4 WBUTTONSET - DEFINE AN INPUT BUTTON
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WBUTTONSET(id%,button%,kb%,hstyle%,hattr%,lstyle%,
- lattr%,x%,y%,button$)
-
-
- id% = The current opened window id.
-
- button% = The button number (range 1 to 32).
-
- kb% = The keyboard value for directly selecting this button.
- A value of 0 disables direct selection of this button.
-
- hstyle% = The button box style for highlighting the input focus.
- (Currently not used in QuickWindows).
-
- hattr% = The attribute of the button when it becomes focused or selected.
-
- lstyle% = The button box style.
-
- lattr% = The button attribute for non-focused mode.
-
- x%,y% = The relative starting coordinates of button within specified window.
- The top-left inside part of a window is considered coordinates (0,0).
-
- button$ = The text string within button, such as a command or
- acknowledgement prompt.
-
- Cont.....
-
- Page 27
-
-
- WBUTTONSET - DEFINE AN INPUT BUTTON (continued)
- ----------------------------------------------------------------------
-
-
-
- DESCRIPTION:
-
- WBUTTONSET defines an input button within a specified window.
-
- BOX STYLES
-
- 0 - no border
- 1 - single line border
- 2 - double line border
- 3 - light shadow border
- 4 - medium shadow border
- 5 - dark shadow border
- 6 - solid border
- 7 - double line with square corners
- 8 - user definable border (see BOX8SET)
-
-
- The height of the button will always be 3 lines deep
- (top border, text, bottom border).
- The width will depend on the length of button$.
- The button will contain a left border, space, text, space, and right
- border. Make sure that the button dimensions will fit within the
- specified window.
-
- Up to 32 buttons may be defined within any opened window at one time.
-
- NOTE: Buttons should be defined consecutively to allow
- WBUTTONGET to work properly.
-
-
-
- SEE ALSO: WBUTTONGET
- Page 28
-
-
- 4.5 WCATTR - CHANGE ATTRIBUTE OF A COLUMN
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCATTR(id%,column%,attribute%)
-
- id% = The number of a currently opened window.
-
- column% = The column in which the attribute will be changed.
-
- attribute% = The foreground/background attribute value.
- See Appendix 1 for determining attribute values.
-
-
-
- DESCRIPTION:
-
- Changes attribute of a column within a specified window.
-
-
-
- SEE ALSO: WATTR, WRATTR, WCOLOR
- Page 29
-
-
- 4.6 WCLEAR - CLEAR PORTION OF A WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCLEAR(id%,x1%,y1%,x2%,y2%)
-
- id% = The number of a currently opened window.
-
- x1%,y1% = The top-left coordinates inside the opened window, relative to
- the start of the opened window at (0,0).
-
- x2%,y2% = The bottom-right coordinates inside the opened window.
- x2,y2 must not exceed relative size of opened window.
-
-
-
- DESCRIPTION:
-
- Clears a window within a specified window.
- WCLEAR assumes the attribute defined by the WCOLOR command.
-
- NOTE: The mouse cursor is turned off by this command.
-
-
-
- SEE ALSO: WCOLOR, WCLS
- Page 30
-
-
- 4.7 WCLOSE - CLOSE A WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCLOSE(id%)
-
- id% = The number of a currently opened window.
-
-
-
- DESCRIPTION:
-
- Closes a currently opened window and restores the screen beneath the window.
-
- If a window ID is already closed, no action will be taken.
-
- NOTE: The mouse cursor is turned off by this command.
-
-
-
- SEE ALSO: WOPEN
- Page 31
-
-
- 4.8 WCLOSEALL - CLOSE ALL OPENED WINDOWS
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCLOSEALL
-
-
-
- DESCRIPTION:
-
- Closes all windows that are currently opened. Does not restore screen
- contents to previous values.
-
- The WCLOSEALL function releases all internal pointers, frees up space
- used by any opened windows, and restores video and keyboard device drivers
- if modified by QuickWindows.
- The function does not clear any windows that may currently be on the screen.
-
- NOTE: It is recommended that this function be used at the beginning of
- your application program to assure that all internal pointers are reset.
-
-
-
- SEE ALSO: WOPEN, WCLOSE
- Page 32
-
-
- 4.9 WCLS - CLEAR ENTIRE WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCLS(id%)
-
- id% = The number of a currently opened window.
-
-
-
- DESCRIPTION:
-
- Clears entire window and homes cursor to top-left corner of the window.
-
- The attribute of the cleared window will assume the attribute value
- previously defined by the WOPEN or WCOLOR functions.
-
- NOTE: The mouse cursor is turned off by this command.
-
-
-
- SEE ALSO: WOPEN, WCOLOR
- Page 33
-
-
- 4.10 WCOLOR - SET DEFAULT FOREGROUND/BACKGROUND COLOR
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCOLOR(id%,attrib%)
-
- id% = The number of a currently opened window.
-
- attrib% = The foreground/background attribute value.
-
-
-
- DESCRIPTION:
-
- Sets the foreground/background attribute for all subsequent WPRINT or
- WCOPYSTR operations.
-
- See Appendix 1 for determining attribute values.
-
-
-
- SEE ALSO: WPRINT, WCOPYSTR
- Page 34
-
-
- 4.11 WCOPYSTR - COPY STRING ARRAY INTO WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCOPYSTR(id%,position%,elements%,VARPTR(array$(start%)))
-
- id% = The number of a currently opened window.
-
- position% = The string starting position (similar to
- MID$(array$(start%),position%)).
-
- elements% = The number of array elements to be copied.
-
- array$ = The string array.
-
- start% = The starting element of the string array.
-
-
-
- DESCRIPTION:
-
- Moves the contents of a string array into specified window as fast as
- possible.
-
- This function is primarily used for text editing routines and menu display.
- Array display begins at the top-left corner of the window.
- If the WWRAP mode is set to 1, any string elements larger than the window
- width will be truncated (not displayed).
-
-
-
- SEE ALSO: WCOLOR, WWRAP, WPRINT
- Page 35
-
-
- 4.12 WCSROFF - TURN OFF VISIBLE CURSOR
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCSROFF(id%)
-
- id% = The number of a currently opened window.
-
-
-
- DESCRIPTION:
-
- Turns off the physical cursor within specified window.
-
- Each window has its own physical cursor.
- WCSRON and WCSROFF turn on and off the cursor respectively.
- A physical cursor is the block which follows the text as it is being
- displayed.
-
-
-
- SEE ALSO: WCSRON, WSETCSR, WCSRPOS, WLOCATE
- Page 36
-
-
- 4.13 WCSRON - TURN ON VISIBLE CURSOR
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCSRON(id%)
-
- id% = The number of a currently opened window.
-
-
-
- DESCRIPTION:
-
- Turns on the physical cursor within specified window.
- Each window has its own physical cursor.
- WCSRON and WCSROFF turn on and off the cursor respectively.
- A physical cursor is the block which follows the text as it is being
- displayed.
-
-
- SEE ALSO: WCSROFF, WSETCSR, WCSRPOS, WLOCATE
- Page 37
-
-
- 4.14 WCSRPOS - RETURN CURSOR POSITION WITHIN WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WCSRPOS(id%,x%,y%)
-
- id% = The number of a currently opened window.
-
- x% = Column position of cursor.
-
- y% = Row position of cursor.
-
-
- DESCRIPTION:
-
- Returns the current relative cursor position within specified window.
-
- This function returns the current relative (column,row) cursor position
- into (x%,y%) respectively.
-
- The values will fall between (0,0) and (max x,max y) size of the window.
-
-
-
- SEE ALSO: WLOCATE
- Page 38
-
-
- 4.15 WDELROW - DELETE A ROW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WDELROW(id%,y%)
-
- id% = The number of a currently opened window.
-
- y% = The relative row position within the window.
-
-
-
- DESCRIPTION:
-
- Deletes a row of characters at y% and moves all subsequent rows up to y%,
- leaving last row blank.
-
- NOTE: The mouse cursor will be turned off by this command.
-
-
-
- SEE ALSO: WINSROW
- Page 39
-
-
- 4.16 WGETCH - GET A CHARACTER & ATTRIBUTE FROM WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WGETCH(id%, x%, y%, char%, attr%)
-
- id% = The number of a currently opened window.
-
- x% = The relative column position within the window.
-
- y% = The relative row position within the window.
-
-
-
- RETURNS:
-
- char% = The character at x%,y% in window id%.
-
- attr% = The attribute of char%.
-
-
-
- DESCRIPTION:
-
- WGETCH returns the character and attribute in the specified position of
- the window.
-
-
-
- SEE ALSO: WPUTCH
- Page 40
-
-
- 4.17 WHINT - SET ROW TO HIGH-INTENSITY MODE
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WHINT(id%,y%)
-
- id% = The number of a currently opened window.
-
- y% = The relative row position within the window.
-
-
-
- DESCRIPTION:
-
- Sets an entire row of characters to high-intensity.
-
- This function is useful for highlighting certain selectable menu options,
- for example. High-intensity is set regardless of the color of the characters
- in the line. If a character is already high-intensity, it is left alone.
-
-
-
- SEE ALSO: WLINT
- Page 41
-
-
- 4.18 WINPUT - GENERAL PURPOSE WINDOW INPUT
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WINPUT(id%,strinp$,relpos%,edits%,exits%,accept$, kb%,flag%)
-
- See additional pages for full calling syntax.
-
-
-
- DESCRIPTION:
-
- General purpose window input command, with many options.
-
- Inputting begins at the current window cursor position.
- Use WLOCATE to position window cursor.
-
-
-
- Cont.....
- Page 42
-
-
- WINPUT - INPUT FROM A WINDOW (continued)
- ----------------------------------------------------------------------
-
-
-
- PARAMETERS PASSED
-
-
- id% = The number of a currently opened window.
-
- strinp$ = The target string to hold input.
- Length of string determines maximum number of characters accepted.
- The target string cannot have a string length of 0.
- Initialize the string with the STRING$ function.
- ie., strinp$=STRING$(10," ")
-
- relpos% = The starting relative cursor position within string.
- The legal range is from 1 to LEN(strinp$).
-
- accept$ = Contains only the characters to be accepted during input.
- If this string contains no characters (ie. null string ""), then
- acceptance of characters is determined by clearing bits 1-4 of
- edits%.
-
-
-
- Cont.....
- Page 43
-
-
- WINPUT - INPUT FROM A WINDOW (continued)
- ----------------------------------------------------------------------
-
-
- edits% = The setting/clearing of certain bits within edits% determine
- edit options. The number in the left-most column before each
- bit assignment below is the decimal value of that bit position.
- To enable certain edit options, merely add up all the decimal
- values of the desired bits. That final sum would be edits%.
-
- Setting each of the bits below has the following effect:
-
- 1 Bit 0 - Keep contents of old strinp$ upon entering
-
- 2 Bit 1 - Do not allow letters and spaces
-
- 4 Bit 2 - Do not allow numbers
-
- 8 Bit 3 - Do not allow +-. characters
-
- 16 Bit 4 - Do not allow any characters outside those allowed by
- clearing bits 1-3. (Clearing bit 4 = allow ALL characters.)
-
- 32 Bit 5 - Convert inputted lowercase letters to upper.
-
- 64 Bit 6 - Convert inputted uppercase letters to lower.
-
- 128 Bit 7 - Beep operator if exceeding maximum number of
- characters during input
-
- 256 Bit 8 - Allow INS/DEL character editing
-
- 512 Bit 9 - Allow HOME to position cursor to beginning
- of the input line
-
- 1024 Bit 10- Allow END to position cursor at end
-
- 2048 Bit 11- Allow inserting while inputting (CNTRL-END
- toggles this mode at any time)
-
- 4096 Bit 12- Cancel all edits if exited by the defined
- exit keys (exits%)
-
- 8192 Bit 13- Normal exit when the string buffer is full
-
- 16384 Bit 14- Exit if the first mouse button is pressed
-
- Cont.....
- Page 44
-
-
- WINPUT - INPUT FROM A WINDOW (continued)
- ----------------------------------------------------------------------
-
-
-
- exits% = Setting the bits of exits% will allow unconditional keyboard
- exiting from WINPUT, setting flag% to 0.
-
-
- The bit assignments and decimal values are shown below:
-
- Weight BIT# ACTION
-
- 1 Bit 0 - Allow exit if F1 pressed
- 2 Bit 1 - Allow exit if F2 pressed
- 4 Bit 2 - Allow exit if F3 pressed
- 8 Bit 3 - Allow exit if F4 pressed
- 16 Bit 4 - Allow exit if F5 pressed
- 32 Bit 5 - Allow exit if F6 pressed
- 64 Bit 6 - Allow exit if F7 pressed
- 128 Bit 7 - Allow exit if F8 pressed
- 256 Bit 8 - Allow exit if F9 pressed
- 512 Bit 9 - Allow exit if F10 pressed
- 1024 Bit 10 - Allow exit if up-arrow pressed
- 2048 Bit 11 - Allow exit if down-arrow pressed
- 4096 Bit 12 - Allow exit if CNTRL-PGUP pressed
- 8192 Bit 13 - Allow exit if CNTRL-PGDN pressed
- 16384 Bit 14 - Allow exit if ESC pressed
-
-
-
-
- Cont.....
- Page 45
-
-
- WINPUT - INPUT FROM A WINDOW (continued)
- ----------------------------------------------------------------------
-
-
-
- RETURNS:
-
- The following values are returned by WINPUT:
-
- kb% = keyboard value if exited by pressing one of the exit keys
- (as defined by exits%).
- If flag<-1 then kb% contains the mouse XY cursor position when
- 1st mouse button is pressed. Y=INT(kb%/256):X=kb% MOD 256
-
- flag% = 1 If normal exit from WINPUT. (ie., ENTER or buffer full.)
-
- = 0 If exited by pressing one of the exit keys.
-
- =-1 If parameter error (such as window id% not open).
-
- =-2 If 1st mouse button pressed and mouse position is on window
- border (and bit 14 of edits% is set).
-
- =-3 If 1st mouse button pressed and mouse position is inside of
- window (and bit 14 of edits% is set).
-
- =-4 If 1st mouse button pressed and mouse position is outside of
- window (and bit 14 of edits% is set).
-
-
-
- SEE ALSO: WLOCATE, WPRINT
- Page 46
-
-
- 4.19 WINSROW - INSERT ROW IN WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WINSROW(id%,y%)
-
- id% = The number of a currently opened window.
-
- y% = The relative row position within the window.
-
-
-
- DESCRIPTION:
-
- Inserts a row of characters at y% and moves all subsequent rows down to
- y%+1, leaving y% row blank.
-
- NOTE: The mouse cursor is turned off by this command.
-
-
-
- SEE ALSO: WDELROW
- Page 47
-
-
- 4.20 WLINT - SET ROW TO LOW-INTENSITY MODE
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WLINT(id%,y%)
-
- id% = The number of a currently opened window.
-
- y% = The relative row position within the window.
-
-
-
- DESCRIPTION:
-
- Sets an entire row of characters to low-intensity.
-
- This function is the opposite of WHINT.
- Low-intensity is set regardless of the color of the characters in the line.
- If a character is already low-intensity, it is left alone.
-
-
-
- SEE ALSO: WHINT
- Page 48
-
-
- 4.21 WLOCATE - SET RELATIVE CURSOR POSITION IN WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WLOCATE(id%,x%,y%)
-
- id% = The number of a currently opened window.
-
- x% = The new relative column position.
-
- y% = The new relative row position.
-
-
-
- DESCRIPTION:
-
- Sets relative cursor position within specified window.
- The range of the (x%,y%) value must be within the (0,0) and (max x,max y)
- window size limits.
-
- See WOPEN for more detail.
-
-
-
- SEE ALSO: WCSRPOS, WOPEN, WPRINT
- Page 49
-
-
- 4.22 WMOUSE - GET RELATIVE MOUSE POSITION IN WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WMOUSE(id%,buttonstat%,x%,y%,flag%)
-
-
- RETURNS:
-
- buttonstat% = is mouse button press status.
- BIT0 set = left mouse button pressed.
- BIT1 set = right mouse button pressed.
- BIT2 set = middle mouse button pressed.
- NOTE: Middle button for Logitech only.
-
- x% = Current mouse position for x (column)
-
- y% = Current mouse position for y (row)
-
- flag% = The value of flag% determines the meaning of x% and y% as follows:
-
- = 0 mouse cursor within specified window borders.
- x%,y% is relative cursor location within window.
-
- = 1 mouse cursor lies on the border of specified window.
- Border position is returned as:
-
- x% = 0 for left border,
- x% = 1 for right border and
- y% is position on border.
-
- - OR -
-
- y% = 0 for top border,
- y% = 1 bottom border and
- x% is position on border.
-
- = -1 mouse cursor lies outside specified window.
- x%,y% is actual physical screen position with
- range x:0-79, y:0-23.
-
-
- DESCRIPTION:
-
- Returns current mouse position relative to selected window.
- Call this function with id% set to a current opened window.
- Page 50
-
-
- 4.23 WOPEN - OPEN A NEW WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WOPEN(x1%,y1%,x2%,y2%,style%,color%,title$, array%(),id%)
-
- x1%,y1% = The top-left corner of the window in column,row respectively.
-
- x2%,y2% = The bottom-right corner of the window in column,row respectively.
-
- style% = One of the 8 following styles:
-
- 0 - no border
- 1 - single line border
- 2 - double line border
- 3 - light shadow border
- 4 - medium shadow border
- 5 - dark shadow border
- 6 - solid border
- 7 - double line with square corners
- 8 - user definable border (see BOX8SET)
-
- color% = The foreground/background attributes of the window.
- See appendix 1 for explanation of values.
-
- title$ = The window title (top center of window).
- If you specify "", then no title is given to the window.
-
- array% = The integer array to hold the screen information beneath the window.
- The size of the array is calculated by the following formula:
-
- size = (X2%-X1%+1) * (Y2%-Y1%+1)
-
- The size should be a positive value.
- If not, then the window coordinates are improperly set.
-
-
- Cont.....
- Page 51
-
-
- WOPEN - OPEN A NEW WINDOW (continued)
- ----------------------------------------------------------------------
-
-
-
- id% = The window data slot to use. Maximum is 32 slots
- (ie 32 windows may be opened at one time). 0 is invalid for WOPEN.
- A window data slot is an internal area of memory that holds all
- pointers and data about a particular window. If a window data slot is
- already used (another window is opened under this slot) then the
- function will be cancelled.
-
-
-
- DESCRIPTION:
-
- Opens a new window and saves portion of screen under new window.
-
- The array% should be DIM'd large enough to hold the screen information.
-
- x1,x2 must fall within the range of 1 to 80.
- y1,y2 must fall within the range of 1 to 25.
-
- NOTE: The mouse cursor is turned off by this command.
-
-
-
- SEE ALSO: WCLOSE, BOX8SET
- Page 52
-
-
- 4.24 WPRINT - OUTPUT A STRING TO A WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WPRINT(id%,string)
-
- id% = The number of a currently opened window.
-
- string = A valid string variable or string expression.
-
-
-
- DESCRIPTION:
-
- Outputs a string to a specified window.
-
- A carriage return may be forced by embedding the (~) character within the
- string, rather than including the ...+CHR$(13)+... sequence.
- Example: CALL WPRINT(1,"First line~Second line")
- The (~) character is equivalent to CHR$(126).
-
- The following control codes are recognized by the WPRINT handling driver:
-
- Code Action
-
- 7 Bell
- 8 Backspace cursor
- 9 TAB stops every 8th position
- 10 CR+LF sequence
- 11 Home cursor
- 12 Clear window and home cursor
- 13 CR+LF sequence
- 126 CR+LF sequence
-
- NOTE: The mouse cursor is turned off by this command.
-
-
-
- SEE ALSO: WLOCATE, WCOLOR, WWRAP
- Page 53
-
-
- 4.25 WPUTCH - PUT A CHARACTER & ATTRIBUTE IN A WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WPUTCH(id%, x%, y%, char%, attr%)
-
- id% = The number of a currently opened window.
-
- x% = The relative column position within the window.
-
- y% = The relative row position within the window.
-
- char% = The character to put at x%, y% in window id%.
-
- attr% = The attribute of char%.
-
-
-
- DESCRIPTION:
-
- WPUTCH "puts" a single character and it's attribute into a window at a
- specified position.
-
-
-
- SEE ALSO: WGETCH
- Page 54
-
-
- 4.26 WRATTR - CHANGE ATTRIBUTE OF A ROW IN WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WRATTR(id%,row%,attribute%)
-
- id% = The number of a currently opened window.
-
- row% = The row number within the window.
- row% must be between 0 and maximum window size
-
- attribute% = The foreground/background attribute value.
-
-
- DESCRIPTION:
-
- Changes attribute of a row within a specified window.
-
- See Appendix 1 for determining attribute values.
-
-
-
- SEE ALSO: WATTR, WCATTR, WCOLOR
- Page 55
-
-
- 4.27 WREV - REVERSE ATTRIBUTES OF ENTIRE WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WREV(id%,mode%)
-
- id% = The number of a currently opened window.
-
- mode% 1 = To reverse attribute of window only.
- 0 = To reverse attribute of window including window borders.
-
-
-
- DESCRIPTION:
-
- Reverses attributes within a specified window.
- If the current window is white on blue, then after executing WREV,
- the window attribute will be blue on white.
-
- NOTE: Calling WREV does not set the attribute for all WPRINT and WCOPYSTR
- functions. WCOLOR must be used for this purpose.
-
-
-
- SEE ALSO: WREVLINE
- Page 56
-
-
- 4.28 WREVLINE - REVERSE ATTRIBUTES OF LINE IN WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WREVLINE(id%,y%)
-
- id% = The number of a currently opened window.
-
- y% = Specifies which line of characters to reverse.
-
-
-
- DESCRIPTION::
-
- Reverses foreground/background attributes for an entire line within a
- specified window.
-
- If the line is white on green, then after executing WREVLINE, the line
- attribute will be green on white.
-
- NOTE: Use of WREVLINE does not set the attribute for all WPRINT and
- WCOPYSTR functions. WCOLOR must be used for this purpose.
-
-
-
- SEE ALSO: WREV
-
- Page 57
-
-
- 4.29 WSELECT - SELECT WINDOW FOR DEFAULT OUTPUT
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WSELECT(id%)
-
- id% = The number of a currently opened window.
-
-
-
- DESCRIPTION:
-
- Selects a window for default output.
-
- Window ID of 0 is invalid for this function.
-
- Default window ID occurs when id% of other functions is set to 0.
- If DOS video device drivers are "hooked" into QuickWindows, the default
- window will be used for all DOS/BIOS display output.
- This way, you can change which window DOS/BIOS uses by merely
- executing the WSELECT function.
-
-
- Page 58
-
-
- 4.31 WTITLE - PUT A TITLE AT TOP-CENTER OF WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WTITLE(id%,style%,color%,title$)
-
- id% = The number of a currently opened window.
-
- style% = Specifies one of the 8 following styles:
-
- 0 - no border
- 1 - single line border
- 2 - double line border
- 3 - light shadow border
- 4 - medium shadow border
- 5 - dark shadow border
- 6 - solid border
- 7 - double line with square corners
- 8 - user definable border (see BOX8SET)
-
- color% = The foreground/background attributes of the window.
- See appendix 1 for explanation of values.
-
- title$ = A valid string variable or string expression.
-
-
-
- DESCRIPTION:
-
- WTITLE puts a title on a window. This function can be used to re-write or
- change the old title of a window.
-
- NOTE: The length of the new title$ must be greater or equal to the length
- of the old title.
-
-
-
- SEE ALSO: WOPEN
- Page 59
-
-
- 4.32 WVSCROLL - SCROLL WINDOW VERTICALLY UP OR DOWN
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WVSCROLL(id%,times%,direction%)
-
- id% = The number of a currently opened window.
-
- times% = The number of times to scroll.
- A value of 0 will clear the window.
-
- direction% = 0 to scroll upward.
- = 1 to scroll downward.
-
-
-
- DESCRIPTION:
-
- Scroll specified window vertically for specified number of times up or down.
-
- This function is identical to BIOS function calls 6 and 7 (INT 10H), but for
- the window specified by id%.
-
- NOTE: The mouse cursor is turned off by this command.
-
-
-
- SEE ALSO: WINSROW, WDELROW
- Page 60
-
-
- 4.33 WWRAP - TURN WORD WRAP ON/OFF IN WINDOW
- ----------------------------------------------------------------------
-
- SYNTAX:
-
- CALL WWRAP(id%,mode%)
-
-
- id% = The number of a currently opened window.
-
- mode% = 0 All text sent to a window will be "wrapped around" to the next
- line if the text exceeds the boundaries of the window.
-
- = 1 If the text exceeds the boundaries of the window, all subsequent
- text is lost until a carriage return is sent to the window. At
- this point text display resumes on the next line.
-
-
-
- DESCRIPTION:
-
- Selects mode for outputting to specified window.
-
-
-
- SEE ALSO: WPRINT, WCOPYSTR
- Page 61
-
-
-
-
- CHAPTER FIVE
-
- REFERENCE FOR MENU FUNCTIONS
-
-
-
- 5.1 HELPMENU Display Help Information
-
- 5.2 MENUBAR Define A Menubar
-
- 5.3 MENUGET Make Selection From Menu
-
- 5.4 MENUOFF Turn Off Menubar
-
- 5.5 MENUON Turn On Menubar
-
- 5.6 MENUOPTION Enable/Disable A Menu Option
-
- 5.7 MENUSET Define Pull-Down Menus
-
- 5.8 POPMENU Display A Pop-Up Menu
-
- 5.9 POPMENU1 Display A Pop-Up Menu (W/Option Attribs)
-
- 5.10 POPMENUH Display A Pop-Up Horizontal List Box
-
- 5.11 POPMENUV Display A Pop-Up Vertical List Box
-
- Page 62
-
-
- 5.1 HELPMENU - DISPLAY HELP INFORMATION
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL HELPMENU(id%,0,battr%,lines, VARPTR(menu$(start%)),flg%)
-
- id% = The number of a currently opened window.
-
- battr% = The attribute of the scroll bar at the right of the window.
-
- menu$() = A string array containing the page(s) of help
- information to be displayed. Each line in the
- help window is one element of the string array.
-
- start% = The starting position within the string array. For simplicity,
- make all arrays start at 0.
-
- lines% = The number of lines of the array to allow for display in the
- help window.
-
-
-
- RETURNS:
-
- flg% = Always returns a 0 when exiting from HELPMENU.
-
-
-
- DESCRIPTION:
-
- HELPMENU allows a currently opened window to be used as a "help window".
- The user can scroll through pages of text contained in a string array.
- HELPMENU works exactly like POPMENUV but doesn't allow the selection
- of options.
-
- Cont.....
- Page 63
-
-
- HELPMENU - DISPLAY HELP INFORMATION (continued)
- ----------------------------------------------------------------------
-
-
-
-
- KEYBOARD USE ON HELPMENU
-
-
- HOME..........Goes to the beginning of the help page.
-
- END...........Goes to the end of the help page.
-
- PGDN..........Moves to next help page.
-
- PGUP..........Moves to previous help page.
-
- ESC...........Exits the help screen.
-
-
- MOUSE USE ON HELPMENU
-
-
- PREVIOUS PAGE: Click mouse button between up arrow and
- scroll bar position marker.
-
- NEXT PAGE: Click mouse button between down arrow and
- scroll bar position marker.
-
- MOVE POINTER: The position marker in the scroll bar
- approximates the position within the help
- array. To move to another relative position,
- place mouse cursor on scroll bar position marker,
- hold left mouse button, move to desired area on
- scroll bar, and release mouse button.
-
- FIRST PAGE: Click mouse on up arrow.
-
- LAST PAGE: Click mouse on down arrow.
-
- EXIT: Move mouse cursor to the top-left corner of
- the window and press the left mouse button.
-
-
- SEE ALSO: WOPEN, WCOLOR
- Page 64
-
-
- 5.2 MENUBAR - DEFINE A MENUBAR
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MENUBAR(numb%,attr%,kb%(),VARPTR(bar$(0)))
-
- numb% = The number of menus selectable along the top.
- Up to 10 menus may be defined.
-
- attr% = The attribute of the menubar.
-
- kb() = An integer array of keyboard values that would directly select
- a menu. Each position in the array corresponds to one menu.
- There must be numb% number of keyboard values in the array.
-
- bar$() = A string array containing the names of the menus, which are
- displayed along the top. Each position in the array corresponds
- to one menu.
- There must be numb% number of menu titles in the array.
-
-
-
-
- DESCRIPTION:
-
- The MENUBAR command is the first of four necessary commands to design a
- pull-down menuing system.
-
- See sample program pulldown.bas for an example of usage.
-
-
- SEE ALSO: MENUSET, MENUOPTION, MENUGET, MENUON, MENUOFF
- Page 65
-
-
- 5.3 MENUGET - MAKE SELECTION FROM MENU
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MENUGET(menu%,opt%,flag%)
-
-
-
- RETURNS:
-
- menu% = The menu number selected.
-
- opt% = The option of the menu selected.
-
- flag% = (-1) If a selection has been made.
- = (1) If user has pressed the ESC key.
- = (0) If no activity.
-
-
-
- DESCRIPTION:
-
- Allows mouse or keyboard to make a selection from a pulldown menu.
- The last of four necessary commands to design an active pulldown menuing
- system.
-
- The MENUGET function must be called continually until a selection is made.
- It is also possible for the application program to go off and do something
- else if flag%=0, but make continual calls to the function.
-
- The MENUGET function has the following internal keyboard operation.
- Pressing one of the previously defined menu selection keys (kb array in
- menubar), will pop up a menu underneath the selected menu title.
- Then an option may be highlighted by moving the up/down arrow keys.
- Next it may be selected by pressing ENTER, or cancelled by pressing
- ESCAPE. After a selection has been made, the screen under the menu is
- restored. If a menu option has been disabled, a 0 is returned in the
- flag% variable.
-
-
- Page 66
-
-
- 5.3 MENUGET - MAKE SELECTION FROM MENU (Continued)
- ----------------------------------------------------------------------
-
-
-
-
- Selecting a menu option with a mouse is accomplished as follows.
- Place the mouse cursor on top of the desired menu title, press and hold the
- left mouse button, drag the mouse down along the menu to the option desired,
- and release the mouse button. The option will be selected and the
- menu will go away.
-
-
-
- SEE ALSO: MENUBAR, MENUSET, MENUOPTION, MENUON, MENUOFF
- Page 67
-
-
- 5.4 MENUOFF - TURN OFF MENUBAR
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MENUOFF
-
-
-
- DESCRIPTION:
-
- The MENUOFF command clears the menubar along the top and disables menu
- checking by forcing the flag% in MENUGET to always return a 0.
-
-
-
- SEE ALSO: MENUBAR, MENUSET, MENUGET, MENUON
- Page 68
-
-
- 5.5 MENUON - TURN ON MENUBAR
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MENUON
-
-
-
- DESCRIPTION:
-
- Displays the menubar and enables menu checking.
- MENUON is the third of four commands in designing an active pulldown menuing
- system. The menu bar, previously defined by MENUBAR, is displayed along the
- top row of the screen.
-
-
-
- SEE ALSO: MENUBAR, MENUSET, MENUGET, MENUOPTION, MENUOFF
- Page 69
-
-
- 5.6 MENUOPTION - ENABLE / DISABLE A MENU OPTION
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MENUOPTION(menu%,option%,flag%)
-
-
-
- DESCRIPTION:
-
- Enables or disables a menu option.
- When a menu option is enabled, it may be selected from the menu.
- If it is disabled, the flag% of MENUGET contains a 0 if it is selected.
-
- The MENUOPTION command has the following parameters:
-
- menu% = The menu number (range 1 to 10).
-
- option% = The option of the menu to modify (1 to 16).
-
- flag% = 1 to enable the option.
- = 0 to disable the option.
-
- Technically, the MENUOPTION modifies the previously defined bit mask of
- MENUSET. Thus MENUOPTION is only used to modify the option enable/disable
- status after all the menus have been defined.
-
-
-
- SEE ALSO: MENUSET, MENUGET
- Page 70
-
-
- 5.7 MENUSET - DEFINE PULL-DOWN MENUS
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MENUSET(numb%,options%,style%,battr%,cattren%, cattrdis%, bitmask%,
- VARPTR(menu$(0)))
-
- numb% = The menu number between 1 and 10.
-
- options% = The number of options for this menu (numb%).
- Up to 16 options per menu is allowed.
-
- style% = The box style for the menu window that pops down when a menu is
- selected.
- Style% has a range between 1 and 8.
- See WOPEN for a list of styles.
- Use BOX8SET to define your own style #8.
-
- battr% = The border attribute of the pull down menu window.
-
- cattren% = The character attribute when the option is enabled.
-
- cattrdis% = The character attribute when the option is disabled.
-
- bitmask% = The option enable/disable bit mask.
- Each bit 0 to 15 corresponds to options 1 to 16.
- If the bit is set (1), the option is enabled for selection.
- If the bit is cleared (0), the option is disabled.
- To enable all options, for example, bit mask would equal
- (-1) decimal.
- NOTE: This is because in QuickBASIC there cannot be an integer
- equal to 65535 dec, or 1111 1111 1111 1111 binary or FFFFH hex.
-
- menu$() = A string array containing all the option names to be displayed
- when the menu pops down. The total number of characters for all
- the options for each menu numb% cannot exceed 400. A table
- is maintained internally to Quickwindows which contains the
- option names for each menu numb%.
-
-
- Cont.....
- Page 71
-
-
- 5.7 MENUSET - DEFINE PULL-DOWN MENUS (continued)
- ----------------------------------------------------------------------
-
-
-
-
- DESCRIPTION:
-
- Defines a set of options for a specific menu.
- MENUSET is the second of four commands needed to define an active menuing
- system.
-
-
-
- SEE ALSO: MENUBAR, MENUGET, MENUON, MENUOFF, MENUOPTION, WOPEN
- Page 72
-
-
- 5.8 POPMENU - DISPLAY A POP-UP MENU
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL POPMENU(result%,kb%,style%,battr%,cattr%,x%,y%, options%,
- VARPTR(menu$(0)))
-
- The following parameters are passed upon calling POPMENU:
-
- kb% = The setting of the bits of kb% determine which keys will cause
- immediate exit from POPMENU without selection. Bits 0 to 9 correspond
- to function keys 1 to 10. Bit 10 is the left arrow key and bit 11
- is the right arrow key. The ESC key will always cause an exit
- regardless of the value of kb%.
-
- style% = The window style for the popup menu with range between 1 and 8.
- See WOPEN for styles.
-
- battr% = The window border attribute of the menu box.
-
- cattr% = The character attribute for each of the menu options within the
- menu box.
-
- x%,y% = The starting physical screen coordinates of the menu box.
- x% has range between 1 and 80, y% has range between 1 and 24.
- Naturally x% and y% must be set so that the menu box will not
- exceed limits of the screen. The height of the menu box will be
- determined by the number of options, and the width will be
- determined by the length of the longest menu option name.
-
- options% = The number of menu options. This value cannot exceed the total
- number of lines available for the menu box minus the two borders.
- Thus if the menu box starts on display row #3, then options
- cannot exceed 20.
-
- menu$() = A string array containing all of the menu option names to be
- displayed. The string with the most number of characters will
- determine the overall width of the menu box. The length of the
- string cannot exceed the number of columns available for display
- from the start of x%.
-
- Page 73
-
-
- 5.8 POPMENU - DISPLAY A POP-UP MENU (continued)
- ----------------------------------------------------------------------
-
-
-
-
- RETURNS:
-
- The following values are returned from POPMENU when exiting:
-
- result% = The option number selected, or 0 if ESC or one of the exit keys
- is pressed.
-
- kb% = The keyboard value of one of the exit keys if it is pressed.
-
-
-
- DESCRIPTION:
-
- Displays a popup menu and allows user to make a selection with the keyboard
- or mouse.
-
- KEYBOARD -
- To make a selection from the menu with the keyboard, move the up or down
- arrows to highlight an option and press ENTER. To hightlight an option
- directly, press the key corresponding to the first letter of an option.
-
- MOUSE -
- To make a selection with the mouse, position the mouse cursor over the
- option desired and press the left mouse button. Pressing ESC (or one of
- the previously defined exit keys) will exit POPMENU, setting result%=0.
-
-
-
- SEE ALSO: POPMENU1
- Page 74
-
-
- 5.9 POPMENU1 - DISPLAY A POP-UP MENU (W/OPTION ATTRIBS)
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL POPMENU1(result%,kb%,style%,battr%,cattr%(), x%,y%, options%,
- VARPTR(menu$(0)))
-
-
- Another version of POPMENU but allows each option to have its own attribute.
-
-
- DESCRIPTION:
-
- Same as POPMENU but with the following parameter difference:
-
- cattr%() = Each element of the array contains the attribute for each
- option displayed. Thus it is possible to have option #1 green,
- option #2 red, and so on.
-
-
-
- SEE ALSO: POPMENU
- Page 75
-
-
- 5.10 POPMENUH - DISPLAY A POP-UP HORIZONTAL LIST BOX
- ----------------------------------------------------------------------
-
-
-
- SYNTAX:
-
- CALL POPMENUH(id%,relpos%,width%,options%,battr%, VARPTR(menu$(0)),
- result%,flag%)
-
- The following parameters are passed:
-
- id% = A currently opened window id.
-
- relpos% = The option number to highlight upon entering POPMENUH.
- This value cannot be 0.
-
- width% = The width of one column of options. For example, all the options
- are less than 8 characters each. Set width%=10 (the extra two
- spaces make the menu list look neat).
-
- options% = The total number of menu options available.
-
- battr% = The attribute of the scroll bar at the bottom of the window.
-
- menu$() = A string array containing all the menu options available for
- selection. menu$() must contain at least options% number of
- options.
-
-
-
- RETURNS:
-
- The following parameters are passed from POPMENUH:
-
- result% = The number of the menu option selected, or 0 if ESC was pressed.
-
- flag% = 1 if a normal selection has been made.
- = 0 if ESC pressed.
-
- Cont.....
- Page 76
-
-
- 5.10 POPMENUH - DISPLAY A POP-UP HORIZONTAL LIST BOX (continued)
- ----------------------------------------------------------------------
-
-
-
-
- DESCRIPTION:
-
- Popup menu with horizontal scrolling/paging through options.
- A window must already be opened to use this function.
- The window must be wide enough to accomodate at least one column of
- options (inside window width=width%). Window width would equal the number
- of columns desired times the width%, but must not exceed the total
- width of the physical screen.
-
-
- KEYBOARD USE ON POPMENUH
-
-
- HOME..........Positions option pointer to first option.
-
- END...........Positions option pointer to last option.
-
- RIGHT ARROW...Moves pointer to next column in list.
-
- LEFT ARROW....Moves pointer to previous column in list.
-
- DOWN ARROW....Moves pointer to next option in list.
-
- UP ARROW......Moves pointer to previous option in list.
-
- PGDN..........Moves to next page of options.
-
- PGUP..........Moves to previous page of options.
-
- ENTER.........Selects an option and exits POPMENUH.
-
- ESC...........Aborts selection of option and exits POPMENUH.
- Page 77
-
-
- 5.10 POPMENUH - DISPLAY A POP-UP HORIZONTAL LIST BOX (continued)
- ----------------------------------------------------------------------
-
-
-
-
- MOUSE USE ON POPMENUH
-
-
- PREVIOUS COLUMN: Click mouse on left arrow on scroll bar to
- move option pointer to previous column.
-
- NEXT COLUMN: Click mouse on right arrow on scroll bar to
- move option pointer to next column.
-
- PREVIOUS PAGE: Click mouse between left arrow and scroll bar
- position marker to turn to previous page of options.
-
- NEXT PAGE: Click mouse between right arrow and scroll bar
- position marker to turn to next page of options.
-
- MOVE POINTER: To move option pointer to a column within option
- list, position mouse on scroll bar position marker,
- hold left mouse button, move to desired area on
- scroll bar, and release mouse button.
-
- SELECT OPTION: To select an option, move mouse cursor on top of
- desired option and press the left mouse button.
-
- EXIT: To exit without selecting an option, move
- mouse cursor to the top-left corner of the
- window and press the left mouse button.
-
-
-
- SEE ALSO: WOPEN, WCOLOR
- Page 78
-
-
- 5.11 POPMENUV - DISPLAY A POP-UP VERTICAL LIST BOX
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL POPMENUV(id%,relpos%,battr%,options%, VARPTR(menu$(0)), result%,
- flag%)
-
- The following parameters are passed:
-
- id% = A currently opened window id.
-
- relpos% = The option number to highlight upon entering POPMENUV.
- This value cannot be 0.
-
- battr% = The attribute of the scroll bar at the right of the window.
-
- options% = The total number of menu options available.
-
- menu$() = A string array containing all the menu options available for
- selection.
- menu$() must contain at least options% number of options.
-
-
-
- RETURNS:
-
- The following parameters are passed from POPMENUV:
-
- result% = The number of the menu option selected, or 0 if ESC was pressed.
-
- flag% = 1 if a normal selection has been made.
- = 0 if ESC pressed.
-
- Cont.....
- Page 79
-
-
- 5.11 POPMENUV - DISPLAY A POP-UP VERTICAL LIST BOX (continued)
- ----------------------------------------------------------------------
-
-
-
-
- DESCRIPTION:
-
- Popup menu with vertical scrolling/paging through options.
- A window must already be opened to use this function.
- The window must be wide enough to accomodate the longest option length.
-
-
- KEYBOARD USE ON POPMENUV
-
-
- HOME..........Positions option pointer to first option.
-
- END...........Positions option pointer to last option.
-
- DOWN ARROW....Moves pointer to next option in list.
-
- UP ARROW......Moves pointer to previous option in list.
-
- PGDN..........Moves to next page of options.
-
- PGUP..........Moves to previous page of options.
-
- ENTER.........Selects an option and exits POPMENUV.
-
- ESC...........Aborts selection of option and exits POPMENUV.
- Page 80
-
-
- 5.11 POPMENUV - DISPLAY A POP-UP VERTICAL LIST BOX (continued)
- ----------------------------------------------------------------------
-
-
-
-
- MOUSE USE ON POPMENUV
-
-
- FIRST PAGE: Click mouse on up arrow on scroll bar to
- move option pointer to first page.
-
- LAST PAGE: Click mouse on down arrow on scroll bar to
- move option pointer to last page.
-
- PREVIOUS PAGE: Click mouse between up arrow and scroll
- bar position marker to turn to previous
- page of options.
-
- NEXT PAGE: Click mouse between down arrow and scroll
- bar position marker to turn to next page of
- options.
-
- MOVE POINTER: To move option pointer to a column within
- option list, position mouse on scroll bar
- position marker, hold left mouse button,
- move to desired area on scroll bar, and
- release mouse button.
-
- SELECT OPTION: To select an option, move mouse cursor on
- top of desired option and press the left
- mouse button.
-
- EXIT: To exit without selecting an option, move
- mouse cursor to the top-left corner of the
- window and press the left mouse button.
-
-
-
- SEE ALSO: WOPEN, WCOLOR
- Page 81
-
-
-
-
- CHAPTER SIX
-
- REFERENCE FOR SCREEN HANDLING FUNCTIONS
-
-
- 6.1 ATTRSCRN Set The Screen Attributes
-
- 6.2 BOX Draw A Box On The Screen
-
- 6.3 BOX8SET Define A Box Style
-
- 6.4 DMASCRN Enable/Disable Video Retrace Wait (Snow)
-
- 6.5 GETCH Get A Character & Attribute From Screen
-
- 6.6 GETSCRN Store A Portion Of The Screen Into An Array
-
- 6.7 PUTCH Put A Character & Attribute On The Screen
-
- 6.8 PUTSCRN Restore A Portion Of Screen From An Array
-
- 6.9 REVSCRN Reverse Foreground/Background Attributes
-
- 6.10 VSCROLL Scroll Portion Of Screen Vertically
- Page 82
-
-
- 6.1 ATTRSCRN - CHANGE THE ATTRIBUTES OF THE SCREEN
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL ATTRSCRN(x1%,y1%,x2%,y2%,attribute%)
-
- x1%,y1% = The top-left coordinates of the box relative to the start of
- the screen at (1,1).
-
- x2%,y2% = The bottom-right coordinates of the box relative to the start
- of the screen at (1,1). x2,y2 must not exceed the maximum size
- of the screen (80,24).
-
- attribute% = The new foreground/background attribute value.
-
-
-
- DESCRIPTION:
-
- Changes the screen attribute for the specified area on the screen.
-
- See Appendix 1 for determining attribute values.
- Page 83
-
-
- 6.2 BOX - DRAW A BOX ON THE SCREEN
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL BOX(x1%,y1%,x2%,y2%,style%,color%,title$)
-
- x1%,y1% = The top-left coordinates of the box relative to the start of the
- screen (1,1).
-
- x2%,y2% = The bottom-right coordinates of the box relative to the start of
- the screen at (1,1). x2,y2 must not exceed the maximum size of
- the screen (80,24).
-
- style% = The box style. Can be one of the following:
-
- BOX STYLES
-
- 0 - no border
- 1 - single line border
- 2 - double line border
- 3 - light shadow border
- 4 - medium shadow border
- 5 - dark shadow border
- 6 - solid border
- 7 - double line with square corners
- 8 - user definable border (see BOX8SET)
-
-
- color% = The foreground/background attribute value.
- See Appendix 1 for attribute/color values.
-
- title$ = Specifies which title to give the box.
- If you specify "", then no title is given to the box.
-
-
-
- DESCRIPTION:
-
- BOX makes a box on the screen.
-
- The x1,y1,x2,y2 coordinates are relative to the top-left corner of the
- screen (1,1).
- Page 84
-
-
- 6.3 BOX8SET - DEFINE A BOX STYLE
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL BOX8SET(TL,TR,TA,BL,BR,BA,SIDES,LTITLE,RTITLE,0,0,0)
-
- TL = Top left border character.
-
- TR = Top right border character.
-
- TA = Top horizontal (across) border character.
-
- BL = Bottom left border character.
-
- BR = Bottom right border character.
-
- BA = Bottom horizontal (across) border character.
-
- SIDES = Side border character.
-
- LTITLE = Character used on left of title.
-
- RTITLE = Character used on right of title.
-
- 0 = Not used in this version of QW, but must be included.
-
- 0 = Not used in this version of QW, but must be included.
-
- 0 = Not used in this version of QW, but must be included.
-
-
-
- DESCRIPTION:
-
- BOX8SET lets you design a box style of your own.
- The box that you have designed may be used by any QuickWindows function
- which has a box style parameter.
-
- NOTE: You must call this function at least once before using any functions
- that utilize the eighth box type.
- Page 85
-
-
- 6.4 DMASCRN - ENABLE/DISABLE VIDEO RETRACE WAIT (SNOW)
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL DMASCRN(mode%)
-
- mode% = 0 All video reads/writes will wait for beginning of the retrace.
- This provides for a "snow-free" display on CGA cards, with a
- small loss in speed.
-
- = 1 All video reads/writes will be done immediately. There may be
- some "snow" on the display with CGA cards while the actual
- reads/writes are performed.
-
-
-
- DESCRIPTION:
-
- Calling DMASCRN determines whether video accesses (done by QuickWindows)
- will be done immediately or will wait for the beginning of the retrace
- period.
-
- DMASCRN defaults to a mode 0 when starting QuickWindows.
- Page 86
-
-
- 6.5 GETCH - GET A CHARACTER & ATTRIBUTE FROM SCREEN
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL GETCH(row%,col%,char%,attr%)
-
- row% = The absolute row number on the screen.
- row% must be between 1 and 24.
-
- col% = The absolute column number on the screen.
- col% must be between 1 and 80.
-
-
-
- RETURNS:
-
- char% = The character at (row%,col%)
-
- attr% = The attribute of (char%).
-
-
-
- DESCRIPTION:
-
- GETCH gets a character and its attribute from a designated position in
- the window.
-
-
-
- SEE ALSO: PUTCH
- Page 87
-
-
- 6.6 GETSCRN - STORE A PORTION OF THE SCREEN INTO AN ARRAY
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL GETSCRN(x1%,y1%,x2%,y2%, array%())
-
- x1%,y1% = The top-left coordinates of the portion of the screen to be saved.
-
- x2%,y2% = The bottom-right coordinates of the portion of the screen to be
- saved.
-
- array% = The integer array to hold the screen information.
-
-
-
-
- DESCRIPTION:
-
- GETSCRN saves a portion (or all) of the screen into an integer array.
-
- The size of the array is calculated by the following formula:
- size% = (x2%-x1%+1) * (y2%-y1%+1)
-
- The size should be a positive value.
- If not, then the window coordinates are improperly set.
-
-
-
- SEE ALSO: PUTSCRN
- Page 88
-
-
- 6.7 PUTCH - PUT A CHARACTER & ATTRIBUTE ON THE SCREEN
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL PUTCH(row%,col%,char%,attr%)
-
- row% = The absolute row number on the screen.
- row% must be between 1 and 24.
-
- col% = The absolute column number on the screen.
- col% must be between 1 and 80.
-
- char% = The character to put at (row%,col%)
-
- attr% = The attribute of char%.
-
-
-
- DESCRIPTION:
-
- PUTCH "puts" a single character and its attribute onto the screen at a
- specified position.
-
-
-
- SEE ALSO: GETCH
- Page 89
-
-
- 6.8 PUTSCRN - RESTORE A PORTION OF SCREEN FROM AN ARRAY
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL PUTSCRN(x1%,y1%,x2%,y2%,array%())
-
- x1%,y1% = The top-left coordinates of the portion of the screen to be
- restored.
-
- x2%,y2% = The bottom-right coordinates of the portion of the screen to be
- restored.
-
- array% = The integer array that holds the screen information.
-
-
-
-
- DESCRIPTION:
-
- PUTSCRN restores a portion (or all) of the screen from an integer array.
-
- The size of the array is calculated by the following formula:
- size% = (x2%-x1%+1) * (y2%-y1%+1)
-
- The size should be a positive value.
- If not, then the window coordinates are improperly set.
-
- NOTE: By using GETSCRN and PUTSCRN, it is possible to move screen contents
- from one position to another.
-
-
-
- SEE ALSO: GETSCRN
- Page 90
-
-
- 6.9 REVSCRN - REVERSE FOREGROUND/BACKGROUND ATTRIBUTES
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL REVSCRN(x1%,y1%,x2%,y2%)
-
- x1%,y1% = The top-left coordinates of the portion of the
- screen to be reversed.
-
- x2%,y2% = The bottom-right coordinates of the portion of
- the screen to be reversed.
-
-
-
- DESCRIPTION:
-
- REVSCRN reverses the foreground and background attributes for all the
- characters within a specified portion of the screen.
-
- Example, if the attributes are blue on white, then upon executing
- REVSCRN, the attributes will be switched to white on blue.
- Page 91
-
-
- 6.10 VSCROLL - SCROLL PORTION OF SCREEN VERTICALLY
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL VSCROLL(x1%,y1%,x2%,y2%,times%,attr%,direction%)
-
- x1%,y1% = The top-left coordinates of the portion of the screen to be
- scrolled.
-
- x2%,y2% = The bottom-right coordinates of the portion of the screen to be
- scrolled.
-
- times% = The number of times to scroll.
- A value of 0 will clear the portion of the screen.
-
- attr% = The attribute of the lines inserted as the screen area is scrolled.
-
- direction% = 0 to scroll upward.
- = 1 to scroll downward.
-
-
-
- DESCRIPTION:
-
- Scroll specified area vertically for specified number of times up or down,
- and replace lines with blank lines of a specified attribute.
-
- This function is identical to BIOS function calls 6 and 7 (INT 10H).
- Page 92
-
-
-
- CHAPTER SEVEN
-
- REFERENCE FOR MOUSE FUNCTIONS
-
-
- 7.1 MBPRESS Get Button Pressed Status
-
- 7.2 MBREL Get Button Released Status
-
- 7.3 MHIDE Turn Off The Mouse Cursor
-
- 7.4 MINIT Initialize The Mouse
-
- 7.5 MOUSE Get Mouse Position & Button Status
-
- 7.6 MPENOFF Turn Off Light Pen Emulation Mode
-
- 7.7 MPENON Turn On Light Pen Emulation Mode
-
- 7.8 MRATIO Set Mouse Step Ratio
-
- 7.9 MSETPOS Set The Mouse Cursor Position
-
- 7.10 MSETX Set The Min & Max (X axis) Coordinates
-
- 7.11 MSETY Set The Min & Max (Y axis) Coordinates
-
- 7.12 MSHOW Turn On The Mouse Cursor
- Page 93
-
-
- 7.1 MBPRESS - GET BUTTON PRESSED STATUS
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MBPRESS(status%,number%,x%,y%)
-
- status% = The button to check for, represented by bits:
-
- Bit 0 = Set if checking for left button.
- Bit 1 = Set if checking for right button.
- Bit 2 = Set if checking for middle button.
- (Logitech only)
-
-
-
- RETURNS:
-
- status% = Button pressed status.
- Bit(s) are set if button(s) checked for is pressed.
-
- number% = A count of the number of button presses made since the last
- call to this function.
-
- x%,y% = Position of mouse cursor (column,row) the last time the button
- was pressed.
-
- x% range = (0-639), y% range = (0-191)
-
-
-
- DESCRIPTION:
-
- MBPRESS returns the button pressed status since last call to this function.
- This function is the opposite of MBREL.
-
- The value returned for x% and y% are for GRAPHIC modes.
-
- For TEXT modes, the values are evenly divisible by 8.
- So, to find out where the mouse is on a text screen:
-
- column = INT(x%/8) and row = INT(y%/8)
-
-
-
- SEE ALSO: MOUSE, MBREL
- Page 94
-
-
- 7.2 MBREL - GET BUTTON RELEASED STATUS
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MBREL(status%,number%,x%,y%)
-
- status% = The button to check for, represented by bits:
-
- Bit 0 = Set if checking for left button.
- Bit 1 = Set if checking for right button.
- Bit 2 = Set if checking for middle button.
- (Logitech only)
-
-
-
- RETURNS:
-
- status% = Button pressed status.
- Bit(s) are set if button(s) checked for is pressed.
-
- number% = A count of the number of button releases made since the last call
- to this function.
-
- x%,y% = Position of mouse cursor (column,row) the last time the button
- was released.
-
- x% range = (0-639), y% range = (0-191)
-
-
-
- DESCRIPTION:
-
- MBREL returns the button release status since last call to this function.
- This function is the opposite of MBPRESS.
-
- The value returned for x% and y% are for GRAPHIC modes.
-
- For TEXT modes, the values are evenly divisible by 8.
- So, to find out where the mouse is on a text screen:
-
- column = INT(x%/8) and row = INT(y%/8)
-
-
-
- SEE ALSO: MOUSE, MBPRESS
- Page 95
-
-
-
- 7.3 MHIDE - TURN OFF THE MOUSE CURSOR
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MHIDE
-
-
-
- RETURNS:
-
- NOTHING
-
-
-
- DESCRIPTION:
-
- MHIDE turns off the mouse cursor, making it invisible.
- The mouse driver still tracks the position of the mouse, even though it
- has been turned off.
- MHIDE requires no parameters.
-
- IMPORTANT: The mouse cursor should be turned off anytime characters are
- written to the video display. Otherwise, the mouse driver would restore the
- old character under the mouse cursor when the cursor is moved.
-
-
-
- SEE ALSO: MSHOW
- Page 96
-
-
- 7.4 MINIT - INITIALIZE THE MOUSE
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MINIT(status%,buttons%)
-
-
-
- RETURNS:
-
- status% = -1 if the mouse is installed.
- = 0 if the mouse is not installed.
-
- buttons% = The number of buttons on the mouse.
- If there is no mouse installed, this value will always be 0.
-
-
-
- DESCRIPTION:
-
- MINIT performs a combined function of verifying that a mouse is installed,
- and initializing the mouse software in QuickWindows.
-
- You should ALWAYS initialize the mouse every time you run your application
- program, because calling MINIT sets up internal variables in QuickWindows.
-
- In order to utilize the mouse functions of QuickWindows, a mouse driver
- must be installed. See the instruction manual included with your mouse
- for instructions on installing the driver.
-
- Both the Microsoft and Logitech drivers have been tested and work
- properly with QuickWindows.
- Page 97
-
-
- 7.5 MOUSE - GET MOUSE POSITION & BUTTON STATUS
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MOUSE(button%,x%,y%)
-
-
-
- RETURNS:
-
- button% (bit 0) = Set if left button pressed.
- (bit 1) = Set if right button pressed.
- (bit 2) = Set if middle button pressed (Logitech).
-
- x% = Current column mouse cursor in (0 to 639).
-
- y% = Current row mouse cursor in (0 to 192).
-
-
-
- DESCRIPTION:
-
- MOUSE returns the present mouse position and button status.
-
- The values returned for x% and y% are for GRAPHIC modes.
- For TEXT modes, the values are evenly divisible by 8.
- So, to find out where the mouse is on a text screen:
-
- Column = INT(x%/8) and row = INT(y%/8)
-
-
-
- SEE ALSO: WMOUSE, MSETPOS, MBPRESS, MBREL
- Page 98
-
-
- 7.6 MPENOFF - TURN OFF LIGHT PEN EMULATION MODE
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MPENOFF(x%,y%)
-
- x% = The new mouse cursor column position (range 0 to 639).
-
- y% = The new mouse cursor row position (range 0 to 191).
-
-
-
- DESCRIPTION:
-
- MPENOFF turns off the light pen emulation mode of the mouse driver.
-
-
-
- SEE ALSO: MPENON
- Page 99
-
-
- 7.7 MPENON - TURN ON LIGHT PEN EMULATION MODE
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MPENON
-
-
-
- DESCRIPTION:
-
- MPENON turns on the light pen emulation mode of the mouse driver.
- By doing this, the PEN functions in QuickBASIC will work under with the
- mouse, although a little differently. Instead of registering "pen" positions
- all the time as with the MOUSE function, the PEN function will only
- return the current mouse position when any one of the mouse buttons
- are pressed.
-
-
-
- SEE ALSO: MPENOFF
- Page 100
-
-
- 7.8 MRATIO - SET MOUSE STEP RATIO
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MRATIO(xstep%,ystep%)
-
- xstep% = Sets the vertical mouse movement - pixel ratio.
-
- ystep% = Sets the horizontal mouse movement - pixel ratio.
-
-
-
- DESCRIPTION:
-
- MRATIO sets the amount of physical mouse movement necessary to move the mouse
- cursor eight pixels on the display.
- In effect, this sets the "sensitivity" of the mouse.
- The ratio is stated as number of "counts" to physically move the mouse
- versus the mouse cursor moving eight pixels on the screen.
-
- NOTE: Both xstep% and ystep% have range of 1 to 32767.
-
- xstep default = 16 "counts" = move 8 pixels.
- ystep default = 8 "counts" = move 8 pixels.
- Page 101
-
-
- 7.9 MSETPOS - SET THE MOUSE CURSOR POSITION
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MSETPOS(x%,y%)
-
- x% = The new column position (range 0 to 639).
-
- y% = The new row position (range 0 to 191).
-
-
-
- DESCRIPTION:
-
- MSETPOS sets the mouse cursor to a new position.
-
- For GRAPHIC modes, the values may be in increments of 1.
- For TEXT modes, the values must be in increments of 8.
- So, to set the mouse to location (5,10) on the text screen, the values
- would be: x% = (5-1) * 8
- y% = (10-1) * 8
-
-
-
- SEE ALSO: WMOUSE, MOUSE, MBPRESS, MBREL
- Page 102
-
-
- 7.10 MSETX - SET THE MIN & MAX (X axis) COORDINATES
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MSETX(min%,max%)
-
-
- min% = The minimum x-position (range 0 to 639).
-
- max% = The maximum x-position (range 0 to 639).
-
-
-
- DESCRIPTION:
-
- Sets the minimum and maximum x-positions on the screen for the mouse cursor.
-
- NOTE: max% must be greater than min%.
-
- All mouse cursor movement is restricted to this area. Any attempt to move
- cursor outside these boundaries will just keep the cursor on the boundary.
-
- For GRAPHIC modes, the values may be in increments of 1.
-
- For TEXT modes, the values must be in increments of 8.
-
-
-
- SEE ALSO: MSETPOS
- Page 103
-
-
- 7.11 MSETY - SET THE MIN & MAX (Y axis) COORDINATES
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MSETY(min%,max%)
-
-
- min% = The minimum y-position (range 0 to 191).
-
- max% = The maximum y-position (range 0 to 191).
-
-
-
- DESCRIPTION:
-
- Sets the minimum and maximum y-positions on the screen for the mouse cursor.
-
- All mouse cursor movement is restricted to this area. Any attempt to move
- cursor outside these boundaries will just keep the cursor on the boundary.
-
- NOTE: max% must be greater than min%.
-
- For GRAPHIC modes, the values may be in increments of 1.
-
- For TEXT modes, the values must be in increments of 8.
-
-
-
- SEE ALSO: MSETPOS
- Page 104
-
-
- 7.12 MSHOW - TURN ON THE MOUSE CURSOR
- ----------------------------------------------------------------------
-
-
-
-
- SYNTAX:
-
- CALL MSHOW
-
-
-
- RETURNS:
-
- NOTHING
-
-
-
- DESCRIPTION:
-
- MSHOW turns on the mouse cursor on the display, making it visible.
- MSHOW requires no parameters and returns nothing.
- The mouse cursor tracks the motion of the mouse, changing position as the
- mouse changes position. Even if the mouse cursor is turned off, the
- mouse driver still tracks the motion of the mouse.
-
-
-
- SEE ALSO: MHIDE
- Page 105
-
-
-
- Appendix 1 Screen Attributes
- ---------------------------------------------------------------------------
-
-
- The following table shows the attributes for both the color and monochrome
- display adapters. To get the attribute value, combine the first hex value
- for the background attribute with the 2nd hex value for the foreground
- attribute. Precede this 2-digit hex value with "&H" in your BASIC
- programs. For example the value for RED foreground on WHITE
- background would be &H74.
-
-
- Monochrome
-
- Hex Value Background Foreground
-
- 0 Off Off
- 1 On Underlined
- 2 On On
- 3 On On
- 4 On On
- 5 On On
- 6 On On
- 7 On On
- 8 Off Off
- 9 Blink Intense Underlined
- A Blink Intense
- B Blink Intense
- C Blink Intense
- D Blink Intense
- E Blink Intense
- F Blink Intense
-
- Color
-
- Hex Value Background Foreground
-
- 0 Black Black
- 1 Blue Blue
- 2 Green Green
- 3 Cyan Cyan
- 4 Red Red
- 5 Magenta Magenta
- 6 Brown Brown
- 7 White White
- 8 Black-Blink Gray
- 9 Blue-Blink Light Blue
- A Green-Blink Light Green
- B Cyan-Blink Light Cyan
- C Red-Blink Light Red
- D Magenta-Blink Light Magenta
- E Brown-Blink Yellow
- F White-Blink Bright White
- Page 106
-
-
-
- Appendix 2 Keyboard Scan Codes
- ---------------------------------------------------------------------------
-
-
- The following table lists the scan codes for the most useful keys used in
- programming. These values can be obtained through the use of the INKEY$
- function:
- DO
- a$=INKEY$
- WHILE a$ = ""
- a$=a$+CHR$(0)
- kbval=CVI(a$)
-
-
- Key Value CNTRL+key ALT+key SHIFT+key
-
- F1 15104 24064 26624 21504
- F2 15360 24320 26880 21760
- F3 15616 24576 27136 22016
- F4 15872 24832 27392 22272
- F5 16128 25088 27648 22528
- F6 16384 25344 27904 22784
- F7 16640 25600 28160 23040
- F8 16896 25856 28416 23296
- F9 17152 26112 28672 23552
- F10 17408 26368 28928 23808
-
- Ins 20992 - - -
- Del 21248 - - -
- Home 18176 30464 - -
- End 20224 29952 - -
- PgUp 18688 -31744 - -
- PgDn 20736 30208 - -
- s 19200 29440 - -
- a 20480 - - -
- w 19712 29696 - -
- q 18432 - - -
-
-
-
-
-
-