next up previous contents
Next: Distinction between CAVE and Up: Widget Previous: Widget

Widget Values

The easiest and most consistent way to represent the value of a widget is with a floating point number between 0 and 1. For "boolean" widgets, 0.0 is false and 1.0 is true. For continuous widgets, 0.0 is the minimum value and 1.0 is the maximum value. When a command is invoked, it is the command that decides what to do with the value. The command knows about the application component, so it can do the appropriate transformations. For instance, if it is an isovalue command, then the command might get the high and low values from the dataset by asking the application and then interpolate that range using the value of the widget. If the user desires different behavior, then it is only a matter of creating a new command and instantiating it in place of the old command.

A more general method of representing the value would be to use strings. Changing the widget abstraction to do this would be easy. This would allow string as well as numerical values since the numerical values could be stored as strings and converted back to numerical values when necessary. As of right now, none of the widgets take string values as input, so this wasn't done. In the future, this may be done to facilitate a speech interface in the CAVE. There's no easy way to input text with the CAVE input devices, so speech is the natural alternative to typing at the desktop.



Paul John Rajlich
Mon May 4 16:53:57 CDT 1998