> I have an app that, in its menu structure, has some FL_MENU_TOGGLE
> entries that show a check mark... Now, depending on various happenings
> within the code, these check marks may be set or cleared
> programmatically at runtime, using e.g. item->set(); and item->clear();
> 
> All well and good - except on OSX where I am using Fl_Sys_Menu_Bar,
> where the changes to the state of the toggles are never shown by the
> menus...


> Anyone else seeing this? Is there a workaround? How do I cause the
> Fl_Sys_Menu_Bar to be refreshed to reflect the actual state?
> 
> I guess this may be a bug? Or is this Just The Way Things Are on OSX
> and we are stuck with it?

(Replying to my own post here...)

I took a brief look at this, and it does seem as if the 
Fl_Sys_Menu_Bar on OSX does not get "updated" to reflect the
changes caused by the Fl_Menu_Item::set(),clear() and set_only()
methods, in its current form.

Not sure how to make that work (it is beyond my OSX-fu skills)
but I guess it might be possible to "sledgehammer" it by triggering
a call to convertToMenuBar(...) which would tear down and then
rebuild the entire Fl_Sys_Menu_Bar.

Sounds a bit heavy-handed, but should work and mean that the
state is reported correctly...

Anyway, that looks like something that I can do by deriving my
own class from Fl_Sys_Menu_Bar and adding a few new methods
to test it, so I'll maybe take a stab at that later.
(No OSX machines in this office, so can't test now!)

-- 
Ian



********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to