1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibGUI: More work on client-side menus.

This commit is contained in:
Andreas Kling 2019-02-11 15:37:12 +01:00
parent c75ecaae32
commit 757429fb55
6 changed files with 55 additions and 3 deletions

View file

@ -1,6 +1,7 @@
#include <LibGUI/GMenu.h>
GMenu::GMenu()
GMenu::GMenu(const String& name)
: m_name(name)
{
}
@ -8,4 +9,12 @@ GMenu::~GMenu()
{
}
void GMenu::add_item(unsigned identifier, const String& text)
{
m_items.append({ identifier, text });
}
void GMenu::add_separator()
{
m_items.append(GMenuItem(GMenuItem::Separator));
}