home *** CD-ROM | disk | FTP | other *** search
-
-
- STATIC counter := 0, screens := { {''}, {''} }
-
- *****************************************************************
- FUNCTION SHADOW (top, left, bottom, right, attribute)
- *****************************************************************
-
- * Display a shadow (in any color) below and right of boxed area
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- LOCAL pointer := shad_cnt := shad_len := 0, shadow := ''
-
- * Increment shadow counter, shadow coordinates and stack array
- counter++ ; bottom++ ; right++
- ASIZE(screens[1], counter) ; ASIZE(screens[2], counter)
-
- * Use attribute if passed, otherwise default is black background
- attribute = IF(VALTYPE(attribute) == 'N', attribute, 7)
-
- * Push shadow area on screen stack for restoring
- screens[1, counter] = SCRNSAVE(bottom, left+1, bottom, right+1)
- screens[2, counter] = SCRNSAVE(top+1, right, bottom, right+1)
-
- * Display shadow only if coordinates are on screen
-
- IF bottom <= MAXROW() .AND. right <= MAXCOL() - 1
-
- FOR shad_cnt = 1 TO 2
-
- * Create vertical and horizontal shadows
- shad_len = LEN(screens[shad_cnt, counter])
- shadow = screens[shad_cnt, counter]
-
- * Stuff new attribute in shadow variable
- FOR pointer = 6 TO shad_len STEP 2
- shadow = STUFF(shadow, pointer, 1, CHR(attribute))
- NEXT
-
- * Display shadow screen
- SCRNREST(shadow)
- NEXT
- ENDIF
-
- RETURN NIL
-
-
- *****************************************************************
- FUNCTION CLRSHADOW
- *****************************************************************
-
- * Restore shadowed screen areas
-
- IF counter > 0
-
- SCRNREST(screens[1, counter])
- SCRNREST(screens[2, counter])
-
- * Decrement screen counter
- counter--
- ENDIF
- RETURN NIL
-
-