mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-26 19:22:30 -05:00
7083a0104a
This can be used to make a bunch of actions mutually exclusive. This patch only implements the exclusivity behavior for buttons.
14 lines
294 B
C++
14 lines
294 B
C++
#include <LibGUI/GAction.h>
|
|
#include <LibGUI/GActionGroup.h>
|
|
|
|
void GActionGroup::add_action(GAction& action)
|
|
{
|
|
action.set_group({}, this);
|
|
m_actions.set(&action);
|
|
}
|
|
|
|
void GActionGroup::remove_action(GAction& action)
|
|
{
|
|
action.set_group({}, nullptr);
|
|
m_actions.remove(&action);
|
|
}
|