@nbache
I would be inclined to impose no limits in the design itself (so as to allow free extension), but I'd of course make the class cater for the current limitations. For example, when adding a submenu beyond the depth limit the instantiation will fail.
There is a small problem with applying the recursive design to the existing menu system. Although the menu is essentially a tree-like
hierarchical structure, Gadtools utilized the current limitation (low depth) to represent the menu strip in a
linear fashion instead - as a sequence of data structures. So if the class adopts the recursive design, the resulting object hierarchies will need to get translated to the linear sequence of NewMenus. There will be a plenty of food for thought I'm sure
Edited by trixie on 2014/7/2 13:01:25