#include <Widget.h>
Inherits Region.
Inherited by Button, CheckBox, Console, and TextField.
Inheritance diagram for Widget:


Public Methods | |
| Widget (int i=0) | |
| Default constructor. More... | |
| void | enable (bool e) |
| Set the enabled state. | |
| bool | isEnabled () |
| Returns true iff the widget is enabled. | |
| 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 Methods | |
| void | foreGround () |
| Renders the foreground color. | |
| void | entryBackGround () |
| Renders the entry background color. | |
| void | createSymbols () |
| Creates all parameter symbols that are used within the body of the object description. | |
Protected Attributes | |
| bool | enabled |
| True iff the Widget accepts keyboard and mouse input. | |
A Widget is an active user interface control. Widgets can be enabled or disabled. Only enabled widgets will accept an Event.
Format: (see Region)
PARAM ::= DISABLED
DISABLED ::= "disabled"
Example:
Widget {
id 5;
size 640 480;
position 10 5;
disabled;
}
|
|
Default constructor. Constructs a new Widget with id 'i'. The id must be unique in the current scope.
|
|
||||||||||||
|
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 Region. Reimplemented in Button. |
|
|
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 Region. Reimplemented in Button. |