14 #ifndef GUI_WIDGETS_GROUP_HPP_INCLUDED
15 #define GUI_WIDGETS_GROUP_HPP_INCLUDED
45 members_.push_back(std::make_pair(widget, value));
47 dynamic_cast<twidget*
>(widget)->connect_signal<event::LEFT_BUTTON_CLICK>(std::bind(
57 [&widget](
const group_type& member){
return member.first == widget; }));
71 std::pair<group_iterator, group_iterator>
members()
76 std::pair<group_iterator_const, group_iterator_const>
members()
const
89 member.first->set_value(
false);
101 if(member.first->get_value_bool()) {
102 return member.second;
117 member.first->set_value(member.second == value);
void clear()
Clears the entire group of members.
void remove_member(tselectable_ *widget)
Removes a member from the group vector.
A class inherited from ttext_box that displays its input as stars.
std::vector< group_type > group_list
GLsizei const GLfloat * value
std::pair< group_iterator, group_iterator > members()
Group member getters.
std::pair< group_iterator_const, group_iterator_const > members() const
Small abstract helper class.
T get_active_member_value()
Returns the value paired with the currently activiely toggled member of the group.
std::pair< tselectable_ *, T > group_type
void add_member(tselectable_ *widget, const T &value)
Adds a widget/value pair to the group vector.
void group_operator()
The default actions to take when clicking on one of the widgets in the group.
void set_member_states(const T &value)
Sets the toggle values for all widgets besides the one associated with the specified value to false...
group_list::const_iterator group_iterator_const
group_list::iterator group_iterator