ivansafrin/Polycode — pull request #256 by TheCosmotect (2013-04-22 23:51:53+00:00)
Title: Added ability to navigate UITrees with arrow keys; added some UITree API stuff

This is the third in my series of keyboard interactivity features. So, with this, you can focus the UITreeContainer and then have the ability to move up and down the tree with the arrow keys. Left and right will collapse/expand nodes and move between parent/child.

To make code easier to read and work with, I added a few methods to the UITree API: (`getParent()`, `hasChildren()`, `getPrevSibling()`, `getNextSibling()`). I also added a flag to enable/disable key navigation for a container (enabled by default).

I also had to implement focusing on the UITreeContainer. I'd say it's an incomplete implementation at this time however, as there is no visual indication that the container is focused. In other software, there would be something to let you know that the container is selected or not, and the tree node selector usually changes colors depending on that state.