home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / dnalib7a.zip / DNA.DOC < prev    next >
Text File  |  1994-05-15  |  11KB  |  232 lines

  1. '┌─────────────────────────────────────────────────────────────────────┐
  2. '│                                                                     │░░
  3. '│                         DNALIB Version 7.0                          │░░
  4. '│                 CopyRight 1993 by FREEBEE Software                  │░░
  5. '│                                                                     │░░
  6. '│                      For PowerBASIC Version 3.*                     │░░
  7. '│                                                                     │░░
  8. '└─────────────────────────────────────────────────────────────────────┘░░
  9. '  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  10.  
  11.  
  12.         DnaLib is totally free of charge for you to use or abuse, as you
  13. see fit.  You have the source code, so look it over before you run it !!!
  14. If your Computer Dies, or your Dog or Cat gets pregnant and your spouse
  15. leaves you "It's your fault and NOT MINE".
  16.  
  17.         I would like to start a register of users, so that I will know that
  18. all this work is not invain, so if you like or find DnaLib useful send me a
  19. postcard or a fax, at the address on the opening screen, DONT SEND MONEY !
  20. If you think DnaLib has some value then make a donation to your favorite
  21. charity.
  22.  
  23.         I would like to apologize for the lack of documentation, but at
  24. present my time constraints are such that it will have to wait till the
  25. fall, but I am sure you would rather have the source code now than latter.
  26. I promise I will get to the DOCS this fall :)
  27.  
  28.         NEW Lots of changes! and some new routines that I have written for
  29. the DNA-TERMINAL project, I hope to have the DNA-TERMINAL project finished
  30. by SUMMER so keep whatching.
  31.  
  32. NEW routines in version 7 
  33. ~~~~~~~~~~~~~~~~~~~~~~~~~
  34.         ScrollMenu is a scrollable menu with definable hot keys, and mouse
  35. support, ScrollMenu is also taggable and self centreing, similar to vertmenu
  36. but without the menurow mouse checking.
  37.  
  38.         VirtualBox is like ScrollBox but will allow scrolling from side to
  39. side, it checks the string width and will only scroll enough to fit the
  40. widest string in the defined window.
  41.  
  42.         Question is a function for asking multiple choice questions, see
  43. the demo in DNADEMO.
  44.  
  45.         CalcBox is just a mouse or keyboard driven frame for the keypad.
  46.  
  47.         Percentage is an activerty gauge that could be used for disk copy,
  48. install programs, transfer protocol etc.
  49.  
  50.         There are quite a few other useful routines that do handy things
  51. ie TRIML$/TRIMR$ will trim a specified number of characters from a string 
  52. TRIML$("    Test",2) would return "  Test"
  53.  
  54. MODS
  55.  
  56. 1) you can now force UPPER or lower in LineEdit by passing  or  as the
  57.    first character in the Allow string, ie  for lower case and  for 
  58.    UPPER CASE.
  59.  
  60. 2) by passing a single "_" character to VertMenu as one of the menu choices
  61.    you can have divider bars in your menus.
  62.  
  63. 3) Dialog has a parameter "seconds%" which if passed a value will display
  64.    for that many seconds and then exit, if seconds contains a value of 0
  65.    then a key press or mouse click ends the routine.
  66.  
  67. 4) ScrollBox has been changed to allow a default scroll bar position also
  68.    the option scrolling% has been removed.
  69.  
  70. 5) some of the routines have been given a work over for mouse handleing and
  71.    screen printing to cut down on things like screen flicker etc but all the
  72.    calls remain the same.
  73.  
  74. BUGS
  75.    
  76.    There was a bug in DirBox, "the phantom DIR" strange, it is fixed now but
  77.    I am still not sure why? if a disk was fragmented an extra Directory would
  78.    appear but only somtimes.
  79.  
  80.         NEW this release sees the full implementation of DNAWrite which is
  81. a version of PBWrite by Erik Olson and the routines from the DNA Library
  82. and a few gaps filled in, I would really appreciate some feed back on this
  83. one as it has taken a good deal of time and DEBUGGING to get it this far,
  84. so if you find bugs let me know about them !
  85.  
  86.         THINGS still to do, the mark text with mouse is not ready yet and
  87. if anyone has any ideas for this please let me know. Once I have this 
  88. routine figured, the Delete and Copy routines are already here.
  89.  
  90.         IMMPORTANT I have added another parameter to Horizontal Menu it is
  91. called HiLight% and it is so you can switch the hotkeys on and off, look at
  92. the source to DNAWrite to see how I've done it.
  93.  
  94.   1) EDITBOX is a combination of several routines, and if you run the file
  95. DNAWRITE.EXE you will see it in action from the (S)earch and then (F)ind
  96. menu selections.
  97.  
  98.   2) DBLBOX is as above but with two Line Edits. see the (S)earch and then
  99. (R)eplace menu selections. 
  100.  
  101.   3) DIRBOX is a routine to display files and directories and a line edit to
  102. edit path or file display, by entering a path and ie. *.Com    DIRBOX will 
  103. display only the COM files in that directory, DIRBOX has complete mouse 
  104. support, scroll bars, etc.
  105.  
  106.   4) SAVEAS is a routine for returning a selectable path and file name.
  107. it will cut a paste the current file name on to a selectable path for you.
  108.  
  109.   5)  LOCKS will display a NUM & CAPS on a line and column of your choice.
  110.  
  111.   6) YESNO is a FUNCTION that allows you to place a question on screen and
  112. get a TRUE or FALSE answer so you can ie. 
  113.  
  114.                 IF YesNo%(parameters) THEN
  115.                   DoSomething
  116.                 ELSE
  117.                   DoSomethingElse
  118.                 END IF
  119.  
  120.   7) MAYBE is a subroutine to display a question and return an answer other
  121. than yes or no, yes is still 1 or %TRUE and no is 0 or %FALSE but C or c or
  122. Esc is 2 so you can use it like this ie.
  123.  
  124.                 MAYBE(parameters)
  125.                   SELECT CASE Answer%
  126.                          CASE 0
  127.                            %FALSE statments
  128.                          CASE 1
  129.                            %TRUE statments
  130.                          CASE 2
  131.                            others statments
  132.                   END SELECT
  133.  
  134.         LINEEDIT has been changed ! it now has an exit with the mouse and a
  135. fall through by setting Editkey% to 255, (this is how I am keeping the name
  136. and path current in DIRBOX), If the exit was with the mouse then Editkey will
  137. have a value of -255 and the row and column values of the position the mouse
  138. was clicked will be in MouseRow% and MouseCol%, you then have to build a 
  139. SELECT CASE around these values (again this is how DIRBOX works) ie.
  140.  
  141.                 LINEEDIT(parameters)
  142.                   IF EditKey% = -255 THEN
  143.                     SELECT CASE MRow%
  144.                            CASE 1
  145.                              SELECT CASE MCol%
  146.                                     CASE 1 TO 80
  147.                                       do something on the first row
  148.                              END SELECT
  149.                     END SELECT
  150.                   ELSE
  151.                     SELECT CASE EditKey%
  152.                            CASE 255
  153.                              fall through
  154.                            CASE 13
  155.                              do something with enter key
  156.                     END SELECT
  157.                   END IF
  158.  
  159. I shall build some data entry screens in the next version of DNALIB as a
  160. demo of how to implement these features.
  161.  
  162.         IMPORTANT I have changed the FGround, BGround variables to Attributes,
  163. so you have to pass a pair of colors now (I did this because there is a limit
  164. of 16 parameters that you can pass to a SUB).
  165.  
  166.         NEW Full Mouse support, all you have to do is add one line to your 
  167. main program ie.
  168.  
  169.                 IF MouseThere% THEN  Mouse% = 1 (or %TRUE)
  170.  
  171. There are a couple of other routines which are not in the demo but you have
  172. the source.
  173.  
  174.         MakeByte() will make an Attribute for you from FGround and BGround.
  175.     
  176.                 MakeByte Attribute%, 15(BrightWhite), 1(Blue)
  177.                 Attribute% = 31  
  178.  
  179.         CalcByte() will perform the reverse of MakeByte
  180.                 CalcByte 31,FGround%,BGround%
  181.                 FGround% = 15 BGround% = 1
  182.  
  183. you could also use these routines when you call an intrupt that
  184. returns a Hi,Low Byte.
  185.  
  186.         CheckBits is very simple but useful if you want to check more than
  187. one bit etc.
  188.  
  189.         ScreenPlus will return a word that is closest to the Row%, Col% you
  190. pass it (maybe the start of a spell checker).
  191.  
  192. NEW in this release the HELP system, the centre of which is a modified form
  193. of BROWSE.BAS from the GAP Library and included with the kind permission of
  194. Eric Olson (the original author).  By pressing F1 from any menu choice the
  195. menu system removes any spaces or "@" (hot key marker) and builds a file name
  196. from the first eight characters or less, "Save As" would become "SAVEAS.HLP".
  197. It then calls BROWSE and BROWSE checks to see if the file is in the current
  198. directory, if the file is there BROWSE saves a portion of the screen, and
  199. pops a window on screen and displays the file.  Not Hypertext but context
  200. sensitive.
  201.  
  202. NEW in this release SCROLBOX has been greatly enhanced, you can use the space
  203. bar to TAG and UNTAG files or anything else you display with SCROLBOX. To use
  204. the Tagging feature you simple pass a value in the variable TAG%, the value
  205. you pass also represents the ASCII value of the tagging character ie. 4 = 
  206. this also applies to the PICKBOX and SCROLLMENU routines.
  207. It also contains a SEARCH on the first letter of any displayed choices, it
  208. will search forward from the scroll bar and find the next match, if there is
  209. no match it will go to the beginning and search towards the scroll bar, there
  210. is also a side bar to show how far through the choices you are.
  211.  
  212. NEW in this release TYPWRITE and NOISE, TYPWRITE will simulate a typewriter
  213. in sound and speed and may be useful for a NAG screen or a presentation demo
  214. etc.  NOISE is a collection of clicks, chirps, phasers, etc.
  215.  
  216.                                 BUG LIST
  217.                                 ~~~~~~~~
  218. If you have DnaLib30.* then there was a bug in the ScrolBox search routine,
  219. but only if the mouse was on the window,  I have made the mouse routines in
  220. ScrolBox a bit faster.  And added the cancel window box [■], if you are using
  221. Titles to the windows, the routines check to see if the box will fit on the
  222. top leftside of the window, if there is no space for it, it will be placed
  223. on the bottom leftside of the window.  Also if there is no mouse the boxes
  224. and scroll bars are not displayed.
  225.  
  226. There was a bug in the save and restore routines not a biggee but a bug all
  227. the same, it was caused by the use of a (;) as a delimiting character in the
  228. string I was storing the saved portion of the screen to, it would cause 
  229. strange colours and characters to appear I have changed the character to 
  230. CHR$(255) which should solve the problem but this could be any character 
  231. you like.
  232.