# CEGUI::Checkbox Class Reference

Base class providing logic for Check-box widgets. More...

Inheritance diagram for CEGUI::Checkbox:

[legend]
Collaboration diagram for CEGUI::Checkbox:

[legend]
List of all members.

## Public Member Functions

bool | isSelected (void) const
| return true if the check-box is selected (has the checkmark)
void | setSelected (bool select)
| set whether the check-box is selected or not
| Checkbox (const String &type, const String &name)
| Constructor for Checkbox class.
virtual | ~Checkbox (void)
| Destructor for Checkbox class.

## Static Public Attributes

static const String | EventNamespace
| Namespace for global events.
static const String | EventCheckStateChanged
| The check-state of the widget has changed.

## Protected Member Functions

virtual void | onSelectStateChange (WindowEventArgs &e)
| event triggered internally when state of check-box changes
virtual void | onMouseButtonUp (MouseEventArgs &e)
| Handler called when a mouse button has been released within this window's area.
void | addCheckboxEvents (void)
| Add check-box specific events.
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 heirarchy.

## Protected Attributes

bool | d_selected
| true if check-box is selected (has checkmark)

## Detailed Description

Base class providing logic for Check-box widgets.

## Member Function Documentation

bool CEGUI::Checkbox::isSelected | ( | void |  | ) | const`[inline]`

return true if the check-box is selected (has the checkmark)

Returns:
  true if the widget is selected and has the check-mark, false if the widget is not selected and does not have the check-mark.

void CEGUI::Checkbox::onMouseButtonUp | ( | MouseEventArgs & | e | ) | `[protected, virtual]`

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

Parameters:

  | e | MouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::ButtonBase.

void CEGUI::Checkbox::setSelected | ( | bool | select | ) |

set whether the check-box is selected or not

Parameters:

  | select | true to select the widget and give it the check-mark. false to de-select the widget and remove the check-mark.

Returns:
  Nothing.

virtual bool CEGUI::Checkbox::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 heirarchy.

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.