#include <CheckBox.h>
Inherits Widget.
Inheritance diagram for CheckBox:


Public Methods | |
| CheckBox () | |
| Default constuctor. More... | |
| bool | isChecked () |
| Returns true iff the checkbox is checked. | |
| void | setCheck (bool ch) |
| Set the boolean value. | |
| void | refresh () |
| Repaints the region. More... | |
| bool | handleEvent (Event &event) |
| Handle window-system events. More... | |
| void | parseSymbol (Token &t, ObjectFile &file) |
| Reads a single parameter sections inside the body of the object description. More... | |
| void | writeParams (ostream &stream) |
| Writes all parameter sections inside the body of the object description. More... | |
Protected Types | |
| enum | State { Idle, Pressed, Released } |
| Checkbutton state related to mouse movement. More... | |
Protected Methods | |
| void | createSymbols () |
| Creates all parameter symbols that are used within the body of the object description. | |
Protected Attributes | |
| State | state |
| The current widget state. | |
| bool | checked |
| True iff the checkbox is checked. | |
Used to edit a boolean value.
Events:
PARAM ::= CHECHED
CHECHED :== "check"
|
|
Checkbutton state related to mouse movement. When the button is pressed and the mouse cursur leaves the button region the button is released. |
|
|
Default constuctor. Constructs a new CheckBox with id 'i'. The id must be unique in the current scope.
|
|
|
Handle window-system events. This method handles keyboard or mouse event from the window system. Window events are handled top down, events that are not consumed are passed to child regions that are willing to accept the event.
Reimplemented from Region. |
|
||||||||||||
|
Reads a single parameter sections inside the body of the object description. Each object has a set of parameter names associated with it, called symbols. Symbols are declared inside the createSymbols method. The method parseSymbol expects the Token t to be such a symbol and reads the corresponding parameters. Unknown symbols are passed to its super class.
Reimplemented from Widget. |
|
|
Repaints the region. This method is called whenever the screen is repainted. The repaint method uses OpenGL calls to render the region. Currently it is assumed that regions are refreshed automatically so that no refresh notification has to be done when the region changes state i.e. no refresh has to be forced by the region. Region rendering is done back to front.
Reimplemented from Region. |
|
|
Writes all parameter sections inside the body of the object description. This method writes all object parameters to ostream. Inhereting classes will always call super::writeParams().
Reimplemented from Widget. |