home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 15
/
CD_ASCQ_15_070894.iso
/
vrac
/
dnalib7a.zip
/
DNA.DOC
< prev
next >
Wrap
Text File
|
1994-05-15
|
11KB
|
232 lines
'┌─────────────────────────────────────────────────────────────────────┐
'│ │░░
'│ DNALIB Version 7.0 │░░
'│ CopyRight 1993 by FREEBEE Software │░░
'│ │░░
'│ For PowerBASIC Version 3.* │░░
'│ │░░
'└─────────────────────────────────────────────────────────────────────┘░░
' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
DnaLib is totally free of charge for you to use or abuse, as you
see fit. You have the source code, so look it over before you run it !!!
If your Computer Dies, or your Dog or Cat gets pregnant and your spouse
leaves you "It's your fault and NOT MINE".
I would like to start a register of users, so that I will know that
all this work is not invain, so if you like or find DnaLib useful send me a
postcard or a fax, at the address on the opening screen, DONT SEND MONEY !
If you think DnaLib has some value then make a donation to your favorite
charity.
I would like to apologize for the lack of documentation, but at
present my time constraints are such that it will have to wait till the
fall, but I am sure you would rather have the source code now than latter.
I promise I will get to the DOCS this fall :)
NEW Lots of changes! and some new routines that I have written for
the DNA-TERMINAL project, I hope to have the DNA-TERMINAL project finished
by SUMMER so keep whatching.
NEW routines in version 7
~~~~~~~~~~~~~~~~~~~~~~~~~
ScrollMenu is a scrollable menu with definable hot keys, and mouse
support, ScrollMenu is also taggable and self centreing, similar to vertmenu
but without the menurow mouse checking.
VirtualBox is like ScrollBox but will allow scrolling from side to
side, it checks the string width and will only scroll enough to fit the
widest string in the defined window.
Question is a function for asking multiple choice questions, see
the demo in DNADEMO.
CalcBox is just a mouse or keyboard driven frame for the keypad.
Percentage is an activerty gauge that could be used for disk copy,
install programs, transfer protocol etc.
There are quite a few other useful routines that do handy things
ie TRIML$/TRIMR$ will trim a specified number of characters from a string
TRIML$(" Test",2) would return " Test"
MODS
1) you can now force UPPER or lower in LineEdit by passing or as the
first character in the Allow string, ie for lower case and for
UPPER CASE.
2) by passing a single "_" character to VertMenu as one of the menu choices
you can have divider bars in your menus.
3) Dialog has a parameter "seconds%" which if passed a value will display
for that many seconds and then exit, if seconds contains a value of 0
then a key press or mouse click ends the routine.
4) ScrollBox has been changed to allow a default scroll bar position also
the option scrolling% has been removed.
5) some of the routines have been given a work over for mouse handleing and
screen printing to cut down on things like screen flicker etc but all the
calls remain the same.
BUGS
There was a bug in DirBox, "the phantom DIR" strange, it is fixed now but
I am still not sure why? if a disk was fragmented an extra Directory would
appear but only somtimes.
NEW this release sees the full implementation of DNAWrite which is
a version of PBWrite by Erik Olson and the routines from the DNA Library
and a few gaps filled in, I would really appreciate some feed back on this
one as it has taken a good deal of time and DEBUGGING to get it this far,
so if you find bugs let me know about them !
THINGS still to do, the mark text with mouse is not ready yet and
if anyone has any ideas for this please let me know. Once I have this
routine figured, the Delete and Copy routines are already here.
IMMPORTANT I have added another parameter to Horizontal Menu it is
called HiLight% and it is so you can switch the hotkeys on and off, look at
the source to DNAWrite to see how I've done it.
1) EDITBOX is a combination of several routines, and if you run the file
DNAWRITE.EXE you will see it in action from the (S)earch and then (F)ind
menu selections.
2) DBLBOX is as above but with two Line Edits. see the (S)earch and then
(R)eplace menu selections.
3) DIRBOX is a routine to display files and directories and a line edit to
edit path or file display, by entering a path and ie. *.Com DIRBOX will
display only the COM files in that directory, DIRBOX has complete mouse
support, scroll bars, etc.
4) SAVEAS is a routine for returning a selectable path and file name.
it will cut a paste the current file name on to a selectable path for you.
5) LOCKS will display a NUM & CAPS on a line and column of your choice.
6) YESNO is a FUNCTION that allows you to place a question on screen and
get a TRUE or FALSE answer so you can ie.
IF YesNo%(parameters) THEN
DoSomething
ELSE
DoSomethingElse
END IF
7) MAYBE is a subroutine to display a question and return an answer other
than yes or no, yes is still 1 or %TRUE and no is 0 or %FALSE but C or c or
Esc is 2 so you can use it like this ie.
MAYBE(parameters)
SELECT CASE Answer%
CASE 0
%FALSE statments
CASE 1
%TRUE statments
CASE 2
others statments
END SELECT
LINEEDIT has been changed ! it now has an exit with the mouse and a
fall through by setting Editkey% to 255, (this is how I am keeping the name
and path current in DIRBOX), If the exit was with the mouse then Editkey will
have a value of -255 and the row and column values of the position the mouse
was clicked will be in MouseRow% and MouseCol%, you then have to build a
SELECT CASE around these values (again this is how DIRBOX works) ie.
LINEEDIT(parameters)
IF EditKey% = -255 THEN
SELECT CASE MRow%
CASE 1
SELECT CASE MCol%
CASE 1 TO 80
do something on the first row
END SELECT
END SELECT
ELSE
SELECT CASE EditKey%
CASE 255
fall through
CASE 13
do something with enter key
END SELECT
END IF
I shall build some data entry screens in the next version of DNALIB as a
demo of how to implement these features.
IMPORTANT I have changed the FGround, BGround variables to Attributes,
so you have to pass a pair of colors now (I did this because there is a limit
of 16 parameters that you can pass to a SUB).
NEW Full Mouse support, all you have to do is add one line to your
main program ie.
IF MouseThere% THEN Mouse% = 1 (or %TRUE)
There are a couple of other routines which are not in the demo but you have
the source.
MakeByte() will make an Attribute for you from FGround and BGround.
MakeByte Attribute%, 15(BrightWhite), 1(Blue)
Attribute% = 31
CalcByte() will perform the reverse of MakeByte
CalcByte 31,FGround%,BGround%
FGround% = 15 BGround% = 1
you could also use these routines when you call an intrupt that
returns a Hi,Low Byte.
CheckBits is very simple but useful if you want to check more than
one bit etc.
ScreenPlus will return a word that is closest to the Row%, Col% you
pass it (maybe the start of a spell checker).
NEW in this release the HELP system, the centre of which is a modified form
of BROWSE.BAS from the GAP Library and included with the kind permission of
Eric Olson (the original author). By pressing F1 from any menu choice the
menu system removes any spaces or "@" (hot key marker) and builds a file name
from the first eight characters or less, "Save As" would become "SAVEAS.HLP".
It then calls BROWSE and BROWSE checks to see if the file is in the current
directory, if the file is there BROWSE saves a portion of the screen, and
pops a window on screen and displays the file. Not Hypertext but context
sensitive.
NEW in this release SCROLBOX has been greatly enhanced, you can use the space
bar to TAG and UNTAG files or anything else you display with SCROLBOX. To use
the Tagging feature you simple pass a value in the variable TAG%, the value
you pass also represents the ASCII value of the tagging character ie. 4 =
this also applies to the PICKBOX and SCROLLMENU routines.
It also contains a SEARCH on the first letter of any displayed choices, it
will search forward from the scroll bar and find the next match, if there is
no match it will go to the beginning and search towards the scroll bar, there
is also a side bar to show how far through the choices you are.
NEW in this release TYPWRITE and NOISE, TYPWRITE will simulate a typewriter
in sound and speed and may be useful for a NAG screen or a presentation demo
etc. NOISE is a collection of clicks, chirps, phasers, etc.
BUG LIST
~~~~~~~~
If you have DnaLib30.* then there was a bug in the ScrolBox search routine,
but only if the mouse was on the window, I have made the mouse routines in
ScrolBox a bit faster. And added the cancel window box [■], if you are using
Titles to the windows, the routines check to see if the box will fit on the
top leftside of the window, if there is no space for it, it will be placed
on the bottom leftside of the window. Also if there is no mouse the boxes
and scroll bars are not displayed.
There was a bug in the save and restore routines not a biggee but a bug all
the same, it was caused by the use of a (;) as a delimiting character in the
string I was storing the saved portion of the screen to, it would cause
strange colours and characters to appear I have changed the character to
CHR$(255) which should solve the problem but this could be any character
you like.