mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 09:03:22 +00:00
24 lines
519 B
C++
24 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);
|
||
|
}
|