mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 05:55:13 +00:00
23 lines
519 B
C++
23 lines
519 B
C++
#include <LibGUI/GAction.h>
|
|
|
|
GAction::GAction(const String& text, const String& custom_data, Function<void(const GAction&)> on_activation_callback)
|
|
: m_text(text)
|
|
, on_activation(move(on_activation_callback))
|
|
, m_custom_data(custom_data)
|
|
{
|
|
}
|
|
|
|
GAction::GAction(const String& text, Function<void(const GAction&)> on_activation_callback)
|
|
: GAction(text, String(), move(on_activation_callback))
|
|
{
|
|
}
|
|
|
|
GAction::~GAction()
|
|
{
|
|
}
|
|
|
|
void GAction::activate()
|
|
{
|
|
if (on_activation)
|
|
on_activation(*this);
|
|
}
|