Last active
August 29, 2015 14:20
-
-
Save therocode/f9e97fb0e1962e6f106a to your computer and use it in GitHub Desktop.
GimGui tree traversal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gim::Element element(/* some initialization*/); | |
//returns a pointer to the direct parent - nullptr if no parent is present | |
element.parent(); | |
//returns a list of all direct child elements | |
element.children(); | |
//returns a list of pointers to all direct children with | |
//the supplied labels | |
element.findChildren({"label1", "label2", "label3"}); | |
//does the same as the above, except recursively | |
element.recursiveFindChildren({"label1", "label2", "label3"}); | |
//returns a list of pointers to any direct or indirect parent | |
//with the supplied labels | |
element.findParents({"label1", "label2", "label3"}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment