MenuBackend, new menu managment library

Cant use my Playground profile tonight, so here is:
Header: Pastebin.com - #1 paste tool since 2002!
Keywords: Pastebin.com - #1 paste tool since 2002!
Version 1.2 with hasChildren and setCurrent

The hasChildren can be tested as normal:

if (item.hasChildren())

Or you can do specific tests

if ( mi->hasChildren() & MenuItem::RIGHT) {/*yay! we have a child to the right!*/}

When using setCurrent, it will trigger an event if the item you set it to does not match the current.

menu.setCurrent( menu.getRoot() ); //will trigger a change if current!=root

I will keep the getRoot and getCurrent to returning references, because this is the methods most user will need. And, I do not want to introduce pointers (and the need to test for 0) to the beginners. Also, I like to guarantee that both the root, and the current returns a reference not a null, because of the reasons just stated. :slight_smile:

[edit]Thank you for useful feedback and suggestions![/edit]