home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / basic / PULDOWN.ZIP / INTRO.DOC < prev    next >
Encoding:
Text File  |  1991-07-11  |  11.0 KB  |  249 lines

  1.  
  2.  
  3.                        ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  4.                        █ PULDOWN MANUAL █
  5.                        ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  6.  
  7.                         WHAT IS PULDOWN?
  8.  
  9. PULDOWN is a programming tool that generates customized menus for QB programs.
  10. The generated menus function in essentially the same way as the QuickBASIC
  11. menu, as demonstrated by running DEMO.BAT, and can be used either in the
  12. QuickBASIC environment or in a compiled program.
  13.  
  14.                     WHY THE QuickBASIC MENU?
  15.  
  16. If you're reading this, you must be a QuickBASIC programmer, and chances are
  17. that--like me--you love QuickBASIC, and have come to recognize that the
  18. QuickBASIC menu may well be the ultimate in keyboard driven menu systems
  19. for power, flexibility and ease of use. And, it's as handy with a mouse
  20. as you can wish. Chances are that even if you've been using QuickBASIC for
  21. a long time, you're still not aware of all the capabilities of its menu
  22. system. I know I wasn't until I started writing this program.
  23. In addition, the QB menu is part of the standard Microsoft menu family,
  24. which has become the leading standard in the DOS world, and the only
  25. standard in Windows.
  26.  
  27.                            WHY PULDOWN?
  28.  
  29. PULDOWN is written in assembly language, and you just can't touch that
  30. for speed and compactness. PULDOWN.LIB, the compile module, is a mere 4.4K.
  31. In QB, it would probably take 30K or more, in C, 20+. And I've tried to make
  32. PULDOWN as easy to use as possible--there's not a single command or argument
  33. name to memorize.
  34.  
  35.                               AND IT'S FREE
  36.  
  37. And it's free. Not cheap, mind you--it cost me plenty in time and aggravation.
  38. Why do I give it away? Because I love doing this. I'm an amateur programmer,
  39. and trying to get money for it would spoil the fun.
  40.  
  41.                           IS PULDOWN TOO MUCH?
  42.  
  43. It can be. Puldown is a heavy-duty menu system that can put well over 500
  44. second-level menu items on the screen. Not that anybody would want to--
  45. anything over 40-50 gets too cumbersome to be useful. PULDOWN is meant for a
  46. menu with 4-7 first level items and 20-50 at the second level. That's for a
  47. program of at least medium complexity. If your program doesn't need to select
  48. between more than a total of 6-8 menu items, you might be better off skipping
  49. PULDOWN.
  50.  
  51.                           ONLY ONE KIND OF MENU?
  52.  
  53. Yes. Unlike some other menu generating packages, you only get one kind: the
  54. kind that sits on a bar at the top of the screen. You don't get menus that
  55. play hide-and-seek all over the screen, or explode, or make funny noises.
  56. If you don't need that kind of menu--and you certainly don't when you use
  57. QB or most other modern software packages, then PULDOWN is for you.
  58.  
  59.  
  60.                           WHAT FILES DO YOU NEED?
  61.  
  62. This package contains 7 files. It is important for you to know something
  63. about them, and which of them you may need:
  64.  
  65.         MAKEPUL.BAS is the program that generates the QB code for calling
  66.         the PULDOWN function. This is where you tell PULDOWN what your menu
  67.         will look like and what it will contain.
  68.  
  69.         TUTORIAL.BAS is a sample QB program. It has extensive comments and  
  70.         step-by-step instructions. You can use it as an alternative to
  71.         MAKEPUL to create your menu, or as a reference.
  72.  
  73.         PULDOWN.QLB is a QuickLibrary file that contains PULDOWN's "engine".
  74.         It is useful only when a program that uses PULDOWN is running in the
  75.         QuickBASIC environment.
  76.  
  77.         PULDOWN.LIB is essentially the same as PULDOWN.QLB. It is a "library
  78.         module" that is used when a QuickBASIC program is compiled to
  79.         an EXE file.
  80.  
  81.         PULDEMO.EXE is a standalone program that demonstrates what PULDOWN
  82.         does. Its source code is essentially the same as that for
  83.         PULDOWN.BAS + PULDOWN.QLB/LIB, but it is entirely in asm. Please
  84.         activate it with DEMO.BAT, at least the first time.
  85.  
  86.         PULDOWN.OBJ is the object file from which PULDOWN.QLB/LIB derive. It
  87.         is useful only when PULDOWN needs to be linked to other library
  88.         modules (If you're not sure what that means, then you need not worry
  89.         about it anyway)
  90.  
  91.         INTRO.DOC is this file.
  92.              
  93.  
  94. ------------------------█████ ESSENTIAL: █████--------------------------------
  95.  
  96. Whenever you work with PULDOWN, you must load QB thus:
  97.  
  98.                 qb /l puldown
  99.  
  100. ------------------------------------------------------------------------------
  101.  
  102.                             GETTING STARTED
  103.  
  104. The quick start is to copy: MAKEPUL.BAS, PULDOWN.QLB, PULDOWN.LIB to your
  105. QB directory. Load and run MAKEPUL.  The use of this program is self evident,
  106. but you may need one run-through to see what it does. Don't sweat any
  107. mistakes, there are editing and redo provisions. And if the final product
  108. is not to your liking, just run it again.
  109.  
  110. MAKEPUL will create a text file, PULDOWN.INC, which contains all the
  111. necessary QB code, declarations, variables, etc. All that you need to do
  112. is to incorporate the file into your QB program--MAKEPUL gives more details
  113. on that.
  114.  
  115. PLEASE NOTE that MAKEPUL will give its output file the same name every time.
  116. That means that if you create a second, different menu, the include file for
  117. the first menu will be overwritten! Presumably, by then its contents will
  118. have been copied to your program, but if you wish to avoid overwriting it,
  119. either rename the first include file, or change the name of the output file
  120. in the source code.
  121.  
  122. Once MAKEPUL.INC's contents are in your program, PULDOWN is ready to run in
  123. the QB environment or to compile (provided you've loaded with  L/PULDOWN).
  124. But one more step needs to be taken to make it useful: PULDOWN appears in
  125. the QB code as a function named PULL that returns the value RETVAL%, an
  126. integer number. It is this number that tells your program what menu item
  127. was selected, and it is your job to write the code to sort this out.
  128. An example of how to do it can be found in TUTORIAL.BAS.
  129.  
  130. RETVAL can have one of four different kinds of values:
  131.  
  132.         1. The first kind consists exclusively of the number 1. This means
  133.            that the user has pressed ESC and exited the menu without taking
  134.            action.
  135.  
  136.         2. The second range is 64 to 90. This means that Ctrl+Char has been
  137.            pressed. 65 through 90 are normal ascii codes: A-Z and a-z.
  138.            64 means that a non-letter character has been pressed with Ctrl.
  139.  
  140.         3. The third group includes 159-168. They represent the function
  141.            keys F1-F10.
  142.  
  143.         4. When RETVAL is greater than 168, it represents the address of the
  144.            menu item that was selected. PEEKing RETVAL will produce the actual
  145.            menu item.
  146.  
  147.  
  148. Details on and examples of all of the above are provided in TUTORIAL.BAS.
  149. You can cut and paste the relevant code into your program and adapt it.
  150. Search for RETVAL%.
  151.  
  152.                             ALTERNATIVE METHOD
  153.  
  154. Another way you can generate a custom menu is to use TUTORIAL.BAS instead of
  155. MAKEPUL. (Or you can, indeed, use a combination of both). The advantage of
  156. MAKEPUL is its much greater ease and speed. But it does have some
  157. limitations. For example, it limits the number of items in a pull down
  158. menu to eight, and, if you run it in a mono system, it will not let you
  159. choose the colors. TUTORIAL.BAS, on the other hand, has the advantage of
  160. explaining what's going on, and is a working, though minimal, program. So
  161. that you can simply lift it or parts of it into your own code.
  162.  
  163.                                MOUSE NOTES
  164.                          
  165. PULDOWN 2.0 is equipped with cat whiskers to detect and catch mice. Its mouse
  166. functions are extremely simple: a left click will select and activate an item.
  167.  
  168.                              PROGRAMMING NOTES
  169.  
  170. PULDOWN stores pull down menu items in a 1000 byte buffer, which sets an
  171. upper limit to the number of characters and spaces that can be used in the
  172. pull down menus (the bar menu items have their own storage, and are not of
  173. concern). It's unlikely a program would push this limit, but a formula for
  174. figuring out the fit is in TUTORIAL.BAS.
  175.  
  176. The Int 9h (keyboard) vector is hooked while PULDOWN is active in order to
  177. trap the Alt key. The interrupt is momentarily diverted, and then returned
  178. to its proper handler. A TSR that also hooks Int 9h should not be a problem,
  179. but if one does arise, this is a good place to look.
  180.  
  181. If your program sets up a mouse handler prior to invoking PULDOWN, you should
  182. know that PULDOWN disables any existing mouse handlers, saves the state, and
  183. restores it upon exit. A save state buffer is used that should be large
  184. enough for all contingencies, but if mouse conflicts occur, the fault may lie
  185. here. Let me know.
  186.  
  187.                               COMPATIBILITY
  188.  
  189. PULDOWN has been tested on XT clones, a 286 and 386 system, and with DOS 2.1
  190. to 3.3. That's only a fraction of the possible machine/OS combinations, but
  191. so far it's worked wherever it's been tested.
  192.  
  193. PULDOWN is designed for QuickBASIC (version 4.5 to be specific). I don't know
  194. whether it will work with older QuickBASICs or with BASCOM, or with the MS
  195. BASIC Professional Development System, but I'd like to find out.
  196.  
  197. It WILL NOT work with BASICA or GWBASIC. I have no reason to think it will
  198. work unmodified with Turbo/Power BASIC or other non-Microsoft BASIC
  199. compilers, but if anybody wants to try to adapt it, I'll be glad to cooperate.
  200.  
  201.                                WINDOWS?
  202.  
  203. An application using PULDOWN menus can run in Windows 3.0 in a DOS box.
  204.  
  205.                                  BUGS?
  206.  
  207. If I thought there were any bugs left in PULDOWN, I wouldn't have published
  208. it. But I am no less fallible than Lotus or Microsoft. If you run across a
  209. bug, please accept my apologies and let me know. I will fix it if it is
  210. fixable.
  211.  
  212.                               WHO TO BLAME
  213.  
  214. If you wish to contact me regarding a bug, or any other aspect of PULDOWN,
  215. write to or call:
  216.  
  217.                 Albert Duro
  218.                 MAYAM Productions
  219.                 509 Alvarado Street
  220.                 Brisbane, CA 94005
  221.  
  222.                 415 468-2155
  223.                 415 467-2060
  224.                 FAX 415 467-4824
  225.  
  226.                 Compuserve: 73757,2167 (I usually hang around IBMPRO)
  227.  
  228.  
  229.                                LEGALITIES
  230.  
  231. PULDOWN is copyrighted, and I retain rights to it.
  232. PULDOWN may be freely used by anyone to develop non-commercial software.
  233. PULDOWN may be freely distributed, so long as the distributor does not charge
  234. any fee for it, other than to cover the costs of distribution and not in
  235. excess of $10 per copy.
  236. PULDOWN may be used in the development of commercial software only with my
  237. permission.
  238. PULDOWN is offered as is. Anyone who uses it does so at their own risk. It is
  239. not guaranteed to be free of errors or to work on any particular system. If
  240. you use PULDOWN, you agree to these terms.
  241.  
  242.  
  243.                            A WORD TO MICROSOFT
  244.  
  245. Yes, PULDOWN is a blatant and precise rip-off of the look-and-feel of the
  246. QuickBASIC menu system. It is meant as sincerest flattery. Please don't sue
  247. me.
  248.  
  249.