Hi Ian, On Mon, Aug 22, 2011 at 1:57 PM, MacArthur, Ian (SELEX GALILEO, UK) < [email protected]> wrote:
> > > Is there any way to, for example, first create a few menu > > items then create > > a menu and then add each menu item previously created to this > > menu then > > create a menu bar and add to it the menu previously created > > (with all the > > menu items) - all dynamically on heap - instead of defining > > arrays. I don't > > see any functions like Menu::add(MenuItem *mi), > > MenuBar::add(Menu *m), etc. > > All functions take pointers to char strings. Any help? > > Um, this is C++, so you do know that the Fl_Menu_ widgets all inherit > the methods of their parents, right? > > Anyway, did you look at the examples Greg suggested? Several of those > demonstrate dynamic menu creation. That's all very well. But I mean menus get created on arrays and they have to be found using strings. If they got created dynamically on heap using a linked list structures then any menu/menu item/menu bar could be accessed directly via object pointers. That's what I meant. But anyway, I think I can maintain this structure myself. Best, Asif _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

