home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
clarion
/
library
/
scrlta
/
scrltst.cla
next >
Wrap
Text File
|
1991-10-01
|
2KB
|
79 lines
!───────────────────────────────────────────────────────────────────────────────
TITLE( 'ScrollTA() Test Program' )
! Copyright Mark A. Zurier 1991
! Rev.: 91/09/26
!───────────────────────────────────────────────────────────────────────────────
ScrlTst PROGRAM
MAP
MODULE( 'ScrollTA.BIN' ),BINARY
PROC( ScrollTA )
END
END
frmTest SCREEN HUE(15,1)
ROW(1,1) STRING('┌─{18}<0{43}>─{17}┐')
ROW(2,1) REPEAT(23);STRING('│<0{78}>│') .
ROW(25,1) STRING('└─{78}┘')
ROW(1,20) STRING('ScrollTA Test Copyright Mark A. Zurier 1991')
ROW(3,5) STRING('This program will draw a rather simple ' |
& 'screen and scroll it several times')
ROW(4,5) STRING('using both Clarion''s SCROLL and the ' |
& 'ScrollTA function.')
ROW(21,30) STRING('Hit any key to continue'),HUE(7,1)
REPEAT(10),INDEX(ibNdx)
ssOutside1 ROW(6,13) STRING(12),HUE(15,4)
ssOutside2 COL(55) STRING(12),HUE(15,3)
ssString COL(25) STRING(30),HUE(0,7)
.
COL(25) POINT(10,30),USE(?ScrollArea)
ssMsg ROW(20,10) STRING(60)
.
ibNdx BYTE
ibTop BYTE
ibLeft BYTE
ibRows BYTE
ibCols BYTE
CODE
OPEN( frmTest )
! Set Clarion coords of scroll area
ibTop = ROW( ?ScrollArea )
ibLeft = COL( ?ScrollArea )
ibRows = ROWS( ?ScrollArea )
ibCols = COLS( ?ScrollArea )
! Draw test scroll area and text just outside of it.
LOOP ibNdx = 1 TO 10
ssOutside1 = 'No scroll ' & FORMAT( ibNdx, @N2 )
ssOutside2 = ibNdx & ' No scroll'
ssString = 'Scroll line ' & FORMAT( ibNdx, @N2 ) & '.{16}'
END
! Paint 5th line red
SETHUE( 4, 7 )
COLOR( ibTop+4, ibLeft, 1, 30 )
SETHUE()
ssMsg = CENTER( 'About to SCROLL up 1 line', SIZE( ssMsg ) )
ASK
SCROLL( ibTop, ibLeft, ibRows, ibCols, 1 )
ssMsg = CENTER( 'About to ScrollTA() up 1 line -- watch line 6', SIZE( ssMsg ) )
ASK
ScrollTA( ibTop, ibLeft, ibRows, ibCols, 1 )
ssMsg = CENTER( 'About to ScrollTA() down 1 line -- filling black on white', SIZE( ssMsg ) )
ASK
ScrollTA( ibTop, ibLeft, ibRows, ibCols, -1 )
ssMsg = CENTER( 'End of demo', SIZE( ssMsg ) )
ASK
RETURN