Public Member Functions | |
bool | isSelected (void) const |
return true if the radio button is selected (has the checkmark) | |
ulong | getGroupID (void) const |
return the groupID assigned to this radio button | |
RadioButton * | getSelectedButtonInGroup (void) const |
Return a pointer to the RadioButton object within the same group as this RadioButton, that is currently selected. | |
void | setSelected (bool select) |
set whether the radio button is selected or not | |
void | setGroupID (ulong group) |
set the groupID for this radio button | |
RadioButton (const String &type, const String &name) | |
Static Public Attributes | |
static const String | EventNamespace |
Namespace for global events. | |
static const String | WidgetTypeName |
Window factory name. | |
static const String | EventSelectStateChanged |
The selected state of the widget has changed. | |
Protected Member Functions | |
void | deselectOtherButtonsInGroup (void) const |
Deselect any selected radio buttons attached to the same parent within the same group (but not do not deselect 'this'). | |
virtual bool | testClassName_impl (const String &class_name) const |
Return whether this window was inherited from the given class name at some point in the inheritance hierarchy. | |
virtual void | onSelectStateChanged (WindowEventArgs &e) |
event triggered internally when the select state of the button changes. | |
virtual void | onMouseButtonUp (MouseEventArgs &e) |
Handler called when a mouse button has been released within this window's area. | |
Protected Attributes | |
bool | d_selected |
ulong | d_groupID |
ulong CEGUI::RadioButton::getGroupID | ( | void | ) | const [inline] |
return the groupID assigned to this radio button
Referenced by deselectOtherButtonsInGroup(), and getSelectedButtonInGroup().
RadioButton * CEGUI::RadioButton::getSelectedButtonInGroup | ( | void | ) | const |
Return a pointer to the RadioButton object within the same group as this RadioButton, that is currently selected.
References CEGUI::Window::d_parent, CEGUI::Window::getChildAtIdx(), CEGUI::Window::getChildCount(), getGroupID(), CEGUI::Window::getType(), and isSelected().
bool CEGUI::RadioButton::isSelected | ( | void | ) | const [inline] |
return true if the radio button is selected (has the checkmark)
Referenced by deselectOtherButtonsInGroup(), and getSelectedButtonInGroup().
void CEGUI::RadioButton::onMouseButtonUp | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when a mouse button has been released within this window's area.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::ButtonBase.
References CEGUI::MouseEventArgs::button, CEGUI::System::getGUISheet(), CEGUI::System::getSingleton(), CEGUI::Window::getTargetChildAtPosition(), CEGUI::EventArgs::handled, CEGUI::ButtonBase::isPushed(), CEGUI::LeftButton, CEGUI::MouseEventArgs::position, and setSelected().
void CEGUI::RadioButton::setGroupID | ( | ulong | group | ) |
set the groupID for this radio button
group | ulong value specifying the radio button group that this widget belongs to. |
References deselectOtherButtonsInGroup().
void CEGUI::RadioButton::setSelected | ( | bool | select | ) |
set whether the radio button is selected or not
select | true to put the radio button in the selected state, false to put the radio button in the deselected state. If changing to the selected state, any previously selected radio button within the same group is automatically deselected. |
References deselectOtherButtonsInGroup(), onSelectStateChanged(), and CEGUI::Window::requestRedraw().
Referenced by deselectOtherButtonsInGroup(), and onMouseButtonUp().
virtual bool CEGUI::RadioButton::testClassName_impl | ( | const String & | class_name | ) | const [inline, protected, virtual] |
Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.
class_name | The class name that is to be checked. |
Reimplemented from CEGUI::ButtonBase.
References CEGUI::ButtonBase::testClassName_impl().