home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dbwin.zip
/
FEATURES.PRG
< prev
next >
Wrap
Text File
|
1988-03-05
|
8KB
|
319 lines
*features.prg
*demonstration of windowing library
load e1
load e2
load timeout
load savescrn
load restscrn
load curson
load cursoff
* Initialize window storage
set typeahead to 0
WIN_1 = space(12) && This is where we will store our parameters
W_1_buf1 = space(250)
W_1_buf2 = space(250)
W_1_buf3 = space(250)
W_1_buf4 = space(250)
W_1_buf5 = space(250)
W_1_buf6 = space(250)
W_1_buf7 = space(250)
W_1_buf8 = space(250)
W_1_buf9 = space(250)
W_1_buf10 = space(250)
W_1_buf11 = space(250)
W_1_buf12 = space(250)
W_1_buf13 = space(250)
W_1_buf14 = space(250)
W_1_buf15 = space(250)
W_1_buf16 = space(250)
WIN_2 = space(12)
W_2_buf1 = space(250)
W_2_buf2 = space(250)
W_2_buf3 = space(250)
W_2_buf4 = space(250)
W_2_buf5 = space(250)
W_2_buf6 = space(250)
W_2_buf7 = space(250)
W_2_buf8 = space(250)
W_2_buf9 = space(250)
W_2_buf10 = space(250)
W_2_buf11 = space(250)
W_2_buf12 = space(250)
W_2_buf13 = space(250)
W_2_buf14 = space(250)
W_2_buf15 = space(250)
W_2_buf16 = space(250)
WIN_3 = space(12)
W_3_buf1 = space(250)
W_3_buf2 = space(250)
W_3_buf3 = space(250)
W_3_buf4 = space(250)
W_3_buf5 = space(250)
W_3_buf6 = space(250)
W_3_buf7 = space(250)
W_3_buf8 = space(250)
W_3_buf9 = space(250)
W_3_buf10 = space(250)
W_3_buf11 = space(250)
W_3_buf12 = space(250)
W_3_buf13 = space(250)
W_3_buf14 = space(250)
W_3_buf15 = space(250)
W_3_buf16 = space(250)
WIN_4 = space(12)
W_4_buf1 = space(250)
W_4_buf2 = space(250)
W_4_buf3 = space(250)
W_4_buf4 = space(250)
W_4_buf5 = space(250)
W_4_buf6 = space(250)
W_4_buf7 = space(250)
W_4_buf8 = space(250)
W_4_buf9 = space(250)
W_4_buf10 = space(250)
W_4_buf11 = space(250)
W_4_buf12 = space(250)
W_4_buf13 = space(250)
W_4_buf14 = space(250)
W_4_buf15 = space(250)
W_4_buf16 = space(250)
if iscolor()
C_BKGRND = "b/w,b/w,w"
C_FRGRND = "r/w,n/w,w"
C_HIBKGRND = "+gr/b,+g/b,b"
C_HILITE = "n/g,n/w,w"
C_BOX = "r/n,n/w,w"
C_BOX2 = "+w/b,n/w,w"
C_BLINK = "*r/n,n/w,w"
C_INVERSE = "+w/g,w/b,w"
C_STRING = "+n/+br"
C_STRING2 = "n/+w"
else
C_BKGRND = "w/n,n/w,n"
C_BLINK = "*w/n"
C_BOX = "w/n"
C_FRGRND = "+w/n,w/n,n"
C_HIBKGRND = "+w/n,n/w,n"
C_HILITE = "w/n,n/w,n"
C_INVERSE = "n/w,w/n,n"
C_BOX2 = "n/w,w/n,n"
C_STRING = "w/n"
C_STRING2 = "+n/w"
endif
call cursoff
set color to &c_bkgrnd
clear
set color to &c_box
@ 9,22 to 15,57 double
set color to &c_frgrnd
@ 10,27 say "WINDOWS FOR dBASE Ver. 1.0"
@ 11,30 say "Demonstration Package"
@ 12,33 say "by Gary Gruber"
@ 13,32 say "Data Base Designs"
@ 14,33 say "Copyright 1988"
call timeout with chr(5)
call e1 with "1"
call e2 with "1"
if .not. iscolor()
set color to n/w
@ 4,9 clear to 17,70
endif
rele modu e1
rele modu e2
load e3
load e4
set color to &c_hilite
@ 5,8 say chr(195) + replicate(chr(196),62) + chr(180)
set color to &c_inverse
@ 4,16 say "DBDWIND -- Windows for dBASE -- Function Library"
@ 6,11 say "CURSOFF Turns the cursor off"
@ 7,11 say "CURSON Turns the cursor on"
@ 8,11 say "DIMSCRN Resets the color attribute of a specified area"
@ 9,11 say "EXPLODE Expanding box"
@ 10,11 say "FILL Fills a box with specified char/attribute"
@ 11,11 say "IMPLODE Contracting box"
@ 12,11 say "POPWIN Restores a partial window to the screen"
@ 13,11 say "RESFRDSK Restores a disk file to the screen"
@ 14,11 say "RESTOBUF Restores a screen to a memory variable"
@ 15,11 say "RESTSCRN Restores a screen saved to memory"
@ 16,11 say "SAVESCRN Saves a screen to memory"
@ 17,11 say "SAVTODSK Saves a screen to a disk file"
set color to &c_hibkgrnd
call curson
@ 21,11 say "Let's see what we can do with these functions...PRESS A KEY"
set console off
wait
set console on
@ 21,11 say space(59)
call savescrn with win_1
set color to &c_bkgrnd
clear
@ 12,18 say "We can save and restore the entire screen..."
@ 13,34 say "PRESS A KEY!"
set console off
wait
set console on
call restscrn with win_1
call cursoff
call timeout with chr(2)
set color to &c_box2
@ 4,10 to 16,40
set color to &c_bkgrnd
@ 5,11 clear to 15,39
@ 5,14 say "*** DEMO WINDOW #1 ***"
@ 7,13 say "We can create a series of"
@ 8,13 say "tiled or overlapping"
@ 9,13 say "windows, pulldown menus"
@ 10,13 say "or help screens!"
@ 12,20 say "PRESS A KEY"
call savescrn with win_1
set console off
wait
set console on
set color to &c_box
@ 6,12 to 21,45
set color to &c_frgrnd
@ 7,13 clear to 20,44
@ 7,17 say "*** DEMO WINDOW #2 ***"
@ 9,15 say "These windows can be drawn"
@ 10,15 say "with @ SAY... commands, and"
@ 11,15 say "saved to disc files. The code"
@ 12,15 say "can then be removed from your"
@ 13,15 say "program. These images can be"
@ 14,15 say "restored directly to the"
@ 15,15 say "screen, or to a memory "
@ 16,15 say "buffer where they can be"
@ 17,15 say "popped up when needed..."
@ 19,23 say "PRESS A KEY"
call savescrn with win_2
set console off
wait
set console on
@ 19,23 SAY SPACE(11)
set color to &c_string
@ 8,14 to 19,71
set color to &c_string2
@ 9,15 clear to 18,70
@ 9,31 say "*** DEMO WINDOW #3 ***"
@ 11,16 say "All of the windowing routines are written in ASSEMBLER"
@ 12,16 say "So they are quite fast...In additon to popping and"
@ 13,16 say "Swapping windows, we can selectively rewrite the color"
@ 14,16 say "attribute of a window without disturbing its contents."
@ 15,16 say "This can be used to accent or hilite a single window"
@ 16,16 say "When several are visible on the screen."
@ 18,36 say "PRESS A KEY"
call savescrn with win_3
set console off
wait
set console on
@ 18,36 SAY SPACE(11)
set color to &c_hibkgrnd
@ 8,30 to 17,50 double
set color to &c_inverse
@ 9,31 clear to 16,49
call savescrn with win_4
@ 9,32 say "Let's accent this"
@ 10,32 say "window by reset-"
@ 11,32 say "ing the colors "
@ 12,32 say "around it."
@ 14,35 say "PRESS A KEY!"
set console off
wait
set console on
load d1
load d2
load d3
load d4
call d1 with "1"
call d2 with "1"
call d3 with "1"
call d4 with "1"
rele modu d1
rele modu d2
rele modu d3
rele modu d4
@ 14,32 say "Quick enough?..."
@ 15,32 say "Let's restore it"
@ 16,35 say "PRESS A KEY!"
set console off
wait
set console on
call restscrn with win_4
@ 12,32 say "Impressed yet?..."
call timeout with chr(2)
call cursoff
load e3
load i1
call i1 with "1"
call e3 with "1"
rele modu e3
rele modu i1
set color to &c_hibkgrnd
@ 12,23 say "I've been saving the best for last."
@ 13,20 say "Watch as we pop up the underlying windows"
@ 14,20 say "without disturbing the rest of the screen"
@ 16,35 say "PRESS A KEY!"
set console off
wait
set console on
set typeahead to 10
set escape off
load p1
load p2
load p3
do while .t.
call p2 with win_2
@ 23,13 say "THERE'S OUR SECOND WINDOW...PRESS A KEY, <ESC> TO QUIT"
i = 0
do while i = 0
i=inkey()
enddo
if i=27
exit
endif
call p3 with win_3
@ 23,13 say "THERE'S OUR THIRD WINDOW...PRESS A KEY, <ESC> TO QUIT "
i = 0
do while i = 0
i=inkey()
enddo
if i=27
exit
endif
call p1 with win_1
@ 23,13 say "THERE'S OUR FIRST WINDOW...PRESS A KEY, <ESC> TO QUIT "
i = 0
do while i = 0
i=inkey()
enddo
if i=27
exit
endif
enddo
call e4 with "1"
rele modu e4
load f1
call f1 with "1"
rele modu f1
@ 12,6 say "The final portion of this demo will restore a screen from a disk file"
@ 13,34 say "PRESS A KEY!"
set console off
wait
set console on
load resfrdsk
set color to n/w
call resfrdsk with "promo.scr"
call curson
set escape on
rele modu p1
rele modu p2
rele modu p3
rele modu timeout
rele modu savescrn
rele modu restscrn
rele modu resfrdsk
rele modu curson
rele modu cursoff
return
*eof features