Skip to content

New libyui Widget: YMenuBar #1

Open
@shundhammer

Description

@shundhammer

We added a MenuBar widget to libyui. More details here:

https://github.com/libyui/libyui/pull/169

C++ example:

https://github.com/libyui/libyui/blob/master/examples/MenuBar1.cc

We extracted a common base class YMenuWidget from YMenuButton for some tasks that are needed in both the YMenuButton and the new YMenuBar:

https://github.com/libyui/libyui/blob/master/src/YMenuWidget.h
https://github.com/libyui/libyui/blob/master/src/YMenuWidget.cc

This includes resolving keyboard shortcut conflicts on each menu level. In the near future, it will also include resolving keyboard shortcut conflicts between the toplevel menus and other widgets in that same dialog (because a menu bar typically has more than one shortcut).

AFAICS this new widget should support all features that your MGAMenuBar has, with one notable exception: Hiding menu entries.

Can you explain how this is expected to be used? A use case?
This should be easy to add for the Qt UI; I am not so sure about NCurses, though.

Once that is done, we might want to unify both widgets. Or if you prefer that, you can of course continue to use your MGAMenuBar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions