Mike Werner wrote:
> Split_1->do_callback(0);
>
> Why the zero is necessary when executing a menuitem callback? For most
> widgets, button->do_callback() gets the job done. Thanks again.
When the menu item array is declared, there's no knowledge
of the widget they'll be associated with yet.
The same static menu item array can be attached to more than one
menu widget.
Since the menu items have no idea which menu they're associated with,
the do_callback function (eg. Fl_Menu_Item::do_callback()) can't know
either. Which is why the menu widget pointer has to be specified as
an argument to do_callback(), to give it context.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk