#include <group.hpp>
Public Types | |
typedef std::pair < tselectable_ *, T > | group_type |
typedef std::vector< group_type > | group_list |
typedef group_list::iterator | group_iterator |
typedef group_list::const_iterator | group_iterator_const |
Public Member Functions | |
void | add_member (tselectable_ *widget, const T &value) |
Adds a widget/value pair to the group vector. More... | |
void | remove_member (tselectable_ *widget) |
Removes a member from the group vector. More... | |
void | clear () |
Clears the entire group of members. More... | |
std::pair< group_iterator, group_iterator > | members () |
Group member getters. More... | |
std::pair < group_iterator_const, group_iterator_const > | members () const |
void | group_operator () |
The default actions to take when clicking on one of the widgets in the group. More... | |
T | get_active_member_value () |
Returns the value paired with the currently activiely toggled member of the group. More... | |
void | set_member_states (const T &value) |
Sets the toggle values for all widgets besides the one associated with the specified value to false. More... | |
Private Attributes | |
group_list | members_ |
typedef group_list::iterator gui2::tgroup< T >::group_iterator |
typedef group_list::const_iterator gui2::tgroup< T >::group_iterator_const |
typedef std::vector<group_type> gui2::tgroup< T >::group_list |
typedef std::pair<tselectable_*, T> gui2::tgroup< T >::group_type |
|
inline |
Adds a widget/value pair to the group vector.
A callback is set that sets all members' toggle states to false when clicked. This happens before individual widget handlers fire, meaning that the clicked widget will remain the only one selected.
Definition at line 43 of file group.hpp.
Referenced by gui2::tlogging::pre_show(), gui2::tunit_create::pre_show(), gui2::taddon_filter_options::register_dir_toggle(), gui2::teditor_edit_side::register_radio_toggle(), gui2::taddon_filter_options::register_sort_toggle(), gui2::tpreferences::setup_radio_toggle(), and gui2::tadvanced_graphics_options::setup_scale_case().
|
inline |
Clears the entire group of members.
Definition at line 63 of file group.hpp.
Referenced by gui2::taddon_filter_options::post_show(), and gui2::taddon_filter_options::pre_show().
|
inline |
Returns the value paired with the currently activiely toggled member of the group.
Definition at line 97 of file group.hpp.
Referenced by gui2::tunit_create::gender_toggle_callback(), gui2::teditor_edit_side::post_show(), gui2::taddon_filter_options::toggle_dir_callback(), gui2::tpreferences::toggle_radio_callback(), and gui2::taddon_filter_options::toggle_sort_callback().
|
inline |
The default actions to take when clicking on one of the widgets in the group.
Definition at line 85 of file group.hpp.
Referenced by gui2::tgroup< SCALING_ALGORITHM >::add_member().
|
inline |
Group member getters.
Definition at line 71 of file group.hpp.
Referenced by gui2::tgroup< SCALING_ALGORITHM >::get_active_member_value(), gui2::tgroup< SCALING_ALGORITHM >::group_operator(), and gui2::tgroup< SCALING_ALGORITHM >::set_member_states().
|
inline |
|
inline |
|
inline |
Sets the toggle values for all widgets besides the one associated with the specified value to false.
Definition at line 113 of file group.hpp.
Referenced by gui2::tlogging::pre_show(), gui2::tunit_create::pre_show(), and gui2::tadvanced_graphics_options::setup_scale_case().
|
private |
Definition at line 122 of file group.hpp.
Referenced by gui2::tgroup< SCALING_ALGORITHM >::add_member(), gui2::tgroup< SCALING_ALGORITHM >::clear(), gui2::tgroup< SCALING_ALGORITHM >::members(), and gui2::tgroup< SCALING_ALGORITHM >::remove_member().