mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
LibGUI: More work on client-side menus.
This commit is contained in:
parent
c75ecaae32
commit
757429fb55
6 changed files with 55 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <LibGUI/GMenuBar.h>
|
||||
|
||||
static void make_shell(int ptm_fd)
|
||||
{
|
||||
|
@ -72,5 +73,17 @@ int main(int argc, char** argv)
|
|||
window->move_to(300, 300);
|
||||
window->show();
|
||||
|
||||
auto menubar = make<GMenuBar>();
|
||||
|
||||
auto app_menu = make<GMenu>("Terminal");
|
||||
app_menu->add_item(1, "Quit");
|
||||
menubar->add_menu(move(app_menu));
|
||||
|
||||
auto help_menu = make<GMenu>("?");
|
||||
help_menu->add_item(2, "About");
|
||||
menubar->add_menu(move(app_menu));
|
||||
|
||||
app.set_menubar(move(menubar));
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue