home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
600-699
/
ff634.lha
/
APIG
/
apig33.lzh
/
e9_layers.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-09-27
|
3KB
|
139 lines
/* example using Layer functions */
/* */
x = addlib("apig.library",0,-30,0)
portname = "example9_port"
p = openport(portname)
call set_apig_globals() /* Create Intuition Global Constants */
wintitle = "This is your title"
winidcmp = CLOSEWINDOW+GADGETDOWN+GADGETUP+REFRESHWINDOW
winflags = WINDOWCLOSE+WINDOWDRAG+WINDOWSIZING+WINDOWDEPTH+GIMMEZEROZERO+SMART_REFRESH+ACTIVATE
/* open window */
w1 = openwindow(portname,0,0,640,400,2,4,winidcmp,winflags,wintitle,0,1,0,0)
rpw1 = getwindowrastport(w1)
w3 = openwindow(portname,100,200,240,100,2,4,winidcmp,winflags,"Window Three",0,0,0,0)
rpw3 = getwindowrastport(w3)
w2 = openwindow(portname,100,100,440,250,2,4,winidcmp,winflags,"Window Two",0,1,0,0)
rpw2 = getwindowrastport(w2)
lay = createupfrontlayer(w1,50,50,300,180,LAYERSMART,0)
lrp = getlayerrastport(lay)
lay2 = createbehindlayer(w1,150,100,300,180,LAYERSMART,0)
lrp2 = getlayerrastport(lay2)
x = setrast(lrp,3)
x = setrast(lrp2,7)
x = setapen(lrp2,4)
x = setbpen(lrp2,3)
x = setdrmd(lrp2,JAM2)
x = move(lrp2,0,15)
x = text(lrp2," this is a layer ",-1)
x = setapen(lrp,1)
x = rectfill(lrp,20,20,120,80)
wait 2 secs
z = movelayerinfrontof(lay2,lay)
wait 2 secs
x = movelayer(lay,230,40)
x = move(lrp,0,10)
x = setdrmd(lrp,JAM1)
x = setapen(lrp,5)
x = text(lrp,"hey this is a layer too ",-1)
x = move(lrp,5,28)
x = text(lrp,"this box is ",-1)
x = move(lrp,5,45)
x = text(lrp,"just a rectfill",-1)
z = refreshwindowframe(w2)
wait 3 sec
do i = 1 to 24
if i < 11 then
x = writeconsole(w1,"this is a test=" i || '0a'x)
x = writeconsole(w2,"okay buddy what are you doing with this program." || '0a'x)
end
x = movelayer(lay,-230,0)
wait 2 sec
x = movelayer(lay,180,0)
z = refreshwindowframe(w2)
wait 1 sec
z = behindlayer(lay)
wait 2 secs
z = upfrontlayer(lay)
wait 2 secs
z = sizelayer(lay,90,120)
z = move(lrp,10,150)
z = text(lrp,"hey buddy see this layer just got bigger ",-1)
wait 3 secs
x = movelayer(lay,-180,0)
z = upfrontlayer(lay2)
wait 1 secs
z = behindlayer(lay2)
wait 1 secs
z = upfrontlayer(lay2)
wait 1 secs
x = movelayer(lay2,-60,-10)
wait 1 secs
x = movelayer(lay2,-60,-10)
z = refreshwindowframe(w2)
wait 3 sec
x = deletelayer(lay)
x = deletelayer(lay2)
z = refreshwindowframe(w2)
exitme = 0
x = writeconsole(w1,"Okay Im Done" || '0a'x)
x = writeconsole(w1,"Okay Im Done" || '0a'x)
x = writeconsole(w2,"Okay Im Done" || '0a'x)
x = writeconsole(w2,"Okay Im Done" || '0a'x)
do forever
x = waitpkt(portname)
do forever
msg = '0000 0000'x
msg = getpkt(portname)
if msg = '0000 0000'x then leave
class = getarg(msg,0)
if class = CLOSEWINDOW then exitme = 1
x = reply(msg,0)
end
if exitme = 1 then leave
end
a =closewindow(w2)
a =closewindow(w3)
a =closewindow(w1)
a =closescreen(scr)
exit