Gel2D - The free/open source game creation suite

Public Member Functions
gel::GelGUICheckBox Class Reference

GUI check box widget. More...

#include <gelGUIWidget.h>

Inheritance diagram for gel::GelGUICheckBox:
gel::GelGUIWidget gel::GelObject gel::GelTextureObject gel::GelEventReceiver

List of all members.

Public Member Functions

 GelGUICheckBox ()
 Default GelGUICheckBox constructor.
void check ()
 Checks/unchecks the checkbox.
void check (bool bcheck)
 Checks the checkbox.
bool isChecked () const
 Gets the state of the checkbox.
void setCheckState (int state)
 Sets the state of the checkbox.
int getCheckState () const
 Sets the state of the checkbox.
void setTristate (bool state)
 Enables/disables tristate support.
bool isTristate () const
 Checks whether tristate is enabled.
void setLabel (const GelString &string)
void setSize (const Gel2dVec &size)
void mapRect (const Gel2dVec &pos, const Gel2dVec &size)
void setTexture (GelTexture *tex)
 Sets the widget's texture.
void update ()
void render ()
 Renders the widget to the screen.

Detailed Description

GUI check box widget.


Constructor & Destructor Documentation

gel::GelGUICheckBox::GelGUICheckBox ( )

Default GelGUICheckBox constructor.


Member Function Documentation

void gel::GelGUICheckBox::check ( )

Checks/unchecks the checkbox.

This function reverses the checkbox's state. If it is checked, then it will be unchecked and vice versa.
If the checkbox is set to tristate, this function will increment the checkbox's state.

void gel::GelGUICheckBox::check ( bool  bcheck)

Checks the checkbox.

Parameters:
bcheck: Use true to check the checkbox, and false to uncheck it.
bool gel::GelGUICheckBox::isChecked ( ) const

Gets the state of the checkbox.

Returns:
True if the checkbox is checked, else false.
void gel::GelGUICheckBox::setCheckState ( int  state) [inline]

Sets the state of the checkbox.

Parameters:
state: The state to set the checkbox to.
int gel::GelGUICheckBox::getCheckState ( ) const [inline]

Sets the state of the checkbox.

Use this function instead of isChecked() if tristate is enabled.

Returns:
The state of the checkbox.
void gel::GelGUICheckBox::setTristate ( bool  state)

Enables/disables tristate support.

Tristate enables a third checkbox state, allowing the widget to be only partially checked. This is often used in hierarchical models.
Tristate is disabled by default.

Parameters:
state: Use true to enable tristate, or false to disable it.
bool gel::GelGUICheckBox::isTristate ( ) const [inline]

Checks whether tristate is enabled.

Returns:
True if tristate is enabled, else false.
void gel::GelGUICheckBox::setLabel ( const GelString string) [inline]
void gel::GelGUICheckBox::setSize ( const Gel2dVec size)
void gel::GelGUICheckBox::mapRect ( const Gel2dVec pos,
const Gel2dVec size 
)
void gel::GelGUICheckBox::setTexture ( GelTexture tex)

Sets the widget's texture.

Parameters:
tex: The widget's new texture.
void gel::GelGUICheckBox::update ( )
void gel::GelGUICheckBox::render ( ) [virtual]

Renders the widget to the screen.

Reimplemented from gel::GelObject.


The documentation for this class was generated from the following file: