5#include "fifechan/widgets/togglebutton.hpp"
13 ToggleButton::ToggleButton()
19 ToggleButton::ToggleButton(std::string
const & caption, std::string
const & group,
bool selected)
27 ToggleButton::~ToggleButton()
40 if (selected && !
mGroup.empty()) {
47 if (iter->second->isSelected()) {
48 iter->second->setSelected(
false);
71 if (iter->second ==
this) {
79 mGroupMap.insert(std::pair<std::string, ToggleButton*>(group,
this));
112 }
else if (mouseEvent.
getButton() == MouseEvent::Button::Left) {
Key const & getKey() const
Gets the key of the event.
Represents a keyboard key or character code.
int getValue() const
Gets the value of the key.
Represents a mouse event.
MouseEvent::Button getButton() const
Gets the button of the mouse event.