(the region is the red area)
The region is placed so that it connects each button with a door. We can write the button's New() proc so that it uses the region to find what door it's associated with:
The region.get() proc takes two arguments. The first is the source atom. The second is an object type to search for. The get() proc returns an instance of the specified type that resides in the same connected component of the region. Because it only looks in the part of the region that's connected to the source atom, we can use this same region type to create groupings between many pairs of buttons and doors.