![]() |
Gorgon Game Engine
|
This class is designed to be the interface class for all checkbox like UI elements. More...
Public Member Functions | |
TwoStateControl () | |
virtual | ~TwoStateControl () |
bool | Check () |
Changes the state of the widget. More... | |
bool | Clear () |
Changes the state of the checkbox. More... | |
bool | ForceCheck () |
Changes the state of the widget. More... | |
bool | ForceClear () |
Changes the state of the checkbox. More... | |
virtual bool | GetState () const =0 |
Returns the state of the checkbox. More... | |
operator bool () const | |
Returns the state of the checkbox. More... | |
bool | operator! () const |
Returns the inverse state of the checkbox. More... | |
TwoStateControl & | operator= (bool value) |
virtual bool | SetState (bool value, bool force=false)=0 |
Changes the state of the checkbox. More... | |
bool | Toggle () |
Changes the state of the checkbox. More... | |
Public Attributes | |
Event< TwoStateControl, bool, bool & > | StateChangingEvent |
This event. More... | |
This class is designed to be the interface class for all checkbox like UI elements.
Every widget derived from this should implement two virtual functions, assignment to bool, and should call StateChangingEvent anytime its state is about to change. If this event sets the given bool reference to false, the widget should deny state change.
TwoStateControl | ( | ) |
|
virtual |
bool Check | ( | ) |
Changes the state of the widget.
Returns true if the operation is actually performed.
References TwoStateControl::SetState().
bool Clear | ( | ) |
Changes the state of the checkbox.
References TwoStateControl::SetState().
bool ForceCheck | ( | ) |
Changes the state of the widget.
Returns true if the operation is actually performed.
References TwoStateControl::SetState().
bool ForceClear | ( | ) |
Changes the state of the checkbox.
References TwoStateControl::SetState().
|
pure virtual |
Returns the state of the checkbox.
Implemented in Checkbox.
|
explicit |
Returns the state of the checkbox.
References TwoStateControl::GetState().
bool operator! | ( | ) | const |
Returns the inverse state of the checkbox.
References TwoStateControl::GetState().
TwoStateControl& operator= | ( | bool | value | ) |
References TwoStateControl::SetState().
|
pure virtual |
Changes the state of the checkbox.
Implemented in Checkbox.
bool Toggle | ( | ) |
Changes the state of the checkbox.
References TwoStateControl::GetState(), and TwoStateControl::SetState().
Event<TwoStateControl, bool , bool & > StateChangingEvent |
This event.