mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibGUI: Add GAction class and make GMenu deal in actions rather than strings.
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
#include <LibGUI/GMenuItem.h>
|
||||
#include <LibGUI/GAction.h>
|
||||
|
||||
GMenuItem::GMenuItem(Type type)
|
||||
: m_type(type)
|
||||
{
|
||||
}
|
||||
|
||||
GMenuItem::GMenuItem(unsigned identifier, const String& text)
|
||||
: m_type(Text)
|
||||
, m_identifier(identifier)
|
||||
, m_text(text)
|
||||
GMenuItem::GMenuItem(OwnPtr<GAction>&& action)
|
||||
: m_type(Action)
|
||||
, m_action(move(action))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user