On 15.05.2011, at 20:02, Nikita Egorov wrote:

> On Sun, May 15, 2011 at 9:26 PM, Albrecht Schlosser
> <[email protected]> wrote:
>> On 15.05.2011 19:22, Albrecht Schlosser wrote:
>> 
>>> I did this, and what you write is correct, but what is the *last* item
>>> in a menu array? I think that your assumption is wrong, because size()
>>> "returns the number of Fl_Menu_Item structures that make up the menu,
>>> correctly counting submenus", according to the docs.
>> 
>> Sorry, I forgot to cite the next important sentence: "This includes the
>> "terminator" item at the end."
> 
>> 
>>> Hence there are size()-1 menu items in the array (w/o the terminating
>>> zero item), and since menu items start counting at 0, this means:
>> 
> 
> Yes, obviously I had to learn deeper the feature, before I wrote my
> letter in a hurry.
> 
> But, to be honest it is a very confusing thing in FLTK, doesn't? I
> mean indexes in different kinds of widgets.

This is a leftover of Forms Library compatibility. Eventually FLTK1 will have a 
regular widget hierarchy to draw menus.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to