Traverse a reference object and all descendants Object_Tree_First finds the first descendant by selecting the child of the reference object and then that object’s child until a child does not exist. Object_Tree_Next will return the next object selecting as follows: 1: If this is the reference, the process is complete and return 0. 2: If a sibling exists with a child, return the furthest descendant child. This effectively uses Object_Tree_First to find the sibling’s descendant. 3: If a sibling exists without a child, return the sibling. 4: If the parent is not the reference, return the parent. 5: The parent is the reference, return the reference. If the tree changes between calls, the results may not include all objects. |