On 21.08.2011, at 18:06, asif saeed wrote:

> Is there any code example illustrating constructing an FLTK based GUI
> dynamically? Particularly, the menu bar/menus/menu items? Can you provide
> any guidelines as to how to proceed in this direction?

In FLTK1, Menus are built by using arrays of Fl_Menu_Item. You can create 
submenus by either setting the SUBMENU, in which case you stay with a single 
array that contains all menu levels, or by setting SUBMENU_POINTER, where your 
submenu is yet another array of menu items.

Basically, all rules that apply to arrays apply here, too. The classes Fl_Menu_ 
and FlMenu_Item provide a few functions to add items to the array (it 
automatically copies a static menu into a dynamically allocated array).

The fluid code shows a simple example on how to manage a list of previously 
opened files.

 - Matthias
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to