mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibGUI: Add MenuBar::add_menu(name)
This allows us to construct menus in a more natural way: auto& file_menu = menubar->add_menu("File"); file_menu.add_action(...); Instead of the old way: auto file_menu = GUI::Menu::construct(); file_menu->add_action(...); menubar->add_menu(file_menu);
This commit is contained in:
parent
faac43597a
commit
26eeaef0a8
26 changed files with 261 additions and 331 deletions
|
@ -37,7 +37,8 @@ public:
|
|||
MenuBar();
|
||||
~MenuBar();
|
||||
|
||||
void add_menu(NonnullRefPtr<Menu>);
|
||||
Menu& add_menu(String name);
|
||||
void append_menu(NonnullRefPtr<Menu>);
|
||||
|
||||
void notify_added_to_application(Badge<Application>);
|
||||
void notify_removed_from_application(Badge<Application>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue