interface control : public screen
{
control(char* p,char* options = "");
control(widget* w,char* p,char* options = "");
virtual ~control();
void factor(double fct); // speed factor
void reset();
};
The control widget consists of a start/stop button, a quit button and a scale widget for the speed. It is derived from screen so the widget can be scaled by adjusting the width and height. The factor option takes the speed factor (default 1). The simulation is delayed by the interactivation time multiplied by this factor and (100-x)/100 where x is the value of the scale widget.
-foreground <color = white>
-widgets <color = blue>
-background <color = grey>
-factor <double = 1>
-width <coord = 180> // width/180 == height/120
-height <coord = 120>
toplevel* t = new toplevel(".control");
control* c = new control(t,".c");
tk -> pack(c);
tk -> update();
This as an addition to application::main would add an extra contol widget.
|
Hush Online Technology
hush@cs.vu.nl
09/24/99 |
|
|