On 18.07.2012, at 11:29, M3taSpl0it wrote: > Quote from fltk 1.3.0 , 30.77.2.4 : > > **int Fl Menu Item::add ( const char mytext, int sc, Fl_Callback cb, void > data = 0, int myflags = 0 ) Adds an item. > > The text is split at ’/’ characters to automatically produce submenus > (actually a totally unnecessary feature as you can now add submenu titles > directly by setting SUBMENU in the flags)** > > As you can see fltk documentation calls '/' actually a totally unnecessary > feature. Can you explain me above para in easy word and how does "SUBMENU" > (did he mean FL_SUBMENU ? ) in flags does that?
Well, the documentation is written by many people, who may have entirely different ideas on what is useful and what not. If you like the '/' feature, by all means, use it. > Also I could'nt understand what's use of flag FL_SUBMENU_POINTER? . Please > teach with an easy example? Fl_Menu_Item is a construct that is very different to the rest of FLTK. It only exists in this way for compatibility with Forms. A complete pulldown menu hierarchy can be created using a single array. Submenus (and susb-sub menus, etc.) are started by marking a menu item with FL_SUBMENU. All following menu items will be part of the submenu until a menu item with a NULL label appears. But sometimes, it is better to hold submenus in their own array. This can be done by using FL_SUBMENU_POINTER. User_data() then points to another array with the submenu. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

