#include <ItemGroup.h>
Public Member Functions | |
ItemGroup * | group () const |
The ItemGroup created by this. | |
MenuSection (const char *label=0) | |
build a typical submenu group section, then call begin() | |
~MenuSection () | |
call end() at destruction |
This class will elegantly facilitate dynamic (& hand-made) menu code writing by creating and calling begin() on an ItemGroup in the constructor and calling end() in the destructor:
mymenu->begin(); new Item("in main menu"); {MenuSection g("submenu title"); new Item("in submenu"); new Item("also in submenu"); } // destructor ends the submenu