2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2020-02-06 20:33:02 +01:00
|
|
|
#include <LibGUI/Action.h>
|
|
|
|
#include <LibGUI/ActionGroup.h>
|
2019-07-09 22:10:03 +02:00
|
|
|
|
2020-02-02 15:07:41 +01:00
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
void ActionGroup::add_action(Action& action)
|
2019-07-09 22:10:03 +02:00
|
|
|
{
|
|
|
|
action.set_group({}, this);
|
|
|
|
m_actions.set(&action);
|
|
|
|
}
|
|
|
|
|
2020-02-02 15:07:41 +01:00
|
|
|
void ActionGroup::remove_action(Action& action)
|
2019-07-09 22:10:03 +02:00
|
|
|
{
|
|
|
|
action.set_group({}, nullptr);
|
|
|
|
m_actions.remove(&action);
|
|
|
|
}
|
2020-02-02 15:07:41 +01:00
|
|
|
|
|
|
|
}
|