Serenity Operating System
at master 24 lines 425 B view raw
1/* 2 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <LibGUI/Action.h> 8#include <LibGUI/ActionGroup.h> 9 10namespace GUI { 11 12void ActionGroup::add_action(Action& action) 13{ 14 action.set_group({}, this); 15 m_actions.set(&action); 16} 17 18void ActionGroup::remove_action(Action& action) 19{ 20 action.set_group({}, nullptr); 21 m_actions.remove(&action); 22} 23 24}