New widget: YMenuBar; mandatory for all UIs.
Features:
-
A menu bar holding pull-down menus
-
Pull-down menus
-
Simple menu items with an ID and a translated text
- optional: a keyboard shortcut (globally accessible in that dialog)
- optional: an icon
-
Menu separators (a simple line separating groups of menu items)
-
Submenus
-
Enable / disable individual menu items
Optional:
- Checkable menu items (on/off)
- ?? Also optional radio button behaviour for checkable menu items?
- This would need some grouping; either in the current submenu or in a special (invisible) radio button group container
- Check if the existing YMenuEvent is sufficient (probably it is)
- Maybe don't extend the YCPValue-based yast-ycp-ui-bindings, use SWIG bindings instead
- SWIG bindings appear to exist for libyui for the Mageia project that uses primarily libyui-gtk, but also libyui-ncurses
Once we have the infrastructure for this, we might want to check if and when context menus make sense for YaST; possibly for larger widgets like YRichText (proposal!), tables and trees.
This is a part of the YWizard widget which is an optional "special" widget that not all UIs (not NCurses, for example!) provide. It uses some more UI.WizardCommand()
sub-commands.
Very basic stuff, only simple menu items, no enabling/disabling, no submenus, no checkable items.
https://github.com/manatools/libyui-mga
Looks very basic, very much like the wizard menu. That menu bar inherits YSelectionWidget (not sure if that's a good idea; need to check).
They also have "hidden" menu items which is most questionable from a usability perspective.