|
|
> El 13 may. 2022, a las 21:15, Gonzalo Garramuno <ggarra13@gmail.com> escribió:
>
>
>
>> El 13 may. 2022, a las 11:01, Manolo <manolo.gouy@gmail.com> escribió:
>>
>> The menubar demo program calls Fl_Sys_Menu_Bar::clear() when switching from the Fl_Sys_Menu_bar mode
>> to the Fl_Menu_Bar mode. The effect is that all macOS menus do disappear. Only the application menu remains, but that's a feature because an app should always have an application menu.
>>
>> Please, describe in more detail the program you use that create the problem you report.
>
> I confirm that the demo program works. However, in my use case, it doesn’t. I have a function that is used to fill both a RMB Fl_Menu_Button and the Fl_Menu_Bar (in this case Fl_Sys_Menu_Bar). I fill the menu using the base class Fl_Menu_, like:
>
Okay. I see what the problem is. Fl_Menu_ does not define clear(), add(), etc. as virtual functions, so calling them from Fl_Menu_ has no effect. Fl_Menu_Button and Fl_Menu_Bar are just define as Fl_Menu_.
It is not clear to me why it works the first time I run the code on Fl_Sys_Menu_Bar, as it should never work.
May I request an enhancement to turn the Fl_Menu_ functions into virtuals?
—
Gonzalo Garramuno
ggarra13@gmail.com
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/F372339D-96FB-41B1-BABA-22D35355C26C%40gmail.com.
[ Direct Link to Message ] | |
|
| |