mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 01:15:07 +00:00
LibGUI: Add GAction class and make GMenu deal in actions rather than strings.
This commit is contained in:
parent
a5a7ea3d1e
commit
3085e400bc
9 changed files with 103 additions and 43 deletions
|
@ -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))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue