... And here's the relevant (V1.4) documentation. NOTE: this is in the Fl_Menu_Item doc, not the Fl_Menu doc.
31.76.2.4 callback() [1/5] Fl_Callback_p Fl_Menu_Item::callback ( ) const [inline] Returns the callback function that is set for the menu item. Each item has space for a callback function and an argument for that function. Due to back compatibility, the Fl_Menu_Item itself is not passed to the callback, instead you have to get it by calling ((Fl_Menu_ ∗ )w)- > mvalue() where w is the widget argument.
On Sunday, May 15, 2022 at 2:54:12 PM UTC-4 sups...@gmail.com wrote:
I have a Fl_Menu_Button with some menu items inside it. The menu items look like this:
For whatever reason, it always returns FL_MENU_VALUE (4), regardless of whether I checked or unchecked the box. From the docs it says it should return 0 if the item is not checked. Where have I gone wrong?
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.