def child_containing(x, y, z)
      found = nil
      children.find { |c|
        next if found

        # recursively descend into layout children
        if c.component.kind_of?(Layout)
          found = c.child_containing(x, y, z)

        else
          found =
            c.total_x <= x && c.total_y <= y && # c.z >= z
           (c.total_x + c.cols) >= x && (c.total_y + c.rows) >= y
          found = c if found
        end
      }

      found
    end
def child_containing(x, y, z)
      found = nil
      children.find { |c|
        next if found

        # recursively descend into layout children
        if c.component.kind_of?(Layout)
          found = c.child_containing(x, y, z)

        else
          found =
            c.total_x <= x && c.total_y <= y && # c.z >= z
           (c.total_x + c.cols) >= x && (c.total_y + c.rows) >= y
          found = c if found
        end
      }

      found
    end
Return child containing specified screen coordiantes, else nil