yglukhov / nimx

GUI library
MIT License
1.09k stars 75 forks source link

feature request: MenuBar #255

Open jlp765 opened 7 years ago

jlp765 commented 7 years ago

Would be nice for newbies not to have to build their own menubar each time they want a standard "windows" with the usual File|Edit|....|Help menu bar across the top (or whichever side)

kobi2187 commented 6 years ago
type MenuItem=
  tuple(String, List of MenuItem)
type MenuBar = List of MenuItem

is that pseudo code correct? like a tree. (the tuple can be replaced in actual impl) What would be a concise textual syntax to build it?

After that, there are other details to add to the type: shortcut key (accelerator), navigation keyboard char (alt+keyboard letter), image, connected action. (when the list is empty, it will not show an arrow)

kobi2187 commented 6 years ago

How Qml did it: http://doc.qt.io/qt-5/qml-qtquick-controls-menubar.html