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

CEGUI::Checkbox Class Reference

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

Inheritance diagram for CEGUI::Checkbox:
Collaboration diagram for CEGUI::Checkbox:

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 WidgetTypeName
 Window factory name.
static const String EventCheckStateChanged

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

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.
virtual void CEGUI::Checkbox::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::Checkbox::setSelected ( bool  select)

set whether the check-box is selected or not

Parameters:
selecttrue 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 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 then checked state of the Checkbox changes. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Checkbox whose state has changed.