Crazy Eddies GUI System 0.7.5
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes

CEGUI::RadioButton Class Reference

Base class to provide the logic for Radio Button widgets. More...

Inheritance diagram for CEGUI::RadioButton:
Collaboration diagram for CEGUI::RadioButton:

List of all members.

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
RadioButtongetSelectedButtonInGroup (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

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

Detailed Description

Base class to provide the logic for Radio Button widgets.


Member Function Documentation

ulong CEGUI::RadioButton::getGroupID ( void  ) const [inline]

return the groupID assigned to this radio button

Returns:
ulong value that identifies the Radio Button group this widget belongs to.
RadioButton* CEGUI::RadioButton::getSelectedButtonInGroup ( void  ) const

Return a pointer to the RadioButton object within the same group as this RadioButton, that is currently selected.

Returns:
Pointer to the RadioButton object that is the RadioButton within the same group as this RadioButton, and is attached to the same parent window as this RadioButton, that is currently selected. Returns NULL if no button within the group is selected, or if 'this' is not attached to a parent window.
bool CEGUI::RadioButton::isSelected ( void  ) const [inline]

return true if the radio button is selected (has the checkmark)

Returns:
true if this widget is selected, false if the widget is not selected.
virtual void CEGUI::RadioButton::onMouseButtonUp ( MouseEventArgs e) [protected, virtual]

Handler called when a mouse button has been released within this window's area.

Parameters:
eMouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::ButtonBase.

void CEGUI::RadioButton::setGroupID ( ulong  group)

set the groupID for this radio button

Parameters:
groupulong value specifying the radio button group that this widget belongs to.
Returns:
Nothing.
void CEGUI::RadioButton::setSelected ( bool  select)

set whether the radio button is selected or not

Parameters:
selecttrue 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.
Returns:
Nothing.
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.

Parameters:
class_nameThe class name that is to be checked.
Returns:
true if this window was inherited from class_name. false if not.

Reimplemented from CEGUI::ButtonBase.

References CEGUI::ButtonBase::testClassName_impl().


Member Data Documentation

Event fired when the selected state of the radio button changes. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the RadioButton whose selected state has changed.