visibility derived from ygNode Example Source Header

Description: a switch that changes state if a user is in one or more spaces

notes:
Category: Selection
Author: Dave Pape
Revision: 11/01/01

    Messages
inside make visible when inside space
outside [bool] make visible when outside space
space string add a space node
mode [normal | on | off] set mode to normal, on or off
    Comments

constructor visibility

destructor ~visibility

method reset

1 clear the local space array
2 if net master then clear net space array

method message

1 make visible when inside space
2 make visible when outside space
3 add a space node
4 set mode to normal, on or off

method addSpace

1 find space node
2 if node is found then add to space array

method app

1 if mode is off then switch off
2 else, if mode is on switch on
3 else determine if any space contains user
3.1 for all spaces in array
3.1.1 if space contains user then set inside flag true
3.2 if inside flag is true then switch on, else switch off