home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
library
/
tb
/
tbwindo
/
tbd60.bas
next >
Wrap
BASIC Source File
|
1988-04-29
|
12KB
|
346 lines
$INCLUDE "tbw60.def"
WIDTH(40)
CALL Tbwborder(7)
CALL Tbwfill(1,1,25,40,32,FNAttr(0,7))
CALL Makewindow(2,4,7,15,FNAttr(0,2),FNAttr(10,2),2,FNAttr(8,0),7,1)
CALL Tbwprint(5,9,"T",FNAttr(15,2))
CALL Tbwprint(5,10,"URBO",FNAttr(10,2))
DELAY(2)
CALL Makewindow(7,10,7,15,FNAttr(15,4),FNAttr(12,4),2,FNAttr(8,0),7,1)
CALL Tbwprint(10,15,"B",FNAttr(15,4))
CALL Tbwprint(10,16,"ASIC",FNAttr(12,4))
DELAY(2)
CALL Makewindow(12,16,7,15,FNAttr(0,3),FNAttr(11,3),2,FNAttr(8,0),7,1)
CALL Tbwprint(15,20,"W",FNAttr(15,3))
CALL Tbwprint(15,21,"INDOWS",FNAttr(11,3))
DELAY(2)
CALL Makewindow(17,22,7,15,FNAttr(15,1),FNAttr(9,1),2,FNAttr(8,0),7,1)
CALL Prtcwindow(3,"6.0")
DELAY(4)
CALL Removewindow
DELAY(1)
CALL Removewindow
DELAY(1)
CALL Removewindow
DELAY(1)
CALL Removewindow
WIDTH(80)
CALL Tbwborder(1)
CALL Tbwfill(1,1,25,80,32,FNAttr(7,1))
CALL Makewindow(4,15,10,30,FNAttr(4,3),FNAttr(4,3),4,FNAttr(8,0),1,1)
CALL Makewindow(3,36,13,40,FNAttr(15,2),FNAttr(15,2),3,FNAttr(8,0),1,1)
CALL Makewindow(9,10,13,40,FNAttr(0,5),FNAttr(0,5),2,FNAttr(8,0),1,1)
CALL Makewindow(12,42,11,36,FNAttr(3,4),FNAttr(3,4),1,FNAttr(8,0),1,1)
CALL Makewindow(3,5,7,40,FNAttr(0,7),FNAttr(1,7),2,FNAttr(8,0),1,1)
CALL Prtcwindow(3,"Presenting...")
DELAY(4)
CALL Makewindow(8,20,7,40,FNAttr(0,7),FNAttr(1,7),2,FNAttr(8,0),1,1)
CALL Prtcwindow(1,"T B W")
CALL Prtcwindow(2,"6.0")
CALL Prtcwindow(4,"Windowing Routines for the")
CALL Prtcwindow(5,"Borland Turbo BASIC Compiler")
DELAY(3)
CALL Makewindow(17,55,7,24,FNAttr(0,2),FNAttr(10,2),1,FNAttr(8,0),1,1)
CALL Prtwindow(1,2,"By:")
CALL Prtcwindow(3,"Rick Fothergill")
CALL Prtcwindow(4,"141 Oak Hill Road")
CALL Prtcwindow(5,"Pittsfield, MA 01201")
DELAY(4)
FOR x = 1 TO 7
CALL Removewindow
NEXT
CALL Tbwfill(1,1,25,80,32,FNAttr(0,7))
CALL Tbwborder(7)
done = 0
CALL Makebox(2,40,3,35,FNAttr(11,4),FNAttr(12,4),3,0,0,0)
CALL Tbwprintc(3,41,75,"TBW60 Demo",FNAttr(15,4))
CALL Makewindow(3,5,8,15,FNAttr(15,1),FNAttr(15,1),2,FNAttr(8,7),7,0)
CALL Titlewindow(2,FNAttr(15,1),"[ MAIN MENU ]")
curntpos = 0
WHILE NOT done
item$(1) = "Frames "
item$(2) = "Titles "
item$(3) = "Shadows"
item$(4) = "Effects"
item$(5) = "Menus "
item$(6) = "Quit "
itemcount = 6
startpos = 1
hlattr = FNAttr(15,1)
flattr = FNAttr(14,1)
flon = -1
bartype = 3
CALL Makemenu
SELECT CASE curntpos
CASE 1
CALL Fdemo
CASE 2
CALL Tdemo
CASE 3
CALL Sdemo
CASE 4
CALL Edemo
CASE 5
CALL Mdemo
CASE ELSE
CALL Removewindow
curntpos = oldcurntpos
CALL Tbwborder(1)
CALL Tbwfill(1,1,43,80,32,FNAttr(15,1))
CALL Makewindow(9,16,8,52,FNAttr(0,7),FNAttr(1,7),2,0,0,0)
CALL Prtcwindow(3,"T B W")
CALL Prtcwindow(4,"6.0")
DELAY(3)
CALL Removewindow
done = -1
END SELECT
WEND
CALL Tbwborder(0)
CLS
SUB Fdemo
CALL Makewindow(4,6,6,25,FNAttr(15,3),FNAttr(15,3),1,0,0,0)
CALL Titlewindow(1,FNAttr(14,3),"[ Frame Style 1 ]")
CALL Makewindow(6,10,6,25,FNAttr(15,5),FNAttr(15,5),2,0,0,0)
CALL Titlewindow(2,FNAttr(14,5),"[ Frame Style 2 ]")
CALL Makewindow(8,14,6,25,FNAttr(15,4),FNAttr(15,4),3,0,0,0)
CALL Titlewindow(3,FNAttr(14,4),"[ Frame Style 3 ]")
CALL Makewindow(10,18,6,25,FNAttr(15,6),FNAttr(15,6),4,0,0,0)
CALL Titlewindow(1,FNAttr(14,6),"[ Frame Style 4 ]")
CALL Makewindow(12,22,6,25,FNAttr(15,2),FNAttr(15,2),5,0,0,0)
CALL Titlewindow(3,FNAttr(14,2),"[ Frame Style 5 ]")
CALL Makewindow(14,26,6,25,FNAttr(15,3),FNAttr(15,3),6,0,0,0)
CALL Titlewindow(1,FNAttr(14,3),"[ Frame Style 6 ]")
CALL Makewindow(16,30,6,25,FNAttr(15,5),FNAttr(15,5),7,0,0,0)
CALL Titlewindow(2,FNAttr(14,5),"[ Frame Style 7 ]")
CALL Makewindow(18,34,6,25,FNAttr(15,4),FNAttr(15,4),8,0,0,0)
CALL Titlewindow(3,FNAttr(14,4),"[ Frame Style 8 ]")
CALL Makewindow(6,44,3,30,FNAttr(15,2),FNAttr(0,2),2,FNAttr(8,7),7,0)
CALL Prtwindow(1,2,"Press and key to return...")
WHILE NOT INSTAT
WEND
a$ = INKEY$
FOR x = 1 TO 9
CALL Removewindow
NEXT
END SUB
SUB Tdemo
CALL Makewindow(13,5,10,70,FNAttr(15,5),FNAttr(15,5),2,FNAttr(8,7),7,0)
CALL Prtcwindow(5,"Titles may be placed in any of six different locations.")
FOR x=1 TO 6
msg$ = STR$(x)
msg$ = "[ LOCATION "+msg$+" ]"
CALL Titlewindow(x,FNAttr(11,5),msg$)
DELAY(1)
NEXT
CALL Makewindow(6,44,3,30,FNAttr(15,2),FNAttr(0,2),2,FNAttr(8,7),7,0)
CALL Prtwindow(1,2,"Press and key to return...")
WHILE NOT INSTAT
WEND
a$ = INKEY$
CALL Removewindow
CALL Removewindow
END SUB
SUB Sdemo
CALL Makewindow(13,5,10,70,FNAttr(15,5),FNAttr(15,5),2,FNAttr(8,7),7,0)
CALL Prtcwindow(5,"The window itself can be presented in many")
CALL Prtcwindow(6,"different ways. It can be flat...")
DELAY(3)
CALL Makewindow(7,10,10,30,FNAttr(15,3),FNAttr(0,3),1,0,0,0)
CALL Makewindow(7,45,10,30,FNAttr(15,2),FNAttr(0,2),1,0,0,0)
DELAY(3)
CALL Removewindow
CALL Removewindow
CALL Clearwindow
CALL Prtcwindow(4,"it can have one of many types of shadow underneath")
CALL Prtcwindow(6,"this is SOLID black - type 3 left and 4 right")
DELAY(3)
CALL Makewindow(7,10,10,30,FNAttr(15,3),FNAttr(0,3),2,0,3,0)
CALL Prtcwindow(7,"Left Shadow")
DELAY(2)
CALL Makewindow(7,45,10,30,FNAttr(15,2),FNAttr(0,2),2,0,4,0)
CALL Prtcwindow(7,"Right Shadow")
DELAY(2)
CALL Removewindow
CALL Removewindow
CALL Clearwindow
CALL Prtcwindow(6,"this is SHADOW black - type 1 left and 2 right")
DELAY(3)
CALL Makewindow(7,10,10,30,FNAttr(15,3),FNAttr(0,3),2,8,1,0)
CALL Prtcwindow(7,"Left Shadow")
DELAY(2)
CALL Makewindow(7,45,10,30,FNAttr(15,2),FNAttr(0,2),2,8,2,0)
CALL Prtcwindow(7,"Right Shadow")
DELAY(2)
CALL Removewindow
CALL Removewindow
CALL Clearwindow
CALL Prtcwindow(6,"this is LT. HATCH - type 5 left and 6 right")
DELAY(3)
CALL Makewindow(7,10,10,30,FNAttr(15,3),FNAttr(0,3),2,FNAttr(0,7),5,0)
CALL Prtcwindow(7,"Left Shadow")
DELAY(2)
CALL Makewindow(7,45,10,30,FNAttr(15,2),FNAttr(0,2),2,FNAttr(0,7),6,0)
CALL Prtcwindow(7,"Right Shadow")
DELAY(2)
CALL Removewindow
CALL Removewindow
CALL Clearwindow
CALL Prtcwindow(6,"this is MED. HATCH - type 7 left and 8 right")
DELAY(3)
CALL Makewindow(7,10,10,30,FNAttr(15,3),FNAttr(0,3),2,FNAttr(0,7),7,0)
CALL Prtcwindow(7,"Left Shadow")
DELAY(2)
CALL Makewindow(7,45,10,30,FNAttr(15,2),FNAttr(0,2),2,FNAttr(0,7),8,0)
CALL Prtcwindow(7,"Right Shadow")
DELAY(2)
CALL Removewindow
CALL Removewindow
CALL Clearwindow
CALL Prtcwindow(6,"this is HEAVY HATCH - type 9 left and 10 right")
DELAY(3)
CALL Makewindow(7,10,10,30,FNAttr(15,3),FNAttr(0,3),2,FNAttr(0,7),9,0)
CALL Prtcwindow(7,"Left Shadow")
DELAY(2)
CALL Makewindow(7,45,10,30,FNAttr(15,2),FNAttr(0,2),2,FNAttr(0,7),10,0)
CALL Prtcwindow(7,"Right Shadow")
DELAY(2)
CALL Removewindow
CALL Removewindow
CALL Clearwindow
CALL Prtcwindow(3,"Any combination of attributes and types")
CALL Prtcwindow(4,"can be used.")
CALL Makewindow(6,44,3,30,FNAttr(15,2),FNAttr(0,2),2,FNAttr(8,7),7,0)
CALL Prtwindow(1,2,"Press and key to return...")
WHILE NOT INSTAT
WEND
a$ = INKEY$
CALL Removewindow
CALL Removewindow
END SUB
SUB Edemo
CALL Makewindow(13,5,10,70,FNAttr(15,5),FNAttr(15,5),2,FNAttr(8,7),7,0)
CALL Prtcwindow(3,"Windows can be popped")
CALL Prtcwindow(4,"onto the screen.")
DELAY(2)
CALL Makewindow(2,2,15,60,FNAttr(0,2),FNAttr(14,2),2,0,0,0)
DELAY(2)
CALL Makewindow(13,10,10,60,FNAttr(1,3),FNAttr(15,3),3,0,0,0)
DELAY(2)
CALL Makewindow(7,33,10,45,FNAttr(14,5),FNAttr(14,5),1,0,0,0)
DELAY(2)
DELAY(3)
FOR x = 1 TO 3
CALL Removewindow
NEXT
CALL Clearwindow
CALL Prtcwindow(3,"Windows can be zoomed")
CALL Prtcwindow(4,"onto the screen.")
DELAY(2)
CALL Makewindow(2,2,15,60,FNAttr(0,2),FNAttr(14,2),2,0,0,1)
DELAY(2)
CALL Makewindow(13,10,10,60,FNAttr(1,3),FNAttr(15,3),3,0,0,1)
DELAY(2)
CALL Makewindow(7,33,10,45,FNAttr(14,5),FNAttr(14,5),1,0,0,1)
DELAY(2)
CALL Makewindow(7,10,12,63,FNAttr(15,4),FNAttr(14,4),2,0,2,1)
CALL Prtcwindow(5,"HOW ABOUT THAT !!!")
DELAY(3)
FOR x = 1 TO 4
CALL Removewindow
NEXT
CALL Makewindow(6,44,3,30,FNAttr(15,2),FNAttr(0,2),2,FNAttr(8,7),7,0)
CALL Prtwindow(1,2,"Press and key to return...")
WHILE NOT INSTAT
WEND
a$ = INKEY$
CALL Removewindow
CALL Removewindow
END SUB
SUB Flhelp
CALL Makewindow(14,10,9,55,FNAttr(0,2),FNAttr(0,2),2,FNAttr(8,7),7,1)
CALL Titlewindow(2,FNAttr(14,2),"[ FIRST LETTER ]")
CALL Prtwindow(1,2,"To activate First Letter control you must set two")
CALL Prtwindow(2,2,"variables. FLOn must be set to true and you can")
CALL Prtwindow(3,2,"set FLattr to the desired color you wish. Thats")
CALL Prtwindow(4,2,"all there is to it. Just be sure all strings begin")
CALL Prtwindow(5,2,"with a different letter.")
CALL Prtwindow(7,2,"Press enter to return...")
WHILE NOT INSTAT
WEND
a$ = INKEY$
CALL Removewindow
END SUB
SUB Barhelp
CALL Makewindow(14,10,9,55,FNAttr(0,2),FNAttr(0,2),2,FNAttr(8,7),7,1)
CALL Titlewindow(2,FNAttr(14,2),"[ MENUBARS ]")
CALL Prtwindow(1,2,"There are currently four menu bar types:")
CALL Prtwindow(2,2," 0 - No visible bar 1 - Full width bar")
CALL Prtwindow(3,2," 2 - String width bar 3 - Pointer")
CALL Prtwindow(4,2,"You control what type is active by setting BarType")
CALL Prtwindow(5,2,"equal to the type desired.")
CALL Prtwindow(7,2,"Press enter to return...")
WHILE NOT INSTAT
WEND
a$ = INKEY$
CALL Removewindow
END SUB
SUB Generalhelp
CALL Makewindow(14,10,9,55,FNAttr(0,2),FNAttr(0,2),2,FNAttr(8,7),7,1)
CALL Titlewindow(2,FNAttr(14,2),"[ GENERAL ]")
CALL Prtwindow(1,2,"Remember MakeMenu is only a procedure executed in a")
CALL Prtwindow(2,2,"predefined window so all window effects can be used")
CALL Prtwindow(3,2,"to enhance your menu. Including border and shadow,")
CALL Prtwindow(4,2,"as well as growing and all various color attribute")
CALL Prtwindow(5,2,"combinations. The choices are almost endless!")
CALL Prtwindow(7,2,"Press enter to return...")
WHILE NOT INSTAT
WEND
a$ = INKEY$
CALL Removewindow
END SUB
SUB Mdemo
SHARED item$(),itemcount,curntpos,startpos,hlattr,flattr,bartype,flon
CALL Makewindow(6,50,6,17,FNAttr(14,5),FNAttr(14,5),2,FNAttr(8,7),7,0)
CALL Titlewindow(2,FNAttr(15,5),"[ MENUS ]")
done = 0
oldcurntpos = curntpos
curntpos = 0
WHILE NOT done
item$(1) = "First Letter"
item$(2) = "Menu Bars "
item$(3) = "General "
item$(4) = "Return "
itemcount = 4
startpos = 1
hlattr = FNAttr(0,7)
flattr = FNAttr(15,5)
flon = -1
bartype = 1
CALL Makemenu
SELECT CASE curntpos
CASE 1
CALL Flhelp
CASE 2
CALL Barhelp
CASE 3
CALL Generalhelp
CASE ELSE
CALL Removewindow
curntpos = oldcurntpos
done = -1
END SELECT
WEND
done = 0
END SUB