|
|
Thank you, this is an interesting proposal.
However, why can't you just use the menu item above the one in question to draw the divider below that one? Is this due to allocating static menu entries, submenus, or ... ? I'm curious and would like to understand the issue better for later documentation.
Anyway, here are some thoughts:
- FL_MENU_DIVIDER is one of many bits in the flags member of Fl_Menu_Item, hence it would be possible to set both bits simultaneously and we should support this as well.
- I suggest not to use a combination of two characters for one flag, I'd rather choose a new one for the new flag, e.g.
'^' if this is not already used. If two characters are really necessary, then the new flag should be two different character, e.g. '^_' so '^__' or '_^_' could be used for both flags at the same time w/o ambiguity.
- Backwards compatibility is a high priority in FLTK. We must take care not to break existing programs, hence the requirement to change existing programs would be a no-go. I don't have a final solution in mind, but one way would be to require that new programs set an option which enables the new flag parser feature (otherwise it would be ignored and used as menu text).
- If this flag would be implemented we'd have to consider that the existing FL_MENU_DIVIDER acts as a group delimiter so radio buttons can form separate groups. It would be an advantage if
FL_MENU_DIVIDER_ABOVE would also limit radio button groups in the obvious direction (upwards). This could also be helpful if a radio button is the first entry in a menu where searching "upwards" (to find neighbor radio buttons) would access non-existing menu items. In this case an invisible divider would likely also be a "good idea".
- What about adding a new Fl_Menu_Item type that does nothing but drawing a menu divider? Would this also be an option for you?
As said above, these are only thoughts...
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/479/1214142128@github.com>
[ Direct Link to Message ] | |
|
| |