CEGUI::RadioButton Class Reference

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

Inheritance diagram for CEGUI::RadioButton:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::RadioButton:

Collaboration graph
[legend]

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


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.

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.

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.

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)

Returns:
true if this widget is selected, false if the widget is not selected.

Referenced by deselectOtherButtonsInGroup(), and getSelectedButtonInGroup().

void CEGUI::RadioButton::onMouseButtonUp ( MouseEventArgs e  )  [protected, virtual]

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

set the groupID for this radio button

Parameters:
group ulong value specifying the radio button group that this widget belongs to.
Returns:
Nothing.

References deselectOtherButtonsInGroup().

void CEGUI::RadioButton::setSelected ( bool  select  ) 

set whether the radio button is selected or not

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

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.

Parameters:
class_name The 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().


Generated on Thu Nov 27 20:34:37 2008 for Crazy Eddies GUI System by  doxygen 1.5.7.1