home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / tools / codeit / ci.doc next >
Text File  |  1992-05-27  |  110KB  |  2,965 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                             CODE-IT Menus & Windows
  13.  
  14.            Copyright■ 1991-1992, Clear Software. All Rights Reserved
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.       Clear Software  14962 Bear Valley Rd. Ste. G, Victorville Ca. 92392
  50.                Telephone (619)243-4749        FAX (619)241-3256
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.                                   WARRANTIES
  59.  
  60. This software is provided as-is. There are no warranties, expressed or 
  61. implied.                    
  62. CLEAR SOFTWARE DISCLAIMS ALL WARRANTIES RELATING TO THIS SOFTWARE, WHETHER 
  63. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF 
  64. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND ALL SUCH WARRANTIES 
  65. ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. NEITHER CLEAR SOFTWARE NOR ANYONE 
  66. ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR DELIVERY OF THIS 
  67. SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL 
  68. DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE SUCH SOFTWARE EVEN IF CLEAR 
  69. SOFTWARE AS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO 
  70. EVENT SHALL CLEAR SOFTWARE's LIABILITY FOR ANY DAMAGES EVER EXCEED THE PRICE 
  71. PAID FOR THE  LICENSE TO USE THE SOFTWARE, REGARDLESS OF THE FORM OF CLAIM. 
  72. THE PERSON USING THE SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE 
  73. OF THE SOFTWARE. Some states do not allow the exclusion of the limit of 
  74. liability for consequential or incidental damages, so the above limitation may 
  75. not apply to you.
  76.  
  77. This agreement shall be governed by the laws of the State of California and 
  78. shall inure to the benefit of Clear Software and any successors, 
  79. administrators, heirs and assigns. Any action or proceeding brought by either 
  80. party against the other arising out of or related to this agreement shall be 
  81. brought only in a STATE or FEDERAL COURT of competent jurisdiction located in 
  82. San Bernadino County, California. The parties hereby consent to in personam 
  83. jurisdiction of said courts.
  84.  
  85. This software and the disk(s) in which it is contained are licensed to you, 
  86. for your own use. This is copyrighted software. You are not obtaining title to 
  87. the software or any copyright rights. You may not sublicense, rent, lease, 
  88. convey, modify, translate, convert to another programming language, decompile, 
  89. or disassemble the software for any purpose. 
  90.  
  91. You may use this software on more than one computer, provided there is no 
  92. chance it will be used simultaneously on more than one computer. If you need 
  93. to use this software on more than one computer simultaneously, a multi site 
  94. license must be obtained from Clear Software.
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101. Clear Software grants permission for this program disk(s) to be copied and 
  102. distributed, if no fee is charged. UNDER NO CIRCUMSTANCES MAY THIS SOFTWARE BE 
  103. DISTRIBUTED IF A FEE OF ANY KIND, INCLUDING FEES TO COVER SHIPPING, HANDLING 
  104. AND DUPLICATING COSTS IS CHARGED, WITHOUT PRIOR WRITTEN PERMISSION FROM CLEAR 
  105. SOFTWARE. This software may not be distributed via electronic information 
  106. services or BBSs with express written permission from Clear Software. 
  107.  
  108. If written permission to distribute this program and or files has been 
  109. obtained from Clear Software, the maximum amount which can be charged is 
  110. $10.00. 
  111.  
  112. If you use this software for more than 90 days you are required to purchase a 
  113. registered copy from Clear Software.
  114.  
  115.  
  116.                          MULTI SITE LICENSE AGREEMENT
  117.  
  118. If you would like to use this software on more than one computer a site 
  119. license is required. A site license is also required to use this software on a 
  120. network. A site license allows you to copy and use this software within your 
  121. organization on as many computers as you have contracted for. An unlimited 
  122. site license allows unlimited copying of the software for internal use only. 
  123. This is copyrighted software and any distribution or reselling of the software 
  124. to third parties is prohibited. Use the MULTI SITE LICENSE AGREEMENT form, 
  125. printed in this manual (also included in the REGFORM.DOC file included with 
  126. the CITOOLS disk(s)), for registering multi site software.The MULTI SITE 
  127. LICENSE AGREEMENT is a perpetual license for the use of the software within 
  128. your organization, and is not transferable. 
  129.  
  130. The MULTI SITE LICENSE AGREEMENT is distinct from shareware use. It does not 
  131. authorize the continued use of shareware. If, in addition to the software used 
  132. under this license, shareware is in use, that shareware must be registered 
  133. with Clear Software. In addition Clear Software will provide technical support 
  134. for one year from the date of this agreement to one person, designated as the 
  135. key contact within your company or organization. 
  136.  
  137. Clear Software warrants that it is the sole owner of the software and has full 
  138. power and authority to grant the site license without the consent of any other 
  139. party.
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.                               SYSTEM REQUIREMENTS
  147.  
  148. IBM XT, AT, PS2 or compatible computer running DOS 2.1 or higher. The CODE-IT 
  149. tool box set is designed to work with Microsoft■ QuickBASIC 4.5 and BASIC PDS 
  150. 7.x software on MS-DOS operating systems 2.1 and higher.
  151.  
  152. Optional equipment include a Microsoft■ or 100% compatible mouse and a color 
  153. monitor.
  154.  
  155.                         MISC. COPYRIGHTS AND TRADEMARKS
  156.  
  157. All Clear Software products are trademarks or registered trademarks of Clear 
  158. Software. All other brand and product names are registered trademarks of their 
  159. respective companies.
  160.  
  161.                            REGISTERING THIS SOFTWARE
  162.  
  163. Clear Software distributes this software through shareware marketing, giving 
  164. you the user a chance to try the software before you buy it. If you use the 
  165. software for more than 90 days, or you wish to sell a program developed with 
  166. the CODE-IT tool box, you are required to purchase a registered version from 
  167. Clear Software. The cost to register is $59.00 for either the QuickBASIC or 
  168. BASIC PDS versions, or $79.00 to register both at the same time. There are 
  169. several benefits of becoming a registered user such as:
  170.  
  171.       ∙     A printed programmers referance manual.
  172.       ∙     The most recent version of the program.
  173.       ∙     1 year free tech support
  174.       ∙     Additional 90 day money back guarantee. If your not completely 
  175.             satisfied with the Registered version of the CODE-IT Tool Box Set, 
  176.             return it to us within 90 days and we'll refund the purchase price.
  177.  
  178. The above guarantee applies to registered versions only.
  179.  
  180. To become a registered user, fill out the REGISTRATION FORM from the 
  181. REGFORM.DOC file included with the CITOOLS disk(s) set and send it in to Clear 
  182. Software with a check or money order for $59.00 (California resedents add 
  183. sales tax on the registration form).
  184.  
  185. If you have any questions about this agreement or our products please call or 
  186. write us. Our hours are Monday - Friday 9 to 5 pacific time. Our answering 
  187. service and FAX is on all the time. 
  188.  
  189.  
  190.  
  191.                      Copyright■ 1991-1992, Clear Software 
  192.                              All Rights Reserved.
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.           Copyright■ 1991-1992, Clear Software. All Rights Reserved.
  200.                     Printed in the United States of America
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207. About CODE-IT...........................................................Page 1
  208.  
  209. Getting Started.........................................................Page 3
  210.       Installation......................................................Page 3
  211.       Creating Libraries................................................Page 4
  212.       Using Libraries...................................................Page 6
  213.       INCLUDE Files.....................................................Page 6
  214.       Demo Programs.....................................................Page 7
  215.  
  216. CITOOLS.LIB.............................................................Page 9
  217.       AdapterSet FUNCTION...............................................Page 9
  218.       AdapterType FUNCTION..............................................Page 9
  219.       AltConvert FUNCTION...............................................Page 9
  220.       AttrChange SUB...................................................Page 10
  221.       DrawBox SUB......................................................Page 10
  222.       ScreenPaint SUB..................................................Page 11
  223.       ScreenRestore SUB................................................Page 11
  224.       ScreenSave SUB...................................................Page 12
  225.       ScrollArea SUB...................................................Page 12
  226.       ShiftStateNow FUNCTION...........................................Page 13
  227.       WindowPut SUB....................................................Page 14
  228.  
  229. CIMOUSE.LIB............................................................Page 15
  230.       MouseDriver SUB..................................................Page 15
  231.       MouseHide SUB....................................................Page 15
  232.       MouseInit SUB....................................................Page 15
  233.       MouseLimit SUB...................................................Page 16
  234.       MousePoll SUB....................................................Page 16
  235.       MouseShow SUB....................................................Page 17
  236.  
  237. CIMENU1.LIB............................................................Page 18
  238.       PullDownActive SUB...............................................Page 18
  239.       PullDownColors SUB...............................................Page 18
  240.       PullDownDefine SUB...............................................Page 19
  241.       PullDownDescript SUB.............................................Page 20
  242.       PullDownDescriptArea SUB.........................................Page 20
  243.       PullDownInfo FUNCTION............................................Page 21
  244.       PullDownPaint SUB................................................Page 21
  245.       PullDownPoll FUNCTION............................................Page 22
  246.       PullDownSoundSet SUB.............................................Page 22
  247.       PullDownStateSet SUB.............................................Page 22
  248.       PullDownTitleDescript SUB........................................Page 23
  249.       PullDownTitleOn SUB..............................................Page 23
  250.  
  251. CIMENU2.LIB............................................................Page 24
  252.  
  253.  
  254.  
  255.  
  256.  
  257.       PopUpActive FUNCTION.............................................Page 24
  258.       PopUpChoiceDescript SUB..........................................Page 25
  259.       PopUpColors SUB..................................................Page 25
  260.       PopUpDefine SUB..................................................Page 26
  261.       PopUpDescriptArea SUB............................................Page 26
  262.       PopUpExitKeySet SUB..............................................Page 27
  263.       PopUpGetItem FUNCTION............................................Page 27
  264.       PopUpPaint SUB...................................................Page 28
  265.       PopUpPlace SUB...................................................Page 28
  266.       PopUpReset SUB...................................................Page 28
  267.       PopUpSoundSet SUB................................................Page 29
  268.       PopUpStateSet SUB................................................Page 29
  269.  
  270. CIMENU3.LIB............................................................Page 30
  271.       PopColors SUB....................................................Page 30
  272.       PopDescript SUB..................................................Page 31
  273.       PopExitKeySet SUB................................................Page 32
  274.       PopMenu FUNCTION.................................................Page 32
  275.       PopPaint SUB.....................................................Page 33
  276.       PopReset SUB.....................................................Page 33
  277.  
  278. CIMENU4.LIB............................................................Page 34
  279.       RingActive FUNCTION..............................................Page 34
  280.       RingColors SUB...................................................Page 35
  281.       RingDefine SUB...................................................Page 35
  282.       RingDescript SUB.................................................Page 36
  283.       RingOn SUB.......................................................Page 36
  284.       RingSound SUB....................................................Page 37
  285.  
  286. CIWIND1.LIB............................................................Page 38
  287.       ButtonDefine SUB.................................................Page 38
  288.       ButtonGet FUNCTION...............................................Page 39
  289.       ButtonReset SUB..................................................Page 40
  290.       ButtonStateSet SUB...............................................Page 40
  291.       ButtonToggle SUB.................................................Page 40
  292.       EditFieldColors SUB..............................................Page 40
  293.       EditFieldDefine SUB..............................................Page 41
  294.       EditFieldGet FUNCTION............................................Page 42
  295.       WindowActive SUB.................................................Page 43
  296.       WindowColors SUB.................................................Page 43
  297.       WindowDefine SUB.................................................Page 44
  298.       WindowDrawBox SUB................................................Page 45
  299.       WindowDrawLine SUB...............................................Page 45
  300.       WindowEvent FUNCTION.............................................Page 46
  301.       WindowOff SUB....................................................Page 47
  302.       WindowOn SUB.....................................................Page 47
  303.  
  304.  
  305.  
  306.  
  307.  
  308.       WindowPaint SUB..................................................Page 47
  309.       WindowPrint SUB..................................................Page 47
  310.       WindowSoundSet SUB...............................................Page 48
  311.       WindowToPull SUB.................................................Page 48
  312.  
  313. CIWIND2.LIB............................................................Page 49
  314.       AlertWindow FUNCTION.............................................Page 49
  315.       ScrollWindow FUNCTION............................................Page 50
  316.       TagWindow FUNCTION...............................................Page 51
  317.       TextWindow SUB...................................................Page 52
  318. Page 1
  319.  
  320.  
  321.  
  322.  
  323.  
  324. About CODE-IT
  325.  
  326. CODE-IT Menus & Windows 2.1 is a flexible user interface library set for use 
  327. with the Microsoft■ BASIC language. The libraries work with QuickBASIC 4.5 and 
  328. BASIC PDS 7.x and above.
  329.  
  330. CODE-IT 2.1 includes a combined library (CIALL.LIB and QLB) as well as 
  331. separate library modules for building menus and windows. Menus can be pull 
  332. down menus, pop up menus held in memory, stand alone pop up menus, even ring 
  333. or vertical menus. Windows can have text, boxes, lines, edit fields with 
  334. controlled keyboard input and output, and several types of buttons. All the 
  335. menus and windows have complete mouse support built in. There's even a 
  336. separate mouse routine library included for developing your own mouse 
  337. supported programs.
  338.  
  339. Also included is a library of specialty windows. Windows like auto sized text 
  340. windows, scrolling windows, tag windows, and alert windows are complete and 
  341. ready to use. A multi purpose library included with the set features screen 
  342. saving and restoring, box and background drawing, video hardware detection and 
  343. more.
  344.  
  345. You can use the combined libraries for building your programs or the separate 
  346. libraries can be mixed and matched in just about any way to create your own 
  347. custom libraries. Since the compiler will only pull in the code from the 
  348. library which your program needs, the size of your programs will be the same 
  349. either way.
  350.  
  351. No royalty fees are charged for programs developed with the registered version 
  352. of the CODE-IT Menus & Windows.
  353.  
  354. The CODE-IT tool box set, or CITOOLS for short, is distributed through 
  355. shareware marketing. Simply put, shareware is user supported software. 
  356. Software which gives you the chance to try before you buy. Clear Software 
  357. gives you permission to use the CODE-IT software for 90 days. If your still 
  358. using the software after 90 days, or you wish to sell a program you have 
  359. developed with the CODE-IT tool box set, you are required to purchase a 
  360. registered copy from Clear Software. You may not sell a program developed with 
  361. an unregistered version of CODE-IT. The benefits of becoming a registered user 
  362. far outweigh the nominal cost. The benefits include:
  363.       
  364.       ∙     Printed programmers reference manual.
  365.       ∙     The latest version of the tool box libraries.
  366.       ∙     Additional up to the date routines not included in shareware 
  367.             versions(we are constantly adding routines).
  368.       ∙     1 year FREE tech support.
  369.       ∙     2 FREE updates.
  370.       ∙     A 90 day unconditional money back guarantee. If your not happy 
  371.             with the registered version of the program, return it to us within 
  372.             90 days and we'll refund your money in full, no questions asked. Page 2
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379. At Clear Software, your satisfaction is our number one priority.
  380.  
  381. The cost to purchase a registered version is $59.00 (U.S.). 
  382.  
  383. Shipping and handling are free anywhere in the U.S.A., air service is 
  384. available at an additional cost. To register, print a copy of the registration 
  385. form file (REGFORM.DOC) which comes with the shareware version disk(s). Fill 
  386. in the form and send it and a check or money order for $59.00 (California 
  387. residents add 7.25% sales tax) to:
  388.  
  389.       Clear Software
  390.       14962 Bear Valley Rd. Ste. G
  391.       Victorville, Ca. 92392
  392.  
  393. The CODE-IT tool box set is designed to leverage the programmers time. We feel 
  394. that once you study and begin using the tools you will find them a useful and 
  395. invaluable source for your programs. 
  396.  
  397. As we mentioned before Clear Software charges no royalty fees for registered 
  398. users of the CODE-IT set developing end user executable programs. Once your a 
  399. registered user, all executable files developed with the CITOOLS set are yours 
  400. to distribute as you wish. However, You may not develop libraries or object 
  401. files which contain any part of the CITOOLS set for any form of distribution 
  402. without compiling them into a running executable file. For more information on 
  403. the license agreement for this software see the License Agreement section at 
  404. the beginning of this document or manual.
  405.  
  406. The tool box routines used are called like any other SUB or FUNCTION in the 
  407. Microsoft■ BASIC language. Depending on your level of programming knowledge 
  408. and third party libraries, learning to use them could take some time. Usually 
  409. we recommend sitting down with them for a session or two before you begin 
  410. serious programming with them. Studying the sample source code files 
  411. (DEMO*.BAS) included with the disk(s) also speed the understanding of the 
  412. procedures. Also, use the tool box reference in this manual for detailed 
  413. explanations of the routines in the CITOOLS set.
  414.  
  415. At Clear Software it's extremely important to us that we know what you think 
  416. of our software. If you have any suggestions or comments about our software 
  417. products please write to us and let us know.
  418.  
  419. Page 3
  420.  
  421.  
  422.  
  423.  
  424.  
  425. Getting Started
  426.  
  427. Installation
  428. The INSTALL.EXE program on the CODE-IT disk will install the files for you in 
  429. any directory you want. If the directory you choose does not exist it will be 
  430. created for you if you tell the program to do so.
  431.  
  432. First, make backup copies of the original disk or disks and use the copies to 
  433. install the files. Consult your DOS manual for the disk copy procedure.
  434.  
  435. 1)    Put the disk (disk 1 if you have a multiple disk set) in drive A: or B: 
  436.       and at the "C:>" prompt type "A:INSTALL" or "B:INSTALL" and press the 
  437.       ENTER key. After a few seconds a menu will appear asking if you have a 
  438.       color or monochrome monitor. Use the ARROW keys to highlight the correct 
  439.       mode and press ENTER to select it.
  440.  
  441. 2)    The next screen to appear is the opening screen displaying information 
  442.       about CODE-IT. After reading the message press any key to continue.
  443.  
  444. 3)    The next screen will enplane the install program and how to use it. When 
  445.       your finished reading it press any key to continue.
  446.  
  447. 4)    You are now at the install screen and menu. The menu choices across the 
  448.       top of the screen are selected by using the left and right arrow keys to 
  449.       highlight the choices and pressing the enter key to activate the 
  450.       selection. The window showing displays the current default settings for 
  451.       the installation.
  452.  
  453.       To change the "From" drive:
  454.       Use the ARROW keys to highlight the menu choice "Install-From" and press 
  455.       ENTER. Use the editing keys (backspace, del, etc...) to enter the 
  456.       correct drive and press ENTER.
  457.  
  458.       To change the "To" path:
  459.       Use the ARROW keys to highlight the menu choice "Install-To" and press 
  460.       ENTER. Use the editing keys (backspace, del, etc...) to enter the 
  461.       correct path and press ENTER.
  462.  
  463. 5)    Once all the path and drive are correct, use the ARROW keys to highlight 
  464.       the menu choice "Install" and press ENTER. If the "To" path you gave 
  465.       does not exist the program will ask you if you want to create it. When 
  466.       the file installation is complete window pops up to let you know. Press 
  467.       any key to continue.
  468.  
  469. 5)    Once again you are at the control menu. Use the ARROW keys to highlight 
  470.       the menu choice "Exit" to end the installation program.
  471.  
  472. That's It. The files are now installed and ready to use. The next section will 
  473. help you build the Page 4
  474.  
  475.  
  476.  
  477.  
  478.  
  479. libraries and decide which files you will want to include in them.
  480.  
  481.  
  482. Creating Libraries
  483. The tools are separated into several individual library files allowing you to 
  484. build custom run time and quick libraries for use with your programs without 
  485. having to include unused code. This is helpful if memory is a concern, and you 
  486. need as small a quick library as possible. The following is a brief 
  487. description of the tool box files and the necessary LIB files to include when 
  488. building your libraries. For a more detailed description of the libraries see 
  489. the toolbox references.
  490.  
  491. Library File            Description and Related Files
  492. _________________________________________________________________
  493. CIALLQB.LIB -or-
  494. CIALLB7.LIB             A combined library of all the CODE-IT tool box 
  495.                         libraries. (CIALLQB.LIB for QuickBASIC, CIALLB7.LIB 
  496.                         for BASIC PDS).
  497.  
  498. CIALLQB.QLB -or-
  499. CIALLB7.QLB             The quick library containing all the CODE-IT library 
  500.                         routines. (CIALLQB.QLB for QuickBASIC, CIALLB7.QLB for 
  501.                         BASIC PDS). Load them into the QB or QBX environment 
  502.                         using the /L command followed by the quick library 
  503.                         name (QB /L CIALLQB).
  504.  
  505. CITOOLS.LIB             The main tool box file. All the other tool box files 
  506.                         use the routines in this library. You must include 
  507.                         this file when using any of the libraries in the 
  508.                         CITOOLS set. You can however use this file alone if 
  509.                         your program only uses the routines in this library.
  510.  
  511. CIMOUSE.LIB             The mouse routines for all the menu and window tool 
  512.                         box files. It must be included in any combined 
  513.                         libraries you create with the CITOOLS set, even if you 
  514.                         don't plan to use mouse routines with your program. 
  515.                         This file is separate from the CITOOLS.LIB incase you 
  516.                         want to use it to build mouse routines into your 
  517.                         programs without using any of the other tool box 
  518.                         files.
  519.  
  520. CIMENU1.LIB             Routines for pull down menus. When creating a combined 
  521.                         or quick library the CITOOLS.LIB and the CIMOUSE.LIB 
  522.                         must be included also.
  523.  
  524. CIMENU2.LIB             The library for using in memory pop up menus. When 
  525.                         creating a combined or quick library the CITOOLS.LIB 
  526.                         and the CIMOUSE.LIB must be included also.
  527.  
  528. CIMENU3.LIB             Routines for pop up menus (not held in memory). When 
  529.                         creating Page 5
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                         a combined or quick library the CITOOLS.LIB and the 
  536.                         CIMOUSE.LIB must be included also.
  537.  
  538.  
  539. CIMENU4.LIB             Routines for using ring or vertical menus. When 
  540.                         creating a combined or quick library the CITOOLS.LIB 
  541.                         and the CIMOUSE.LIB must be included also.
  542.  
  543. CIWIND1.LIB             Routines for creating text, button, and data entry 
  544.                         windows. When creating a combined or quick library the 
  545.                         CITOOLS.LIB and the CIMOUSE.LIB must be included also.
  546.  
  547. CIWIND2.LIB             Routines for specialty windows such as alert and tag 
  548.                         windows. When creating a combined or quick library the 
  549.                         CITOOLS.LIB and the CIMOUSE.LIB must be included also.
  550.  
  551. Creating combined or quick libraries with the CITOOLS set is just like 
  552. creating any other library. If you have Clear Software's TRACKIT Library 
  553. Management System use it to create the libraries for you. The database of 
  554. TRACKIT will also help you keep track of the separate library modules you used 
  555. to create the combined libraries. 
  556.  
  557. If you don't have the TRACKIT system, the following section is an example of 
  558. creating stand alone and quick libraries from the DOS command line. (If you 
  559. would like a copy of the TRACKIT Library Management System, ask for it from 
  560. your favorite shareware dealer. If unavailable you can also order it directly 
  561. from Clear Software).
  562.  
  563. Stand Alone Library - QuickBASIC:
  564.       LIB CINEW.LIB+CITOOLS.LIB+CIMOUSE.LIB+CIMENU1.LIB+QB.LIB;
  565.  
  566.       Creates a stand alone or linkable library called CINEW.LIB which 
  567.       contains the CITOOLS, CIMOUSE, CIMENU1 and QB.LIB libraries.
  568.  
  569.       NOTE: QB.LIB is supplied with your QuickBASIC program and must be 
  570.       included when building custom libraries built with CODE-IT exept when 
  571.       using the CIALLQB.LIB.
  572.  
  573. Stand Alone Library - BASIC 7.x:
  574.       LIB CINEW.LIB+CITOOLS.LIB+CIMOUSE.LIB+CIMENU1.LIB+QBX.LIB;
  575.  
  576.       Creates a stand alone or linkable library called CINEW.LIB which 
  577.       contains the CITOOLS, CIMOUSE, CIMENU1 QBX.LIB libraries.
  578.  
  579.       NOTE: QBX.LIB is supplied with your BASIC 7.x program and must be 
  580.       included when building custom libraries built with CODE-IT exept when 
  581.       using the CIALLB7.LIB.
  582. Page 6
  583.  
  584.  
  585.  
  586.  
  587.  
  588. Quick Library - QuickBASIC
  589.       LINK /Q CITOOLS.LIB CIMOUSE.LIB CIMENU1.LIB QB.LIB, CINEW.QLB,, 
  590.       BQLB45.LIB;
  591.  
  592.       Creates a quick library for use with QuickBASIC 4.5 out of the CITOOLS, 
  593.       CIMOUSE, and the CIMENU1 libraries. 
  594.  
  595.       NOTE: BQLB45.LIB is for the QuickBASIC 4.5 system. If you have a 
  596.       different version of QuickBASIC use the correct library.
  597.  
  598. Quick Library - BASIC 7.x
  599.       LINK /Q CITOOLS.LIB CIMOUSE.LIB CIMENU1.LIB QBX.LIB, CINEW.QLB,, 
  600.       QBXQLB.LIB;
  601.  
  602.       Creates a quick library for use with the BASIC 7.x professional 
  603.       development system. The library contains the CITOOLS, CIMOUSE, and 
  604.       CIMENU1 libraries.
  605.  
  606. For more information on stand alone and quick libraries see your BASIC 
  607. reference manual.
  608.  
  609. Using Libraries
  610. This section gives a brief overview of third party libraries and their uses. 
  611. If your familiar with these types of libraries you might just want to skim 
  612. through this section to pick up hints on the CITOOLS set. For others who might 
  613. be new to third party libraries this section will help you see how you can use 
  614. the libraries to improve your program development.
  615.  
  616. The term "Third party libraries" refers to computer language library files put 
  617. out by companies other than the originator of the programming environment. In 
  618. this case Microsoft■. Their uses in computer programming have become very 
  619. popular due to the great amount of time you save by using code already wrote 
  620. and tested.
  621.  
  622. There are different types of library sets. CODE-IT is a set of user interface 
  623. libraries, libraries which allow you to design menus and windows to 
  624. communicate with the end user of your programs. To write the code for these 
  625. routines yourself could take you months or even years. But by registering with 
  626. Clear Software and using the CODE-IT set, you'll spend that time on developing 
  627. new projects and profiting from your finished ones.
  628.  
  629. Using the libraries is the same as calling any other Microsoft■ BASIC SUB or 
  630. FUNCTION procedure. In fact, that's exactly what they are. Some of the 
  631. procedures use languages such as C and Assembler to improve their speed and 
  632. functionability. Others are written in BASIC. Your program does not need to 
  633. know the language, just the correct calling procedure.
  634.  
  635. INCLUDE Files
  636. Included on the CITOOLS disk is a group of include files. If your not familiar 
  637. with include files, they contain the definitions for the SUB's and FUNCTION's 
  638. in the CITOOLS libraries. The Page 7
  639.  
  640.  
  641.  
  642.  
  643.  
  644. include file name is the same as it's library file name except for the "BI" 
  645. extension. The appropriate include file must be placed at the beginning of the 
  646. main module in your program with an INCLUDE$ meta command such as:
  647.  
  648. 'INCLUDE$:'CIMENU1.BI'
  649.  
  650. See your BASIC reference manual for more details.Make sure the include files 
  651. are in the same directory as your program file, or that the path to them is 
  652. included in the QB or QBX environment paths.
  653.  
  654. Demo Programs
  655. At Clear Software, we believe the best way to learn the CODE-IT set is to use 
  656. it. For this reason we have included two things with the set, a tool box 
  657. reference and demo programs. Later in this manual you will find the tool box 
  658. reference, and the demo files are located on the CODE-IT disk. All the demo 
  659. programs are source code files with an extension of "BAS".
  660.  
  661. Each individual program demonstrates one of the menu or window tool box 
  662. libraries in the CITOOLS set. The demo is broken up to make it easier to learn 
  663. about any part of the tool box without having to wade through unwanted code. 
  664.  
  665. NOTE: The demo programs are wrote for use with a color monitor. If your using 
  666. them on a monochrome or black and white monitor you will need to change the 
  667. color values in the SUB and FUNCTION calls as well as the COLOR statement 
  668. values. After loading the programs into the QB or QBX environment, use the 
  669. tool box reference section to locate the color parameters in the SUB's and 
  670. FUNCTION's.
  671.  
  672. To use the demo programs you first need to load the combined quick library 
  673. CIALLQB.QLB into the QB environment or CIALLB7.QLB into the QBX environment 
  674. using the /L command followed by the library name. An example would be QB /L 
  675. CIALLQB for QuickBASIC or QBX /L CIALLB7 for BASIC PDS. If you need help, see 
  676. Quick Libraries in your BASIC reference manual. Once you've loaded the quick 
  677. library and are in QB or QBX, load any one of the demo programs with the "Load 
  678. New" command from the QB or QBX "File" menu, just as you would any other BASIC 
  679. source code file.
  680.  
  681. Viewing the source code you'll notice plenty of comments. By reading the 
  682. comments and using the tool box reference in this manual, you should get a 
  683. feel for how the tool box works. Also, the programs are now ready to run by 
  684. pressing F5. Run the programs and watch how they work. Change the program 
  685. parameters of the SUB and FUNCTION calls to test new values and their actions. 
  686. Keep your tool box reference section handy to review the parameter types. 
  687.  
  688. If you have problems running the demo programs, and get errors such as "File 
  689. not found" or "Procedure not defined", check to see if:
  690.  
  691. 1)    Your "BI" or include files are in the same directory as the   "BAS" or 
  692.       source code files. Page 8
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699. 2)    Your quick library is loaded properly. You might have to exit  and 
  700.       reload the quick library if your not sure.
  701.  
  702.  
  703. Study and play with the demo programs.When you feel comfortable with using the 
  704. libraries, develop an application of your own. The CITOOLS set provides a 
  705. great deal of flexibility and power to the programmer. After you learn it, 
  706. you'll be surprised at the development time it will save you over writing the 
  707. code yourself. Page 9
  708.  
  709.  
  710.  
  711.  
  712.  
  713. CITOOLS.LIB
  714.  
  715. The CITOOLS library is the heart of the toolbox. All of the other libraries 
  716. included with the CITOOLS set use it's SUB's and FUNCTION's to accomplish 
  717. their work. The routines can also be used to create your own custom 
  718. applications.
  719.  
  720.  
  721.  
  722.  
  723. AdapterSet FUNCTION
  724.  
  725. This FUNCTION is used internally by CITOOLS to set the video mode for the 
  726. screen save and restore routines. There is no need to use this FUNCTION from 
  727. your programs.
  728.  
  729.  
  730.  
  731.  
  732. AdapterType FUNCTION
  733.  
  734.       Returns a string representing the type of video adapter on the users 
  735.       system. The following strings are returned, "MDPA", "CGA", "ColorEGA", 
  736.       "MonoVGA", "ColorVGA", "MonoMCGA", and "ColorMCGA".
  737.  
  738.       variable$ = AdapterType$
  739.  
  740.       variable$   Any BASIC variable of type string.
  741.  
  742.  
  743.  
  744.  
  745. AltConvert FUNCTION
  746.  
  747.       Strips the "Alt" from an "Alt + ascii" key press leaving the ascii key 
  748.       as if it were the only key pressed and returns it to the calling 
  749.       procedure in the form of a string. The AltConvert FUNCTION is an easy 
  750.       way to determine a specific keypress if an alt key combination could be 
  751.       used. When a key press value is passed, the value returned is as if the 
  752.       user never pressed the alt key.
  753.  
  754.       variable$ = AltConvert(kb$)
  755.  
  756.       variable$   Any BASIC variable of type string.
  757.  
  758.       kb$         The key press character of the "Alt + ascii" keys pressed.
  759. Page 10
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768. AttrChange SUB
  769.  
  770.       Changes the color attributes of a given area of the screen without 
  771.       altering the contents. The AttrChange SUB is used by the windows and 
  772.       menus of the CITOOLS package to place a shadow behind them. The 
  773.       appearance of a shadow is accomplished by changing the color of the 
  774.       screen area to gray on black (8,0). Another use of this SUB is to place 
  775.       and update the scrolling highlight on the menus. It's much faster to 
  776.       change the attributes then to reprint the screen area.
  777.  
  778.       CALL AttrChange(left%, right%, top%, bottom%, FG%, BG%)
  779.  
  780.       left%       The left column of the area to change.
  781.  
  782.       right%      The right column of the area to change.
  783.  
  784.       top%        The top row of the area to change.
  785.  
  786.       bottom%     The bottom row of the area to change.
  787.  
  788.       FG%         Foreground color to change to.(1 to 15)
  789.  
  790.       BG%         Background color to change to. (1 to 7)
  791.  
  792.  
  793.  
  794.  
  795. DrawBox SUB
  796.  
  797.       Draws a single, double, or solid line box around a given area of the 
  798.       screen. Use a COLOR statement before calling DrawBox to set the colors 
  799.       for the box. On a single (1) and double (2) line box the foreground 
  800.       color is the color of the box itself. On a solid (3) box the color of 
  801.       the background will be the color of the solid border drawn. The contents 
  802.       between the box area drawn is not changed.
  803.  
  804.       CALL DrawBox(left%, right%, top%, bottom%, boxType%)
  805.  
  806.       left%       The left column of the box.
  807.  
  808.       right%      The right column of the box.
  809.  
  810.       top%        The top row of the box.
  811.  
  812.       bottom%     The bottom row of the box. Page 11
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.       boxType%    The type of box to draw. 1 = A single line box, 2 = a double 
  820.                   line box, 3 = a solid border box.
  821.  
  822.  
  823.  
  824.  
  825. ScreenPaint SUB
  826.  
  827.       Paints a given area of the screen with any printable ascii character. 
  828.       Use a COLOR statement before calling the ScreenPaint SUB to set the 
  829.       colors for the area to be painted. There are two ways to pass the Ascii$ 
  830.       variable to the SUB. One way is to use a CHR$ string like CHR$(177) for 
  831.       a hatch character, or you can hold down the ALT and CTRL keys while 
  832.       typing the ascii character code 177 then enclose the resulting character 
  833.       in quotes. Passing a null string ("") will paint a solid background 
  834.       using the current background color.
  835.  
  836.       CALL ScreenPaint(left%, right%, top%, bottom%, Ascii$)
  837.  
  838.       left%       The left column of the area to paint.
  839.  
  840.       right%      The right column of the area to paint.
  841.  
  842.       top%        The top row of the area to paint.
  843.  
  844.       bottom%     The bottom area of the area to paint.
  845.  
  846.       Ascii$      Any printable ascii character string (IE: CHR$(42) or "*" 
  847.                   for the star character). See remarks below.
  848.  
  849.  
  850.  
  851.  
  852. ScreenRestore SUB
  853.  
  854.       Restores an area of the screen previously saved by the ScreenSave SUB. 
  855.       Up to 10 areas of the screen can be stored in memory at one time or as 
  856.       much as memory will allow. A full screen takes about 4000 bytes of 
  857.       memory. The ScreenSave and ScreenRestore SUB's use an assembly language 
  858.       routine to do their work which makes the save and restore extremely 
  859.       fast.
  860.  
  861.       CALL ScreenRestore(left%, right%, top%, bottom%, scrnNum%)
  862.  
  863.       left%       Left column of the area to be restored.
  864.  
  865.       right%      Right column of the area to be restored. Page 12
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.       top%        Top row of the area to be restored.
  873.  
  874.       bottom%     Bottom row of the area to be restored.
  875.  
  876.       scrnNum%    An integer number between 1 and 10 which is unique to each 
  877.                   area saved at one time. This number must be the same used to 
  878.                   save the screen. (See the ScreenSave SUB description).
  879.  
  880.  
  881.  
  882.  
  883. ScreenSave SUB
  884.  
  885.       Saves an area of the screen in memory. Use the ScreenRestore SUB to 
  886.       restore the area of screen saved. Make sure to use the same number to 
  887.       restore the screen as was used to save it. The ScreenSave and 
  888.       ScreenRestore SUB's us an assembly language routine to do their work 
  889.       making them extremely fast.
  890.  
  891.       CALL ScreenSave(left%, right%, top%, bottom%, scrnNum%)
  892.  
  893.       left%       Left column of the area to be saved.
  894.  
  895.       right%      Right column of the area to be saved.
  896.  
  897.       top%        Top row of the area to be saved.
  898.  
  899.       bottom%     Bottom row of the area to be saved.
  900.  
  901.       scrnNum%    An integer number between 1 and 10 used to identify the area 
  902.                   of the screen saved. This number must be unique to each area 
  903.                   of screen saved at one time.
  904.  
  905.  
  906.  
  907.  
  908. ScrollArea SUB
  909.  
  910.       Scrolls an area of the screen up or down a given number of columns 
  911.       leaving the remaining area of the screen in tact. When the screen is 
  912.       scrolled blank lines newly created are given the background color 
  913.       attribute of the newColorBG% variable.
  914.  
  915.       CALL ScrollArea(left%, right%, top%, bottom%, lines%, newColorBG%)
  916.  
  917.       left%             Left column of the scroll area.
  918. Page 13
  919.  
  920.  
  921.  
  922.  
  923.  
  924.        right%           Right column of the scroll area.
  925.  
  926.       top%              Top row of the scroll area.
  927.  
  928.       bottom%           Bottom row of the scroll area.
  929.  
  930.       lines%            The number of columns to scroll up or down. Use a 
  931.                         positive number to scroll the area up and a negative 
  932.                         number to scroll the area down.
  933.  
  934.       newColorBG%       The background color of the new area. (See the Remarks 
  935.                         below).
  936.  
  937.  
  938.  
  939.  
  940. ShiftStateNow FUNCTION
  941.  
  942.       Returns the state of the given extended key at the time of the call. Use 
  943.       the ShiftStateNow FUNCTION in a loop to continually check for the state 
  944.       of a certain key. This FUNCTION is used by the MENU1.LIB to poll for the 
  945.       Alt key which activates the pull down menu title bar.
  946.  
  947.       variable% = ShiftStateNow(extKey%)
  948.  
  949.       variable%   Any variable of type integer. A value is passed back in the 
  950.                   following form:
  951.  
  952.  
  953.       Value       Action
  954.       _______________________________________________________
  955.       0           The key polled is inactive (not pressedor not on).
  956.  
  957.       -1          The key polled is active (pressed or on).
  958.  
  959.       extKey%     An integer number between 0 and 7 which defines the extended 
  960.                   key to be polled. Use the following values:
  961.  
  962.       Value       Action
  963.       _______________________________________________________
  964.        0          Right Shift key.
  965.  
  966.        1          Left Shift key.
  967.  
  968.        2          Ctrl key. Page 14
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.        3          Alt key.
  976.  
  977.        4          Scroll Lock key.
  978.  
  979.        5          Num Lock key.
  980.  
  981.        6          Caps Lock key.
  982.  
  983.        7          Insert key.
  984.  
  985.  
  986.  
  987.  
  988. WindowPut SUB
  989.  
  990.       Puts a window on the screen at a given location. Although the CITOOLS 
  991.       set contains several full featured window routines, this SUB was 
  992.       included to allow you greater flexibility in designing your programs.
  993.  
  994.       CALL WindowPut(left%, right%, top%, bottom%, shad%, boxType%, FG%, BG%)
  995.  
  996.       left%       Left column of the window.
  997.  
  998.       right%      Right column of the window.
  999.  
  1000.       top%        Top row of the window.
  1001.  
  1002.       bottom%     Bottom row of the window.
  1003.  
  1004.       shad%       An integer number telling the SUB to use a shadow for the 
  1005.                   window or not. 0 = no shadow, 1 = use a shadow.
  1006.  
  1007.       boxType%    An integer number which determines the type of border box 
  1008.                   the window will have. 0 = no box, 1 = a single line box, 2 = 
  1009.                   a double line box, 3 = a solid border box.
  1010.  
  1011.       FG%         Foreground color for the window (1 to 15).
  1012.  
  1013.       BG%         Background color for the window (1 to 7). Page 15
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019. CIMOUSE.LIB
  1020.  
  1021. The CIMOUSE toolbox contains the mouse routines used by all the libraries that 
  1022. come with the CODE-IT set except the CITOOLS.LIB itself. For this reason it 
  1023. must be included with your program if you plan to use any of the other 
  1024. libraries. The library senses if the users computer has a mouse driver 
  1025. installed or not. If not your programs run as usual. The CIMOUSE library works 
  1026. with the Microsoft Mouse and compatibles. The library is left separate from 
  1027. the CITOOLS.LIB to allow you to use it with other programs you might have 
  1028. already developed and give them mouse support. To use the mouse routines place 
  1029. MouseInit at the beginning of your program.
  1030.  
  1031.  
  1032.  
  1033.  
  1034. MouseDriver SUB
  1035.  
  1036. This SUB is used by the other SUB's in CIMOUSE.LIB. There is no reason for you 
  1037. to call this SUB because all the features needed to call the mouse driver are 
  1038. handled internally for you by the other procedures.
  1039.  
  1040.  
  1041.  
  1042. MouseHide SUB
  1043.  
  1044.       Hides the mouse cursor. The CIMENUn and CIWINDn toolboxes automaticly 
  1045.       handle the mouse for you. If you decide to create custom windows using 
  1046.       CITOOLS.LIB or other procedures which do not control the mouse, you will 
  1047.       need to hide the mouse before printing text or characters to the screen. 
  1048.       This will keep the mouse cursor  from blocking the character attributes 
  1049.       your program is attempting to put on the screen. 
  1050.  
  1051.       CALL MouseHide
  1052.  
  1053.  
  1054.  
  1055.  
  1056. MouseInit SUB
  1057.  
  1058.       Initializes the mouse driver so the other SUB's can access it's 
  1059.       functions. Place the MouseInit call at the beginning of your program. 
  1060.       Along with initializing the mouse driver the MousInit SUB also tests for 
  1061.       a mouse driver being present on the users system. If there is not a 
  1062.       mouse present it sets an internal variable switch letting the mouse 
  1063.       routines exit without trying to call the mouse driver. This allows your 
  1064.       programs to run on systems with or without a mouse using the same code.
  1065. Page 16
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.        CALL MouseInit
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078. MouseLimit SUB
  1079.  
  1080.       Limits the area of the screen that the mouse cursor can move in. Use the 
  1081.       MouseLimit SUB whenever you want to restrict the movement of the mouse 
  1082.       cursor to a given area such as a window or menu. Another use is to place 
  1083.       the mouse cursor anywhere on the screen. To free the mouse call the SUB 
  1084.       set to the full screen area.
  1085.  
  1086.       CALL MouseLimit(left%, right%, top%, bottom%)
  1087.  
  1088.       left%       The left column of the limit area.
  1089.  
  1090.       right%      The right column of the limit area.
  1091.  
  1092.       top%        The top row of the limit area.
  1093.  
  1094.       bottom%     The bottom row of the limit area.
  1095.  
  1096.  
  1097.  
  1098.  
  1099. MousePoll SUB
  1100.  
  1101.       Polls the mouse driver and returns the current row and column of the 
  1102.       mouse and the states of the mouse buttons. Use the MousePoll SUB in a 
  1103.       loop to continually poll for a mouse event. 
  1104.  
  1105.       CALL MousePoll(mRow%, mCol%, lButton%, rButton%)
  1106.  
  1107.       mRow%       Current row of the mouse cursor.
  1108.  
  1109.       mCol%       Current column of the mouse cursor.
  1110.  
  1111.       lButton%    Current state of the left mouse button. 0 = not active (not 
  1112.                   pressed), -1 = active (pressed).
  1113.  
  1114.       rButton%    Current state of the right mouse button. 0 = not active (not 
  1115.                   pressed), -1 = active (pressed).
  1116. Page 17
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125. MouseShow SUB
  1126.  
  1127.       Makes the mouse cursor visible. Use the MouseShow SUB at the beginning 
  1128.       of your program after you have finished painting opening screens and 
  1129.       backgrounds. If it is necessary to hide the mouse at any time use it to 
  1130.       restore the mouse cursor to the screen.
  1131.  
  1132.       CALL MouseShow Page 18
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138. CIMENU1.LIB
  1139.  
  1140. This tool box allows you to build pull down menus into your program similar to 
  1141. QB or QBX pull down menus. Up to 10 menu titles can be defined and each title 
  1142. can hold up to 20 pull down menu choices. The menus need only to be defined 
  1143. once by your program and from that point on are held in memory. This makes 
  1144. reusing the menus quick and easy. These menus can also interact with the data 
  1145. windows created with CIWIND1.LIB.
  1146.  
  1147. Limits And Considerations
  1148.  
  1149.       Maximum number of menu titles with sub menus          10
  1150.  
  1151.       Maximum number of menu choices on sub menus           20
  1152.  
  1153.       All arrays passed to any SUB or FUNCTION in the CITOOLS set use a base 
  1154.       of 1. An example would be DIM text$(1 TO n), where n is either the 
  1155.       required boundary limit of the array or any number which meets your 
  1156.       programs needs. The following is a description of the arrays with 
  1157.       required boundaries for the CIMENU1.LIB tool box. The required DIM is 
  1158.       the statement your program must have to pass the array to the SUB or 
  1159.       FUNCTION.
  1160.  
  1161.       Array             SUB or FUNCTION               Required DIM
  1162.       ________________________________________________________________________
  1163.  
  1164.       descript$()       PullDownDescript              (1 TO 20)
  1165.  
  1166.  
  1167.  
  1168.  
  1169. PullDownActive SUB
  1170.  
  1171. Once a menu event takes place (ie: Alt + access key or left mouse button on 
  1172. row 1) control of the program is passed to this SUB from the PullDownPoll SUB. 
  1173. This SUB is handled internally by the CIMENU1.LIB and does not need to be 
  1174. called directly.
  1175.  
  1176.  
  1177.  
  1178.  
  1179. PullDownColors SUB
  1180.  
  1181.       Sets or changes the colors for the pull down menus. The menu colors ar 
  1182.       passed in the form of integers, 1 to 15 for foreground colors and 1 to 7 
  1183.       for background colors. The background colors for the access keys are the 
  1184.       same as the text and highlight colors. For a description of the disabled 
  1185.       menu choice see PullDownDefine. Page 19
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.       CALL PullDownColors(bordFGClr%, bordBGClr%, textFGClr%, textBGClr%, 
  1193.       titleFGClr%, titleBGClr%, hiFGClr%, hiBGClr%, disableFGClr%, 
  1194.       disableHiFGClr%, hihiFGClr%, hiFGClr%)
  1195.  
  1196.  
  1197.       bordFGCLr%        Border foreground color for the menu (1 TO 15).
  1198.  
  1199.       bordBGCLr%        Border background color for the menu (1 TO 7).
  1200.  
  1201.       textFGClr%        Text foreground color for the menu (1 TO 15).
  1202.  
  1203.       textBGClr%        Text background color for the menu (1 TO 7).
  1204.  
  1205.       titleFGClr%       Title foreground color for the menu (1 TO 15).
  1206.  
  1207.       titleBGClr%       Title background color for the menu (1 TO 7).
  1208.  
  1209.       hiFGClr%          Foreground color for the menu highlight bar (1 TO 15).
  1210.  
  1211.       hiBGClr%          Foreground color for the menu highlight bar (1 TO 7).
  1212.  
  1213.       disableFGClr%     Foreground color for the disabled menu choice (1 TO 
  1214.                         15).
  1215.  
  1216.       disableHiFGClr%   Foreground color for the disabled menu choice when the 
  1217.                         highlight bar is on it (1 TO 15).
  1218.  
  1219.       hihiFGCLr%        Foreground color for the menu choice access key when 
  1220.                         the menu highlight bar is on it (1 TO 15).
  1221.  
  1222.       hihcarFGclr%      Foreground color for the menu access key (1 TO 15).
  1223.  
  1224.  
  1225.  
  1226.  
  1227. PullDownDefine SUB
  1228.  
  1229.       Sets the pull down menu titles, choices, access characters, and initial 
  1230.       states of choices or titles. For an example of the PullDownDefine SUB 
  1231.       see the source code examples later in this manual or the DEMOM1.BAS 
  1232.       source code file.
  1233.  
  1234.       CALL PullDownDefine(menu%, item%, state%, choice$, hichar%)
  1235.  
  1236.       menu%       An integer number describing the menu title being defined or 
  1237.                   the number of the menu title the choice should be attached 
  1238.                   to. Page 20
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.       item%       An integer number defining the item being passed. Use the 
  1246.                   following values:
  1247.  
  1248.       Value       Action
  1249.       __________________________________________________________________
  1250.       0           The item being defined is a menu title. Titles are the text 
  1251.                   in the menu bar visible across the top of the screen.
  1252.  
  1253.       1 - 10      The item being passed is a pull down menu choice and is to 
  1254.                   be attached to the menu title of this number (left to right 
  1255.                   on the menu title bar).
  1256.  
  1257.       state%      The initial state of the menu item or title. 0 = disabled, 1 
  1258.                   = active.
  1259.  
  1260.       choice$     A BASIC string of the menu title or choice to be printed on 
  1261.                   the screen.
  1262.  
  1263.       hichar%     An integer number of the of the highlighted access key 
  1264.                   character in the choice$ string. (ie: 1 to highlight the "F" 
  1265.                   in "File").
  1266.  
  1267.  
  1268.  
  1269.  
  1270. PullDownDescript SUB
  1271.  
  1272.       Defines the description or help line for the pull down menu choices. The 
  1273.       description line is a way to simplify your menu structure for the end 
  1274.       user. It allows you to put a long description for each of your menu 
  1275.       choices. A maximum of 1 line and 80 characters are allowed for the 
  1276.       description. For information on the placement of the description area 
  1277.       see PullDownDescriptArea.
  1278.  
  1279.       CALL PullDownDescript(menu%, descript$())
  1280.  
  1281.       menu%       An integer number describing the menu title to link the 
  1282.                   descriptions to.
  1283.  
  1284.       descript$() A text array holding the descriptions for the individual 
  1285.                   menu choices of the pull down menu. Make sure the array is 
  1286.                   dimensioned in your program as DIM arrayname$(1 TO 20) where 
  1287.                   arrayname$ is any BASIC variable name of type string.
  1288.  
  1289.  
  1290.  
  1291.  
  1292. PullDownDescriptArea SUB
  1293.  
  1294.       Defines the screen placement of the pull down menu title and choice 
  1295.       descriptions. The area for the menu descriptions is saved and restored 
  1296.       on exit from the pull down menus Page 21
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.       and can contain 1 line up to 80 characters in length.
  1303.  
  1304.       CALL PullDownDescriptArea(row%, col%, areaLength%, FG%, BG%)
  1305.  
  1306.       row%        Screen row of the description area.
  1307.  
  1308.       col%        Left column of the description area.
  1309.  
  1310.       areaLength% The length of the description area.
  1311.  
  1312.       FG%         Foreground color for the description area and text.
  1313.  
  1314.       BG%         Background color for the description area and text.
  1315.  
  1316.  
  1317.  
  1318.  
  1319. PullDownInfo FUNCTION
  1320.  
  1321.       Polls the pull down global variables to determine if a menu was chosen 
  1322.       and if so a second call can be made to determine which menu or item.  
  1323.       Using this format makes it very easy to put this in a LOOP followed by a 
  1324.       SELECT CASE block to poll for menu events while your program is running. 
  1325.       See program examples later in this manual or the demo source code files 
  1326.       included with your disks (DEMOM1.BAS).
  1327.  
  1328.       variable% = PullDownInfo(switch%)
  1329.  
  1330.       variable%   Any BASIC variable of type integer.
  1331.  
  1332.       switch%     An integer number between 0 and 2 with the following 
  1333.                   actions:
  1334.  
  1335.       Value       Action
  1336.       __________________________________________________________________
  1337.  
  1338.        0          Returns the value of 0 in variable% if no menu has been 
  1339.                   chosen or -1 if one has.
  1340.  
  1341.        1          Returns number of the menu chosen.
  1342.  
  1343.        2          Returns the menu item number chosen.
  1344.  
  1345.  
  1346.  
  1347.  
  1348. PullDownPaint SUB Page 22
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355. This SUB is used internally by the CIMENU1 toolbox to paint and display the 
  1356. pull down menus. It is not necessary for your programs to call this SUB 
  1357. directly because it is handled for you by the toolbox.
  1358.  
  1359.  
  1360.  
  1361.  
  1362. PullDownPoll FUNCTION
  1363.  
  1364.       Processes mouse or keyboard events. If a menu event took place, Alt + 
  1365.       title access key or a left mouse button press while the mouse cursor is 
  1366.       on row 1, then it passes control of the program to the PullDownActive 
  1367.       SUB. If a key press took place which was not a menu event the character 
  1368.       for the key press is passed back. The PullDownPoll FUNCTION acts like 
  1369.       the BASIC INKEY$ statement but it also checks for menu events.
  1370.  
  1371.       variable$ = PullDownPoll$
  1372.  
  1373.       variable$   Any BASIC variable of type string.
  1374.  
  1375.  
  1376.  
  1377.  
  1378. PullDownSoundSet SUB
  1379.  
  1380.       Sets the pull down menu sound which alerts the user of a wrong key 
  1381.       press. Sound frequency values of 50 or less usually are not heard. When 
  1382.       determining the sound length make sure you allow for slower machines. 
  1383.       What may seem to be a short tone on your computer may be a long an 
  1384.       annoying sound on a slower machine.
  1385.  
  1386.       CALL PullDownSoundSet(soundFreq%, soundLength%)
  1387.  
  1388.       soundFreq%        An integer between 1 and 10000 which is the frequency 
  1389.                         or tone of the sound to make. If 0 is passed then the 
  1390.                         sound feature is turned off.
  1391.  
  1392.       soundLength%      The length of the tone, a higher number creates a 
  1393.                         longer tone.
  1394.  
  1395.  
  1396.  
  1397.  
  1398. PullDownStateSet SUB
  1399.  
  1400.       Toggles the state of a menu title or pull down menu choice between 
  1401.       active and disabled. Use the same values for the menu% and item% 
  1402.       variables as were originally defined with the PullDownDefine SUB. 
  1403.       Disabled titles will not display their pull down menu and can Page 23
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.       not be selected.
  1410.  
  1411.       CALL PullDownStateSet(menu%, item%, state%)
  1412.  
  1413.       menu%       The number of the menu title to link the change to.
  1414.  
  1415.       item%       The number of the menu choice to link the change to. If the 
  1416.                   item is a menu title use 0 for this value.
  1417.  
  1418.       state%      An integer number determining the state of the item. 0 = 
  1419.                   disabled, 1 = active.
  1420.  
  1421.  
  1422.  
  1423.  
  1424. PullDownTitleDescript SUB
  1425.  
  1426.       Sets the description (sometimes called help line) for the menu titles 
  1427.       when no pull down menus are being shown. The description is displayed 
  1428.       using the values set with the PullDownDescriptArea SUB. Use this option 
  1429.       to display key descriptions for your menu title bar (ie: ENTER=Menu, 
  1430.       ESC=Cancel, etc.).
  1431.  
  1432.       CALL PullDownTitleDescript(descript$)
  1433.  
  1434.       descript$   A string holding the descript line to be displayed.
  1435.  
  1436.  
  1437.  
  1438.  
  1439. PullDownTitleOn SUB
  1440.  
  1441.       Makes the defined menu title bar visible. Use this SUB any time you need 
  1442.       to display or re-display your menu title bar. The menu bar is always 
  1443.       printed in row 1 of the screen.
  1444.  
  1445.       CALL PullDownTitleOn Page 24
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451. CIMENU2.LIB
  1452.  
  1453. This library contains the procedures for using in memory pop up menus. In 
  1454. memory pop up menus are defined similar to the pull down menus in CIMENU1.LIB. 
  1455. Once defined they stay in memory until your program ends.This allows you to 
  1456. define them once and then show them on the screen at any time in your program 
  1457. with very little code. If you want to use pop up menus but don't want to keep 
  1458. them in memory see CIMENU3.LIB. As with the rest of the menus in the toolbox 
  1459. full mouse support is built in.
  1460.  
  1461.       Maximum number of menus in memory                           20
  1462.  
  1463.       Maximum number of menu choices on each menu                 20
  1464.  
  1465.       Maximum number of user defined exit keys per menu            5
  1466.  
  1467.       All arrays passed to any SUB or FUNCTION in the CITOOLS set use a base 
  1468.       of 1. An example would be DIM text$(1 TO n), where n is either the 
  1469.       required boundary limit of the array or any number which meets your 
  1470.       programs needs. The following is a description of the arrays with 
  1471.       required boundaries for the CIMENU2.LIB tool box. The required DIM is 
  1472.       the statement your program must have to pass the array to the SUB or 
  1473.       FUNCTION.
  1474.  
  1475.       Array             SUB or FUNCTION                     Required DIM
  1476.       ________________________________________________________________________
  1477.  
  1478.       descript$()       PopUpChoiceDescrpt                  (1 TO 20)
  1479.  
  1480.  
  1481.  
  1482.  
  1483. PopUpActive FUNCTION
  1484.  
  1485.       Takes control of the program and processes the menu events. When the 
  1486.       menu is exited it passes back the menu choice selected or the key which 
  1487.       caused the exit. This is the only call needed to activate the menus once 
  1488.       they have been defined. For a complete example see the source code for 
  1489.       DEMOM2.BAS.
  1490.  
  1491.       variable% = PopUpActive(menu%)
  1492.  
  1493.       variable%   Any BASIC variable of type integer.
  1494.  
  1495.       menu%       An integer number which is the menu to be used (defined with 
  1496.                   PopUpDefine). Page 25
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506. PopUpChoiceDescript SUB
  1507.  
  1508.       Sets the pop up menu description or help line text for any given menu. 
  1509.       Note that the array your program is passing to this SUB must be defined 
  1510.       as (1 TO 20). Each description member of the array given should 
  1511.       correspond with the menu choice. For example the 3rd member of the 
  1512.       descript$() array will be displayed when the menu highlight is on the 
  1513.       3rd menu choice. If descriptions are not needed in your program, it is 
  1514.       not necessary to use this SUB.
  1515.  
  1516.       CALL PopUpChoiceDescript(menu%, descript$())
  1517.  
  1518.       menu%       An integer number of the menu to link the descriptions to.
  1519.  
  1520.       descript$() A string array which should be defined as DIM descript$(1 TO 
  1521.                   20) in your program which holds the descriptions.
  1522.  
  1523.  
  1524.  
  1525.  
  1526. PopUpColors SUB
  1527.  
  1528.       Sets the colors for the pop up menus. Each individual pop up menu 
  1529.       defined with the PopUpDefine can have its own color values. These colors 
  1530.       stay in effect until you change them or your program ends.
  1531.  
  1532.       CALL PopUpColors(menu%, bordFGClr%, bordBGClr%, textFGClr%, textBGClr%, 
  1533.       titleFGClr%, titleBGClr%, hiFGClr%, hiBGClr%, disableFGClr%, 
  1534.       disableHiFGClr%, hihiFGClr%,hiCharFGClr%)
  1535.  
  1536.       menu%             The number of the menu to link the color definitions 
  1537.                         to.
  1538.  
  1539.       bordFGClr%        Foreground color for the menu border (0 to 15).
  1540.  
  1541.       bordBGClr%        Background color for the menu border (0 to 7).
  1542.  
  1543.       textFGClr%        Foreground color for the menu choices (0 to 15).
  1544.  
  1545.       textBGClr%        Background color for the menu choices (0 to 7).
  1546.  
  1547.       titleFGClr%       Foreground color for the menu title (0 to 15).
  1548.  
  1549.       titleBGClr%       Background color for the menu title (0 to 7). Page 26
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.       hiFGClr%          Foreground color for the scrolling highlight bar (0 to 
  1557.                         15).
  1558.  
  1559.       hiBGClr%          Background color for the scrolling highlight bar (0 to 
  1560.                         7).
  1561.  
  1562.       disableFGClr%     Foreground color for the disabled menu choices (1 to 
  1563.                         15).
  1564.  
  1565.       disableHiFgClr%   Foreground color for the disabled menu choice when the 
  1566.                         scrolling highlight bar is on it (1 to 15).
  1567.  
  1568.       hihiFGClr%        Foreground color for the menu choice quick access 
  1569.                         character when the highlight bar is on it (1 to 15).
  1570.  
  1571.       hiCHarFGClr%      Foreground color for the menu choice quick access 
  1572.                         character (1 to 15).
  1573.  
  1574.  
  1575.  
  1576.  
  1577. PopUpDefine SUB
  1578.  
  1579.       Defines the menu titles and choices for your pop up menus. Use one call 
  1580.       for each menu title or choice being defined. Pass a dash ("-") for the 
  1581.       menu choice to print a line across the menu.
  1582.  
  1583.       CALL PopUpDefine(menu%, item%, state%, choice$, hiChar%)
  1584.  
  1585.       menu%       The number of the menu being defined (1 to 20).
  1586.  
  1587.       item%       The number of the menu item being defined. 0 = menu title, 1 
  1588.                   to 20 = menu choices.
  1589.  
  1590.       state%      The initial state of the menu choice being defined. 0 = 
  1591.                   disabled, 1 = active.
  1592.  
  1593.       choice$     The text for the menu title or choice.
  1594.  
  1595.       hiCHar%     The number of the character in the choice$ string to use as 
  1596.                   the quick access character. This character uses the 
  1597.                   highlight color.
  1598.  
  1599.  
  1600.  
  1601.  
  1602. PopUpDescriptArea SUB
  1603.  
  1604.       Sets the location on the screen that the descriptions for the pop up 
  1605.       menu choices will Page 27
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.       print. The description area is only visible if the menu is. The 
  1612.       background is restored after the menu is taken off the screen. For 
  1613.       information on how to set the menu choice descriptions see 
  1614.       PopUpChoiceDescript.
  1615.  
  1616.       CALL PopUpDescriptArea(row%, col%, areaLength%, hlpFG%, hlpBG%)
  1617.  
  1618.       row%        The row to print the menu choice descriptions in.
  1619.  
  1620.       col%        The left column to print the menu choice descriptions in.
  1621.  
  1622.       areaLength% The length of the description area.
  1623.  
  1624.       hlpFG%      Foreground color of the description area.
  1625.  
  1626.       hlpBG%      Background color of the description area.
  1627.  
  1628.  
  1629.  
  1630.  
  1631. PopUpExitKeySet SUB
  1632.  
  1633.       Defines special keys which cause an exit from the menu while it's 
  1634.       visible. The keyString$ can be any ascii string such as CHR$(27) for the 
  1635.       ESCAPE key, or CHR$(0) + CHR$(59) for the F1 key. See your BASIC 
  1636.       reference manual for more details. The return key can be positive or 
  1637.       negative (such as -1 for the F1 key), it makes no difference. It is only 
  1638.       a value to let your calling program know that the key was pressed. Up to 
  1639.       5 exit keys can be set for each menu.
  1640.  
  1641.       CALL PopUpExitKeySet(menu%, keyHandle%, exitKey$, returnedKey%)
  1642.  
  1643.       menu%             The number of the menu to link the exit key to. Use 
  1644.                         the menu number defined in PopUpDefine (see Page 29). 
  1645.  
  1646.       keyHandle%        A number between 1 and 5 unique to each exit key being 
  1647.                         defined.
  1648.  
  1649.       exitKey$          An ascii string of the key to exit on. See the remarks 
  1650.                         below for more information.
  1651.  
  1652.       returnedKey%      Any integer number you would like the PopUpActive 
  1653.                         FUNCTION to return when the exit key is pressed.
  1654.  
  1655.  
  1656.  
  1657.  
  1658. PopUpGetItem FUNCTION Page 28
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.       Returns the number of the menu choice that the scrolling highlight bar 
  1666.       was on when the exit from the menu occurred. Use this FUNCTION when you 
  1667.       need to get the menu choice that the highlight was on when an exit from 
  1668.       the menu was caused by anything other then the user choosing a menu 
  1669.       choice normally (when the user presses an exit key you defined with 
  1670.       PopUpExitKeySet).
  1671.  
  1672.       variable% = PopUpGetItem
  1673.  
  1674.       variable%   Any BASIC integer variable.
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680. PopUpPaint SUB
  1681.  
  1682. This SUB is used internally by the CIMENU2.LIB procedures. There is no reason 
  1683. for your programs to call it directly.
  1684.  
  1685.  
  1686.  
  1687.  
  1688. PopUpPlace SUB
  1689.  
  1690.       Defines the screen location for your pop up menus. Each menu can be set 
  1691.       at any location on the screen. Make sure you allow enough room for your 
  1692.       menu to be placed on the screen. The menus are automaticly sized using 
  1693.       the length of your titles and choices set in the PopUpDefine SUB. You 
  1694.       must use one call to this SUB for each menu you define. You can then 
  1695.       make as many calls to it as you need if you want to place the menu at 
  1696.       different locations on the screen at different times in your program.
  1697.  
  1698.       CALL PopUpPlace(menu%, top%, left%)
  1699.  
  1700.       menu%       The number of the menu to link the screen location to.
  1701.  
  1702.       top%        The top row of the menu location.
  1703.  
  1704.       left%       The left column of the menu location.
  1705.  
  1706.  
  1707.  
  1708.  
  1709. PopUpReset SUB
  1710.  
  1711.       Resets the variables defining a menu and erases it from the menu set 
  1712.       defined. Use this Page 29
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.       SUB if you want to redefine any of the menus at some time during your 
  1719.       program execution. This cleans up the variables so there is no extra 
  1720.       text showing up on your menus that you don't want.
  1721.  
  1722.       CALL PopUpReset(menu%)
  1723.  
  1724.       menu%       The number of the menu you want to erase.
  1725.  
  1726.  
  1727.  
  1728.  
  1729. PopUpSoundSet SUB
  1730.  
  1731.       Sets the sound that notifies the user if they press a wrong key or 
  1732.       select a disabled menu choice. If your using an AT computer make sure 
  1733.       you test the sound length on slower computers as well. A sound length 
  1734.       that works well on your computer might be a long drawn out sound on a 
  1735.       user of an XT. 
  1736.  
  1737.       CALL PopUpSoundSet(soundFreq%, soundLength%)
  1738.  
  1739.       soundFreq%        The tone of the sound to create (50 to 10000).
  1740.  
  1741.       soundLength%      The length that the sound will be played.
  1742.  
  1743.  
  1744.  
  1745.  
  1746. PopUpStateSet SUB
  1747.  
  1748.       Resets the state of a menu choice in any given pop up menu in 
  1749.       CIMENU2.LIB. You can reset the state of the menu choices as many times 
  1750.       as you wish. See PopUpDefine, to initially set the state of the menu 
  1751.       choices.
  1752.  
  1753.       CALL PopUpStateSet(menu%, item%, state%)
  1754.  
  1755.       menu%       The number of the menu that the item is on.
  1756.  
  1757.       item%       The number of the choice of which the state is being reset.
  1758.  
  1759.       state%      What state to set the item to. 0 = disabled, 1 = active. Page 30
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765. CIMENU3.LIB
  1766.  
  1767. This library contains procedures for pop up menus. Unlike the CIMENU2.LIB pop 
  1768. up menus each of these menus are defined at the time of the call and therefore 
  1769. most of the menu variable definitions are not stored in memory. The exception 
  1770. to this is the colors for the menus, they only have to be set once if your 
  1771. using the same colors for all your menus. If your program requires a lot of 
  1772. data variable space these routines allow you a menu with full mouse support 
  1773. and low overhead.
  1774.  
  1775.       Maximum number of menus                   Unlimited - Not held in 
  1776.                                                 memory.
  1777.  
  1778.       Maximum number of menu choices on each menu                 20
  1779.  
  1780.       All arrays passed to any SUB or FUNCTION in the CITOOLS set use a base 
  1781.       of 1. An example would be DIM text$(1 TO n), where n is either the 
  1782.       required boundary limit of the array or any number which meets your 
  1783.       programs needs. The following is a description of the arrays with 
  1784.       required boundaries for the CIMENU3.LIB tool box. The required DIM is 
  1785.       the statement your program must have to pass the array to the SUB or 
  1786.       FUNCTION.
  1787.  
  1788.       Array             SUB or FUNCTION                     Required DIM
  1789.       ________________________________________________________________________
  1790.  
  1791.       choice$()               PopMenu                       (1 TO 20)
  1792.  
  1793.       descript%()             PopDescript                   (1 TO 20)
  1794.  
  1795.       hiPos%()                PopMenu                       (1 TO 20)
  1796.  
  1797.  
  1798.  
  1799.  
  1800. PopColors SUB
  1801.  
  1802.       Sets the colors for the pop up menus. Once defined the colors for the 
  1803.       pop up menus stay in effect until you change them with another call to 
  1804.       PopColors or the your program ends.
  1805.  
  1806.       CALL PopColors(bordFGClr%, bordBGClr%, textFGClr%, textBGClr%, 
  1807.       titleFGClr%, titleBGClr%, hiFGClr%, hiBGClr%, disableFGCLr%, 
  1808.       disableHiFGClr%, hihiFGClr%, hiCharFGClr%)
  1809.  
  1810.       bordFGClr%        Foreground color for the menu border (0 to 15).
  1811.        Page 31
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.        bordBGClr%       Background color for the menu border (0 to 7).
  1818.  
  1819.       textFGClr%        Foreground color for the menu text (0 to 15).
  1820.  
  1821.       textBGClr%        Background color for the menu text (0 to 7).
  1822.  
  1823.       titleFGClr%       Foreground color for the menu title (0 to 15).
  1824.  
  1825.       titleBGClr%       Background color for the menu title (0 to 7).
  1826.  
  1827.       hiFGClr%          Foreground color for the scrolling highlight bar (0 to 
  1828.                         15).
  1829.  
  1830.       hiBGClr%          Background color for the scrolling highlight bar (0 to 
  1831.                         7).
  1832.  
  1833.       disableFGClr%     Foreground color for the disabled menu choices (1 to 
  1834.                         15).
  1835.  
  1836.       disableHiFGClr%   Foreground color for the disabled menu choices when 
  1837.                         the highlight bar is on them (1 to 15).
  1838.  
  1839.       hihiFGClr%        Foreground color for the menu choice quick access 
  1840.                         character when the highlight bar is on it.
  1841.  
  1842.       hiCharFGClr%      Foreground color for the menu choice quick access 
  1843.                         character (1 to 15).
  1844.  
  1845.  
  1846.  
  1847.  
  1848. PopDescript SUB
  1849.  
  1850.       Sets the pop up menu descriptions or help lines for the pop up menus in 
  1851.       CIMENU3.LIB. Define the menu descriptions before calling your menu to 
  1852.       the screen. It's not necessary to have menu descriptions if you don't 
  1853.       want them. The program senses if there are none defined. If you have 
  1854.       already used them and define another menu which you dong want menu 
  1855.       descriptions, use PopReset before defining your new menu.
  1856.  
  1857.       CALL PopDescript(row%, col%, descript$(), areaLength%, hlpFG%, hlpBG%)
  1858.  
  1859.       row%        The screen row to place the description line.
  1860.  
  1861.       col%        The screen column to place the description line.
  1862.  
  1863.       descript$() A string array of the menu descriptions.
  1864. Page 32
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.        areaLength%The length of the area to print the menu descriptions.
  1871.  
  1872.       hlpFG%      Foreground color of the description area.
  1873.  
  1874.       hlpBG%      Background color of the description area.
  1875.  
  1876.  
  1877.  
  1878.  
  1879. PopExitKeySet SUB
  1880.  
  1881.       Creates user defined exit keys for the pop up menus. Up to 5 different 
  1882.       exit keys can be set for each menu. An example ascii string would be 
  1883.       CHR$(27) for the ESCAPE key, or CHR$(0) + CHR$(59) for the F1 key. See 
  1884.       your BASIC reference manual for more details. The return values for the 
  1885.       exit keys are returned by the PopMenu FUNCTION as a negative value of 
  1886.       the key number used to define the exit key. Also note that the ESCAPE 
  1887.       key is always an exit key while using the pop up menus in this library 
  1888.       and does not have to be predefined as one.
  1889.  
  1890.       CALL PopExitKeySet(keyHandle%, exitKey$)
  1891.  
  1892.       keyHandle%  A number between 1 and 5 which is the handle for the exit 
  1893.                   key being defined. If the defined exit key is pressed while 
  1894.                   the menu is active the PopMenu FUNCTION will return a 
  1895.                   negative number of this key handle.
  1896.  
  1897.       exitKey$    A CHR$ ascii string defining the key code of the exit key. 
  1898.                   See remarks below for more information.
  1899.  
  1900.  
  1901.  
  1902.  
  1903. PopMenu FUNCTION
  1904.  
  1905.       Defines and displays the pop up menu. It then takes control of the 
  1906.       program polling for key and mouse events. Once one takes place it passes 
  1907.       back the menu choice selected or the value for the exit key hit. Make 
  1908.       sure you allow enough room on the screen for your menu to be printed. 
  1909.       The width is automaticly set using the title and menu choice text you 
  1910.       define. If the ESCAPE key is pressed the menu is exited and returns a 
  1911.       value of -27. If a predefined exit key is pressed a negative number of 
  1912.       the key handle is passed back (see PopExitKeySet).
  1913.  
  1914.       variable% = PopMenu(top%, left%, choice$(), hiPos%(), title$, shad%, 
  1915.       boxType%)
  1916.  
  1917.       varable%    Any BASIC integer varable.
  1918. Page 33
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.        top%       The top row of the menu screen location.
  1925.  
  1926.       left%       The left column of the menu screen location.
  1927.  
  1928.       choice$()   A text array holding the menu choices. Pass a dash ("-") to 
  1929.                   print a line across the menu.
  1930.  
  1931.       hiPos%()    An integer number array holding the character positions of 
  1932.                   the menu choice quick access characters in the choice$() 
  1933.                   text.
  1934.  
  1935.       title$      The menu title. Pass a null string("") if no title is 
  1936.                   needed.
  1937.  
  1938.       shad%       A number to tell the SUB to print a drop shadow behind the 
  1939.                   menu or not. 0 = no shadow, 1 = shadow.
  1940.  
  1941.       boxType%    An integer number which defines the type of border box to 
  1942.                   use. 0 = no border, 1 = single line border. 
  1943.  
  1944.  
  1945.  
  1946.  
  1947. PopPaint SUB
  1948.  
  1949. This SUB is used internally for you by the procedures. There is no reason for 
  1950. your programs to call it directly.
  1951.  
  1952.  
  1953.  
  1954.  
  1955. PopReset SUB
  1956.  
  1957.       Resets the pop up menu variables. Use the PopReset SUB to clean up the 
  1958.       menu variables in the CIMENU3.LIB.
  1959.  
  1960.       CALL PopReset
  1961. Page 34
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967. CIMENU4.LIB
  1968.  
  1969. This library contains the routines for creating ring or vertical menus. These 
  1970. menus are great for programs which need most of the screen clear at all times 
  1971. but still require a multi level menu system which the user will easily learn. 
  1972. The menu choices and description or help lines can be printed on any screen 
  1973. row which suits your programs needs. As with the other toolbox modules in this 
  1974. CODE-IT set there is complete mouse support built in.
  1975.  
  1976.       Maximum number of menu choices for each
  1977.       menu level                                                  10
  1978.  
  1979.       Maximum number of menu levels                               20
  1980.  
  1981.       All arrays passed to any SUB or FUNCTION in the CITOOLS set use a base 
  1982.       of 1. An example would be DIM text$(1 TO n), where n is either the 
  1983.       required boundary limit of the array or any number which meets your 
  1984.       programs needs. The following is a description of the arrays with 
  1985.       required boundaries for the CIMENU4.LIB tool box. The required DIM is 
  1986.       the statement your program must have to pass the array to the SUB or 
  1987.       FUNCTION.
  1988.  
  1989.       Array                   SUB or FUNCTION                       Required 
  1990.                                                             DIM
  1991.       ________________________________________________________________________
  1992.  
  1993.       descript$()             RingDescript                  (1 TO 10)
  1994.  
  1995.  
  1996.  
  1997.  
  1998. RingActive FUNCTION
  1999.  
  2000.       Takes control of the program waiting for keyboard and mouse events then 
  2001.       passes back the menu choice selected. Most times you will want to 
  2002.       highlight the first menu choice when making the menu active but the 
  2003.       item% parameter allows you to specify any menu choice you would like. Up 
  2004.       to 10 menu levels can be held in memory and ready to use at one time 
  2005.       with up to 10 menu choices on each menu. To first display the menu use 
  2006.       RingOn.
  2007.  
  2008.       variable% = RingActive(menu%, item%)
  2009.  
  2010.       variable%   Any BASIC integer variable.
  2011.  
  2012.       menu%       The number of the menu to make active.
  2013. Page 35
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.        item%      The menu choice to highlight first.
  2020.  
  2021.  
  2022.  
  2023.  
  2024. RingColors SUB
  2025.  
  2026.       Sets the colors for the menu choices. Once set, the color values for the 
  2027.       ring menus stay in effect until you change them or your program ends.
  2028.  
  2029.       CALL RingColors(choiceFG%, choiceBG%, ringHiFG%, ringHiBG%, 
  2030.       ringHiCharFG%, ringHiHiCharFG%)
  2031.  
  2032.       choiceFG%         Foreground color for the menu choices (1 to 15).
  2033.  
  2034.       choiceBG%         Background color for the menu choices (1 to 7).
  2035.  
  2036.       ringHIFG%         Foreground color for the highlighted or selected menu 
  2037.                         choice (1 to 15).
  2038.  
  2039.       ringHiBG%         Background color for the highlighted or selected menu 
  2040.                         choice (1 to 7).
  2041.  
  2042.       ringHiCharFG%     Foreground color for the menu choice quick access 
  2043.                         character (1 to 15).
  2044.  
  2045.       ringHiHiCharFG%   Foreground color for the menu choice quick access 
  2046.                         character (1 to 15).
  2047.  
  2048.  
  2049.  
  2050.  
  2051. RingDefine SUB
  2052.  
  2053.       Defines the menu information for the ring menus. Use one definition for 
  2054.       each menu choice in the menu level being defined. Once defined these 
  2055.       menus stay in memory making it easy to use them at any time during your 
  2056.       program. The first menu choice begins printing at column 3 on the row 
  2057.       you specified and each choice is spaced 2 columns apart. If your menu 
  2058.       choices will not fit on one row the list is truncated.
  2059.  
  2060.       CALL RingDefine(menu%, item%, row%, choice$, hiChar%)
  2061.  
  2062.       menu%       A number between 1 and 10 which is unique for each menu 
  2063.                   level.
  2064.  
  2065.       item%       The number of the menu choice being defined (1 to 10, left 
  2066.                   to right on the Page 36
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.                   menu line).
  2073.  
  2074.       row%        The row to print the menu choices on.
  2075.  
  2076.       choice$     The menu choice text.
  2077.  
  2078.       hiChar%     The number of the character inside the menu choice text of 
  2079.                   the quick access character.
  2080.  
  2081.  
  2082.  
  2083.  
  2084. RingDescript SUB
  2085.  
  2086.       Defines the menu choice descriptions or help lines. The menu 
  2087.       descriptions display anytime the menu choice is highlighted. It is not 
  2088.       necessary to use the menu descriptions if you don't want to, the menus 
  2089.       will operate without them.
  2090.  
  2091.       CALL RingDescript(menu%, row%, col%, areaLength%, descript$(), FG%, BG%)
  2092.  
  2093.       menu%       The menu number to link the descriptions to.
  2094.  
  2095.       row%        The row to print the descriptions in.
  2096.  
  2097.       col%        The column to print the descriptions in.
  2098.  
  2099.       areaLength% The length of the area to print the descriptions in.
  2100.  
  2101.       descript$() A text array containing the descriptions.
  2102.  
  2103.       FG%         Foreground color for the descript area.
  2104.  
  2105.       BG%         Background color for the descript area.
  2106.  
  2107.  
  2108.  
  2109.  
  2110. RingOn SUB
  2111.  
  2112.       Displays the menu predefined choices. The RingActive SUB will display 
  2113.       the menu for you so there is no need for you to use this SUB unless you 
  2114.       want to display a menu before you plan to call the RingActive SUB.
  2115.  
  2116.       CALL RingOn(menu%)
  2117. Page 37
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.        menu%      The number of the menu to display.
  2124.  
  2125.  
  2126.  
  2127.  
  2128. RingSound SUB
  2129.  
  2130.       Sets the sound the user will hear when they press an invalid key. As 
  2131.       with all the sound routines in the CITOOLS set, be aware that the length 
  2132.       of tones developed on an AT computer can seem a lot longer on an XT or 
  2133.       slower machine. It's wise to test your programs on a slower machine 
  2134.       before release.
  2135.  
  2136.       CALL RingSound(soundFreq%, soundLength%)
  2137.  
  2138.       soundFreq%        The tone of the sound to create.
  2139.  
  2140.       soundLength%      The length to play the tone.
  2141. Page 38
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147. CIWIND1.LIB
  2148.  
  2149. The CIWIND1 toolbox is a collection of routines to create data entry (edit 
  2150. field) and button windows. You can combine buttons and edit fields together on 
  2151. the same window if you like. Data entry can be restricted to certain keys in 
  2152. the edit fields and a variety of window buttons are available.
  2153.  
  2154.       Maximum number of windows in memory                   10
  2155.       NOTE: Only windows are kept in memory,
  2156.       not the window buttons and edit fields.
  2157.       See the SUB and FUNCTION Reference 
  2158.       section for more details.
  2159.  
  2160.       Maximum number of buttons per window                  60
  2161.  
  2162.       Maximum number of edit fields per window              40
  2163.  
  2164.  
  2165.  
  2166.  
  2167. ButtonDefine SUB
  2168.  
  2169.       Defines the window button type, actions, and text. It then prints the 
  2170.       button and it's prompt on the window. The best way to get a feel for 
  2171.       using the window buttons is to experiment with them yourself and to 
  2172.       examine the source code file DEMOW1.BAS. 
  2173.  
  2174.       CALL ButtonDefine(wind%, button%, state%, row%, col%, prompt$, btnType%)
  2175.  
  2176.       wind%       The number of the window to put the button on.
  2177.  
  2178.       button%     The unique number of the button being defined.
  2179.  
  2180.       state%      The initial state of the button. 0 = off, 1 = on.
  2181.  
  2182.       row%        The row relative to the top row of the window that the 
  2183.                   button will be put at.
  2184.  
  2185.       col%        The column relative to the left column of the window that 
  2186.                   the button will be put at.
  2187.  
  2188.       prompt$     The text for the button prompt.
  2189.  
  2190.       btnType%    The type of button to use. Use the following values: Page 39
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.       Number            Button Type
  2198.       __________________________________________________________________
  2199.         1               An alert window style toggle button. The buttons are 
  2200.                         surrounded by braces (example..<OK>) which are 
  2201.                         highlighted if the button is on. The TAB key toggles 
  2202.                         between the buttons.
  2203.  
  2204.         2               A dot marker button with the dot encased in 
  2205.                         parenthesis (example..(*) Prompt). The space button 
  2206.                         toggles the button dot on and off.
  2207.  
  2208.         3, 4, 5         These buttons are identical. They produce a button 
  2209.                         which appears like a highlighted pop up menu choice 
  2210.                         which can be used vertical or horizontally. The reason 
  2211.                         for three sets of the same button is that the length 
  2212.                         of the highlight. On each set it is calculated by the 
  2213.                         length of the last prompt passed to the SUB. All 
  2214.                         button prompts need to be padded with spaces to be the 
  2215.                         same length (example.."Blue       ", "Bright Blue"). 
  2216.                         Having different sets allow you to place vertical and 
  2217.                         horizontal buttons on the same window. See the source 
  2218.                         code file DEMOW1.BAS included in the CITOOLS disk set.
  2219.  
  2220.       6                 An invisible button which can be used to make any part 
  2221.                         of the active window a "hot spot". When the left mouse 
  2222.                         button is clicked and the mouse cursor is on this area 
  2223.                         the window is exited as if any other button was 
  2224.                         pressed.
  2225.  
  2226.  
  2227.  
  2228.  
  2229. ButtonGet FUNCTION
  2230.  
  2231.       Returns the state of the button requested. Use the ButtonGet FUNCTION to 
  2232.       get the contents of the window buttons when the window os closed or 
  2233.       before crating a new window.
  2234.  
  2235.       variable% = ButtonGet(button%)
  2236.  
  2237.       variable%   Any BASIC integer variable. Will hold a value of 0 if the 
  2238.                   button is off and 1 if the button is on.
  2239.  
  2240.       button%     The number of the button to get the information on 
  2241.                   (originally defined with ButtonDefine, see Page 44).
  2242.  
  2243.  
  2244. Page 40
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250. ButtonReset SUB
  2251.  
  2252.       Resets the button variables in CIWIND1.LIB to 0's or null strings. Use 
  2253.       this SUB to clean up the button variables before creating a new window. 
  2254.       Make sure to use the ButtonGet FUNCTION if you need the state of the 
  2255.       buttons before you reset them.
  2256.  
  2257.       CALL ButtonReset
  2258.  
  2259.  
  2260.  
  2261.  
  2262. ButtonStateSet SUB
  2263.  
  2264. This SUB is handled automaticly for you by the other routines in the 
  2265. CIWIND1.LIB. There is no reason to call it directly.
  2266.  
  2267.  
  2268.  
  2269.  
  2270. ButtonToggle SUB
  2271.  
  2272.       Toggles the window buttons between 0 off and 1 on. Use the ButtonToggle 
  2273.       SUB to change the state of the buttons on the current window. The type 
  2274.       1, 3 and 4 buttons are automaticly handled for you in the WindowActive 
  2275.       SUB so it's not necessary to use this SUB for those buttons unless you 
  2276.       want to apply a special toggle point. For a description of the button 
  2277.       types see ButtonDefine.
  2278.  
  2279.       CALL ButtonToggle(button%)
  2280.  
  2281.       button%     The number of the button to toggle. Use the same number as 
  2282.                   used to define the button with the ButtonDefine SUB (see 
  2283.                   Page 44).
  2284.  
  2285.  
  2286.  
  2287.  
  2288. EditFieldColors SUB
  2289.  
  2290.       Defines the colors used for the edit field. The colors defined with SUB 
  2291.       effect the edit field only, not the edit field prompt.
  2292.  
  2293.       CALL EditFieldColors(fldFGClr%, fldBGClr%)
  2294.  
  2295.       fldFGClr%   Foreground color for the edit field (1 to 15).
  2296. Page 41
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.        fldBGClr%  Background color for the edit field (1 to 7).
  2303.  
  2304.  
  2305.  
  2306.  
  2307. EditFieldDefine SUB
  2308.  
  2309.       Defines and prints the edit fields and their prompts for the active 
  2310.       window. A maximum of 255 characters can be entered for each edit field. 
  2311.       If the length of the string defined in maxchar% is longer than the 
  2312.       length of the vischar% variable the edit field will scroll until it 
  2313.       reaches the value in maxchar%, allowing you to put large amounts of data 
  2314.       in a small area.
  2315.  
  2316.       CALL EditFieldDefine(wind%, fld%, text$, row%, col%, vischar%, maxchar%, 
  2317.       prompt$, format%)
  2318.  
  2319.       wind%       The number of the active window to print the edit field on.
  2320.  
  2321.       fld%        The number of the edit field. Each field needs a unique 
  2322.                   number.
  2323.  
  2324.       text$       The initial contents for the edit field. Needs to be a 
  2325.                   string. This text will be first printed in the edit field 
  2326.                   area and then can be edited by selecting the field.
  2327.  
  2328.       row%        The row relative to the upper row of the window to print the 
  2329.                   edit field and prompt on.
  2330.  
  2331.       col%        The column relative to the left column of the window to 
  2332.                   print the edit field and prompt on.
  2333.  
  2334.       vischar%    The number of visible characters to display in the edit 
  2335.                   field. See the remarks below for more information.
  2336.  
  2337.       maxchar%    The maximum number of characters to allow in the edit field. 
  2338.                   See the remarks below for more information.
  2339.  
  2340.       prompt$     The edit field prompt text.
  2341.  
  2342.       format%     A number macro which tells the data entry restrictions for 
  2343.                   the edit field. Use the following values:
  2344.  
  2345.       Value             Entries Allowed         
  2346.       __________________________________________________________________
  2347.          1              All printable characters. Page 42
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.          2              Alphabetical characters only.
  2355.  
  2356.          3              Numerical characters only (positive and negative). The 
  2357.                         negative sign("-") can be entered anywhere in the 
  2358.                         string and is automaticly moved to the beginning.
  2359.  
  2360.          4              Numerical with decimal points (positive and negative). 
  2361.                         The negative sign("-") can be entered anywhere in the 
  2362.                         string and is automaticly moved to the beginning.
  2363.  
  2364.          5              Same as 3 with the "-" character allowed anywhere in 
  2365.                         the string.
  2366.  
  2367.          6              Same as 3 with the "/" character allowed anywhere in 
  2368.                         the string.
  2369.  
  2370.          7              Same as 3 with the "-" and "()" characters allowed 
  2371.                         anywhere in the string.
  2372.  
  2373.         10              Same as 1 but outputs in all upper case.
  2374.  
  2375.         20              Same as 2 but outputs in all upper case.
  2376.  
  2377.        100              Same as 1 but spaces are not allowed.
  2378.  
  2379.        110              Same as 10 but spaces are not allowed.
  2380.  
  2381.        200              Same as 2 but spaces are not allowed.
  2382.  
  2383.        220              Same as 20 but spaces are not allowed.
  2384.  
  2385.  
  2386.  
  2387.  
  2388. EditFieldGet FUNCTION
  2389.  
  2390.       Returns the contents of the edit field requested. Use this SUB to get 
  2391.       the contents of any edit field on the active window.
  2392.  
  2393.       variable$ = EditFieldGet(fld%)
  2394.  
  2395.       variable$   Any BASIC string variable.
  2396.  
  2397.       fld%        The number of the edit field to get.
  2398.  
  2399. Page 43
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407. WindowActive SUB
  2408.  
  2409.       Takes control of the program processing key and mouse events on the 
  2410.       active window at the button or edit field given in the windItem% 
  2411.       variable. To get the event which caused the exit from the WindowActive 
  2412.       SUB use WindowEvent. The source code file DEMOW1.BAS included with the 
  2413.       CITOOLS set shows a full example of how to use this SUB to control your 
  2414.       windows.
  2415.  
  2416.       CALL WindowActive(windItem%)
  2417.  
  2418.       windItem%   An integer number of the edit field or button to go to and 
  2419.                   wait for a window event to take place.
  2420.  
  2421.  
  2422.  
  2423.  
  2424. WindowColors SUB
  2425.  
  2426.       Sets the colors for the windows created using the routines in 
  2427.       CIWIND1.LIB. The colors set with this SUB only effect the windows for 
  2428.       the CIWIND1.LIB. To set the colors for the edit field data entry areas 
  2429.       use the EditFieldColors SUB.
  2430.  
  2431.       CALL WindowColors(bordFGClr%, bordBGClr%, textFGClr%, textBGClr%, 
  2432.       titleFGCr%, titleBGClr%, hiFGClr%, hiBGClr%)
  2433.  
  2434.       bordFGClr%  Foreground color for the window border (1 to 15)
  2435.  
  2436.       bordBGClr%  Background color for the window border (1 to 7).
  2437.  
  2438.       textFGClr%  Foreground color for the window text (1 to 15).
  2439.  
  2440.       textBGClr%  Background color for the window text (1 to 7).
  2441.  
  2442.       titleFGClr% Foreground color for the window title (1 to 15).
  2443.  
  2444.       titleBGClr% Background color for the window title (1 to 7).
  2445.  
  2446.       hiFGClr%    Foreground color for the window buttons which use a 
  2447.                   highlight (1 to 15).
  2448.  
  2449.       hiBGClr%    Background color for the window buttons which use a 
  2450.                   highlighted background (1 to 7).
  2451.  
  2452. Page 44
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460. WindowDefine SUB
  2461.  
  2462.       Defines the values for a given window to be displayed using WindowOn. 
  2463.       Using a window number allows you to store a commonly sized and/or styled 
  2464.       window in memory then pull it up for many different uses without having 
  2465.       to redefine it. Only the window definitions defined with this SUB remain 
  2466.       in memory, not the buttons and edit fields. Up to 10 window definitions 
  2467.       can be held in memory at one time.
  2468.  
  2469.       CALL WindowDefine(wind%, left%, right%, top%, bottom%, title$, shad%, 
  2470.       borderType%)
  2471.  
  2472.       wind%       A number between 1 and 10 for the window being defined.
  2473.  
  2474.       left%       The left screen column of the window.
  2475.  
  2476.       right%      The right screen column of the window.
  2477.  
  2478.       top%        The top screen row of the window.
  2479.  
  2480.       bottom%     The bottom screen row of the window.
  2481.  
  2482.       title$      The title text for the window.If none pass a null string 
  2483.                   (""). The title is printed in the center of the top row on 
  2484.                   the window.
  2485.  
  2486.       shad%       A number telling the SUB to put a drop shadow behind the 
  2487.                   window or not. 0 = no shadow, 1 = use a shadow.
  2488.  
  2489.       borderType% A number telling the SUB the type of border to use for the 
  2490.                   window. Use the following values:
  2491.  
  2492.       Value             Border
  2493.       _______________________________________________________
  2494.         0               No border.
  2495.  
  2496.         1               A single line border.
  2497.  
  2498.         2               A double line border.
  2499.  
  2500.         3               A solid border.
  2501.  
  2502.  
  2503.  
  2504. Page 45
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510. WindowDrawBox SUB
  2511.  
  2512.       Draws a box anywhere in the active window. All the dimensions of the box 
  2513.       are defined relative to the window the box is being put on. If you 
  2514.       specified the top row as 2 the box will begin at the second row down 
  2515.       from the top of the window not the second row of the screen.
  2516.  
  2517.       CALL WindowDrawBox(wind%, left%, right%, top%, bottom%, boxType%)
  2518.  
  2519.       wind%       The number of the active window to draw the box in.
  2520.  
  2521.       left%       The left column of the box relative to the window area not 
  2522.                   the screen.
  2523.  
  2524.       right%      The right column of the box relative to the window not the 
  2525.                   screen.
  2526.  
  2527.       top%        The top row of the box relative to the window not the 
  2528.                   screen.
  2529.  
  2530.       bottom%     The bottom row of the box relative to the window not the 
  2531.                   screen.
  2532.  
  2533.       boxType%    The type of box to print. Use the following values:
  2534.  
  2535.       Value             Box Type
  2536.       __________________________________________________________________
  2537.         1               A single line box.
  2538.  
  2539.         2               A double line box.
  2540.  
  2541.         3               A solid border box.
  2542.  
  2543.  
  2544.  
  2545.  
  2546. WindowDrawLine SUB
  2547.  
  2548.       Draws a line horizontally across the window at the given row. The 
  2549.       character used to print the line can be any printable ascii character 
  2550.       including extended characters. To make it easier to print single or 
  2551.       double lines across the window the SUB will also accept two macros, "s" 
  2552.       for a single line and "d" for a double line.
  2553.  
  2554.       CALL WindowDrawLine(wind%, row%, char$)
  2555.  
  2556.       wind%       The number of the window to print the line on.
  2557.  
  2558.       row%        The row relative to the top row of the window to print the 
  2559.                   line on. Page 46
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.       char$       The character to use when drawing the line.
  2567.  
  2568.  
  2569.  
  2570.  
  2571. WindowEvent FUNCTION
  2572.  
  2573.       Returns the event which last occurred on the active window. It is 
  2574.       suggested that you look at the source code for DEMOW1.BAS included with 
  2575.       the CITOOLS set to get an idea of how to use this SUB to poll for window 
  2576.       events.
  2577.  
  2578.       variable% = WindowEvent(switch%)
  2579.  
  2580.       variable%   Any BASIC integer variable.
  2581.  
  2582.       switch%     An integer number which defines the event to poll for. 
  2583.  
  2584.       Value             Returns
  2585.       ________________________________________________________________________
  2586.  
  2587.         0               The event which occurred in the window. 0 = No event 
  2588.                         took place 1 = A mouse event took place. 2 = A 
  2589.                         keyboard event took place.
  2590.  
  2591.         1               The number of the button or edit field that the left 
  2592.                         mouse button was clicked on or 100 if the mouse was 
  2593.                         clicked on the pull down menu bar (see WindowToPull, 
  2594.                         Page 56)
  2595.  
  2596.         2               A macro for the key which was pressed.
  2597.                         1 = ENTER
  2598.                         2 = ESCAPE
  2599.                         3 = TAB
  2600.                         4 = SHIFT TAB
  2601.                         5 = UP ARROW
  2602.                         6 = DOWN ARROW
  2603.                         7 = SPACE BAR
  2604.                         8 = LEFT ARROW
  2605.                         9 = RIGHT ARROW
  2606.                         11 through 20 = F1 through F10
  2607.                         21 = HOME
  2608.                         22 = END
  2609.                         100= ALT KEY (See WindowToPull, Page 56)
  2610.  
  2611.  
  2612.  
  2613. Page 47
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619. WindowOff SUB
  2620.  
  2621.       Erases the given window from the screen restoring the original 
  2622.       background. Use this SUB whenever you want to close the current window 
  2623.       displayed with WindowOn.
  2624.  
  2625.       CALL WindowOff(wind%)
  2626.  
  2627.       wind%       The number of the active window to erase.
  2628.  
  2629.  
  2630.  
  2631.  
  2632. WindowOn SUB
  2633.  
  2634.       Displays the defined window on the screen. Use the WindowOn SUB to 
  2635.       display the window before placing buttons, edit fields, text, etc., on 
  2636.       it. To erase the window use  WindowOff.
  2637.  
  2638.       CALL WindowOn(wind%)
  2639.  
  2640.       wind%       The number of the defined window to display.
  2641.  
  2642.  
  2643.  
  2644.  
  2645. WindowPaint SUB
  2646.  
  2647. This SUB is used internally for you by the other routines in the CIWIND1.LIB. 
  2648. There is no reason for you to call it directly.
  2649.  
  2650.  
  2651.  
  2652.  
  2653. WindowPrint SUB
  2654.  
  2655.       Prints text at any given place in the active window. Use the WindowPrint 
  2656.       SUB to print any text in the active window other than buttons or edit 
  2657.       fields.
  2658.  
  2659.       CALL WindowPrint(wind%, row%, col%, text$, style%)
  2660.  
  2661.       wind%       The number of the active window to print the text on.
  2662.  
  2663.       row%        The row relative to the top row of the window to print the 
  2664.                   text at.
  2665. Page 48
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.        col%       The column relative to the left column of the window to 
  2672.                   print the text at.
  2673.  
  2674.       text$       The text to print.
  2675.  
  2676.       style%      The style format to use to print the text. Use the following 
  2677.                   values:
  2678.  
  2679.       Value             Style
  2680.       __________________________________________________________________
  2681.         1               Prints the text at the given row and column. Text is 
  2682.                         truncated if it's longer than the window.
  2683.  
  2684.         2               Centers the text left to right in the window.
  2685.  
  2686.  
  2687.  
  2688.  
  2689. WindowSoundSet SUB
  2690.  
  2691.       Defines the sound made when the user presses an invalid key. As with all 
  2692.       the sound routines included with the CITOOLS set make sure to check the 
  2693.       sound length on slower computers if your developing on an AT. Sometimes 
  2694.       a sound which works well on an AT will be very long and annoying on an 
  2695.       XT.
  2696.  
  2697.       CALL WindowSoundSet(soundFreq%, soundLength%)
  2698.  
  2699.       soundFreq%        An integer number between 50 and 10,000 which defines 
  2700.                         the tone to sound.
  2701.  
  2702.       soundLength%      The length to play the tone.
  2703.  
  2704.  
  2705.  
  2706.  
  2707. WindowToPull SUB
  2708.  
  2709.       Allows windows to call pull down menus form CIMENU1.LIB. Setting this 
  2710.       switch to 1 causes a detectable exit from the data window when the ALT 
  2711.       key is pressed or the left mouse button is pressed while the mouse 
  2712.       cursor is on column 1. The calling of the pull down menu can be done 
  2713.       while still leaving the data window active (see the demo program 
  2714.       DEMOMW.BAS on the distribution disks).
  2715.  
  2716.       CALL WindowToPull(OnOff%)
  2717.  
  2718.       OnOff%            Set to 1 to activate the calling of pull down menus, 
  2719.                         and to 0 to turn it off. Page 49
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725. CIWIND2.LIB
  2726.  
  2727. This is really a specialty window toolbox. The windows in this set allow a 
  2728. great user interface for getting information from the user at very minimal 
  2729. code. They include alert windows, scrolling list windows, scrolling tag 
  2730. windows, and text windows.
  2731.  
  2732.       All arrays passed to any SUB or FUNCTION in the CITOOLS set use a base 
  2733.       of 1. An example would be DIM text$(1 TO n), where n is either the 
  2734.       required boundary limit of the array or any number which meets your 
  2735.       programs needs. The following is a description of the arrays with 
  2736.       required boundaries for the CIMENU2.LIB tool box. The required DIM is 
  2737.       the statement your program must have to pass the array to the SUB or 
  2738.       FUNCTION.
  2739.  
  2740.       Array                   SUB or FUNCTION               Required DIM
  2741.       ________________________________________________________________________
  2742.  
  2743.       The arrays in the CIWIND2.LIB take on the same upper dimensions as the 
  2744.       arrays you pass to them. The only requirement is that they have a base 
  2745.       of 1. See above paragraph for details.
  2746.  
  2747.  
  2748.  
  2749.  
  2750. AlertWindow FUNCTION
  2751.  
  2752.       Puts an alert window on the screen and waits for the user to select a 
  2753.       button. It then erases the window and passes back the number of the 
  2754.       button that was pressed. The alert window is automaticly sized for you 
  2755.       using the length of the longest member in the text$() array. Up to three 
  2756.       buttons can be defined. The buttons are toggle buttons printed at the 
  2757.       bottom of the window and the chosen button is indicated by it's braces 
  2758.       ("< OK >") being highlighted. The TAB key toggles the buttons and the 
  2759.       ENTER key accepts the currently highlighted button. If the user has a 
  2760.       mouse they can also select any of the buttons by clicking the left 
  2761.       button while the mouse cursor is on it.
  2762.  
  2763.       variable% = AlertWindow(top%, left%, text$(), title$, shad%, boxType%, 
  2764.       btn1$, btn2$, btn3$, FG%, BG%, HiFG%)
  2765.  
  2766.       variable%   Any BASIC integer variable name.
  2767.  
  2768.       top%        The top screen row to print the window at.
  2769.  
  2770.       left%       The left screen column to print the window at.
  2771. Page 50
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.        text$()    An array of the text to display in the window. Text is left 
  2778.                   justified in the window. To center the text in the window 
  2779.                   place a "|" character at the end of the text string in the 
  2780.                   array.
  2781.  
  2782.       title$      The title string to print on the window. Use a null string 
  2783.                   ("") if you don't want a title.
  2784.  
  2785.       shad%       A number telling if a drop shadow is to be printed behind 
  2786.                   the window. 0 = no shadow, 1 = use a shadow.
  2787.  
  2788.       boxType%    A number which defines the type of border box to put on the 
  2789.                   window. 0 = no border box, 1 = a single line box, 2 = a 
  2790.                   double line box.
  2791.  
  2792.       btn1$, btn2$, btn3$Text for the buttons.
  2793.  
  2794.       FG%         Foreground color for the window.
  2795.  
  2796.       BG%         Background color for the window.
  2797.  
  2798.       HiFG%       Foreground color for the button highlights.
  2799.  
  2800.  
  2801.  
  2802.  
  2803. ScrollWindow FUNCTION
  2804.  
  2805.       Places a scrolling list window on the screen. By using the arrows the 
  2806.       user can scroll through the text in the window and select a choice. The 
  2807.       number of the selected array member is passed back. The scrolling list 
  2808.       window acts similar to a pop up menu in that you use the arrow keys to 
  2809.       scroll through the choices of text lines. Unlike pop up menus though you 
  2810.       can use choice or text lists longer than will fit in the window and 
  2811.       scroll the list down or up in the window accordingly. When ENTER is 
  2812.       pressed the number of the highlighted array member (from the list$() 
  2813.       array) os passed back to the program. If ESCAPE is pressed a value of 0 
  2814.       is passed back.
  2815.  
  2816.       variable% = ScrollWindow(left%, right%, top%, bottom%, list$(), title$, 
  2817.       shad%, boxType%, FG%, BG%, HiFG%, HiBG%)
  2818.  
  2819.       variable%   Any BASIC integer variable.
  2820.  
  2821.       left%       The left screen column of the list window.
  2822.  
  2823.       right%      The right screen column of the list window.
  2824. Page 51
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.        top%       The top screen row of the list window.
  2831.  
  2832.       bottom%     The bottom screen row of the list window.
  2833.  
  2834.       list$()     A text array with the strings to display in the list window. 
  2835.                   Each member is printed on a separate line.
  2836.  
  2837.       title$      The title string for the window. It will print in the center 
  2838.                   of the top row.
  2839.  
  2840.       shad%       A number telling the FUNCTION to print a drop shadow behind 
  2841.                   the window or not. 0 = no shadow, 1 = use a shadow.
  2842.  
  2843.       boxType%    A number describing the type of border box to use. 0 = none, 
  2844.                   1 = a single line border box, 2 = a double line border box.
  2845.  
  2846.       FG%         Foreground color of the list window.
  2847.  
  2848.       BG%         Background color of the list window.
  2849.  
  2850.       HiFG%       Foreground color for the scrolling highlight bar.
  2851.  
  2852.       HiBG%       Background color for the scrolling highlight bar.
  2853.  
  2854.  
  2855.  
  2856. TagWindow FUNCTION
  2857.  
  2858.       Places a scrolling list window on the screen. The user scrolls through 
  2859.       the list using the arrow keys and can tag the items in the window using 
  2860.       the space bar. It returns the key which was pressed to exit from the tag 
  2861.       window (1 = ENTER, 2 = ESCAPE). The list$() and tagList%() arrays need 
  2862.       to be dimentiond the same and use a base of 1 (ie: list$(1 TO n) where n 
  2863.       is any number your program needs). The tagList%() array members hold 
  2864.       either a 0 or a 1 indicating if the item is tagged or not (0 = not 
  2865.       tagged, 1 = tagged) and the member corresponds to the same member in the 
  2866.       list$() array. Example: if tagList%(10) = 1 then list$(10) has been 
  2867.       tagged by the user. See the DEMOW2.BAS source code file for an example 
  2868.       of the TagWindow FUNCTION.
  2869.  
  2870.       variable% = TagWindow(left%, right%, top%, bottom%, list$(), title$, 
  2871.       shad%, boxType%, FG%, BG%, HiFG%, HiBG%, tagList%(), tagChar$)
  2872.  
  2873.       variable%   Any BASIC integer variable.
  2874.  
  2875.       left%       The left screen column of the list window.
  2876. Page 52
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.        right%     The right screen column of the list window.
  2883.  
  2884.       top%        The top screen row of the list window.
  2885.  
  2886.       bottom%     The bottom screen row of the list window.
  2887.  
  2888.       list$()     A text array with the strings to display in the list window. 
  2889.                   Each member is printed on a separate line.
  2890.  
  2891.       title$      The title string for the window. It will print in the center 
  2892.                   of the top row.
  2893.  
  2894.       shad%       A number telling the FUNCTION to print a drop shadow behind 
  2895.                   the window or not. 0 = no shadow, 1 = use a shadow.
  2896.  
  2897.       boxType%    A number describing the type of border box to use. 0 = none, 
  2898.                   1 = a single line border box, 2 = a double line border box.
  2899.  
  2900.       FG%         Foreground color of the list window.
  2901.  
  2902.       BG%         Background color of the list window.
  2903.  
  2904.       HiFG%       Foreground color for the scrolling highlight bar.
  2905.  
  2906.       HiBG%       Background color for the scrolling highlight bar.
  2907.  
  2908.       tagList%()  An integer array that serves two purposes. First, when the 
  2909.                   FUNCTION is called this can contain the array members to 
  2910.                   initially display tagged. Second, when the window is exited 
  2911.                   this array will contain the updated tag members. See Remarks 
  2912.                   below for details on arrays.
  2913.  
  2914.       tagChar$    The character to display beside a tagged item in the window. 
  2915.                   This can be any printable ascii character.
  2916.  
  2917.  
  2918.  
  2919.  
  2920. TextWindow SUB
  2921.  
  2922.       Puts a window displaying text on the screen such as a help window. The 
  2923.       text window is automaticly sized using title or the longest member in 
  2924.       the text$() array. If the saveSwitch% has a value of 1 the window pauses 
  2925.       and waits for the user to press a key or mouse button. Pressing any key 
  2926.       or the left mouse button causes an exit from the window. Using the 
  2927.       saveSwitch% you can determine when and if the window is to be visible. 
  2928.       To manually save and restore the screen area use the ScreenSave and Page 53
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.       ScreenRestore SUB's in the CITOOLS.LIB.
  2935.  
  2936.       CALL TextWindow(top%, left%, text$(), title$, shad%, boxType%, 
  2937.       saveSwitch%, FG%, BG%)
  2938.  
  2939.       top%        The top screen row of the window.
  2940.  
  2941.       left%       The left screen column of the window.
  2942.  
  2943.       text$()     An array of the text to display in the window. By default 
  2944.                   the text is left justified. Use a "|" character as the last 
  2945.                   character in the array member string to center the line left 
  2946.                   to right in the window.
  2947.  
  2948.       title$      A string of the title to display centered on the top row. 
  2949.                   Pass a null string ("") if no title is needed.
  2950.  
  2951.       shad%       A number telling the SUB if a drop shadow is to be printed 
  2952.                   behind the window or not. 0 = no shadow, 1 = use a shadow.
  2953.  
  2954.       boxType%    The type of border box to use. 0 = none, 1 = a single line, 
  2955.                   2 = a double line.
  2956.  
  2957.       saveSwitch% An number telling the SUB if you want the window area to be 
  2958.                   saved before the window is displayed and restored when the 
  2959.                   SUB is exited. 0 = don't save and restore, 1 = save and 
  2960.                   restore.
  2961.  
  2962.       FG%         Foreground color for the text window.
  2963.  
  2964.       BG%         Background color for the text window.
  2965.