the visible of a stack

Robert Brenstein rjb at robelko.com
Fri Sep 26 05:38:23 EDT 2008


On 25/09/08 at 13:15 -0700 Dick Kriesel apparently wrote:
>Hi, Chipp.  Here's a version that's effectively the same but that has a
>couple minor advantages.  First, it has a single exit point, possibly
>improving maintainability.  Second, it executes the corner functions only
>once no matter how many screens there are, possibly improving performance.
>
>-- Dick
>
><script>
>function isStackCurrentlyVisibleOnAnyMonitor pStack
>     --> pStack IS THE SHORT NAME OF STACK
>     put "false" into tResult
>     if pStack is among the lines of windows() then
>         if the visible of stack pStack then
>             if the blendlevel of stack pStack < 100 then
>                 put the topleft of stack pStack into tTopLeft
>                 put the topright of stack pStack into tTopRight
>                 put the bottomleft of stack pStack into tBottomLeft
>                 put the bottomright of stack pStack into tBottomRight
>                 repeat for each line tScreenRect in the screenrects
>                     if tTopLeft is within tScreenRect or \
>                             tTopRight is within tScreenRect or \
>                             tBottomLeft is within tScreenRect or \
>                             tBottomRight is within tScreenRect then
>                         put "true" into tResult
>                         exit repeat
>                     end if
>                 end repeat
>             end if
>         end if
>     end if
>     return tResult
>end isStackCurrentlyVisibleOnAnyMonitor
></script>
>


Would this be a candidate for inclusion in the StandardLib?

Robert



More information about the use-livecode mailing list