The CW_DICE function creates a compound widget that implements a single die. The widget uses a button with a bitmap label. If the user presses the button, the die tumbles for a moment, then the new value is displayed and an event is issued.
The primary purpose of this compound widget is to serve as a full example of a realistic compound widget for the IDL User's Guide .
The returned value of this function is the widget ID of the newly-created die widget.
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.
The widget simulates the tumbling of a dice by changing the bitmap on the dice several times before settling down to a final value. The number of "tumbles" is specified by the TUMBLE_CNT keyword. The default is 10.
The widget ID returned by most compound widgets is actually the ID of the compound widget's base widget. This means that many keywords to the WIDGET_CONTROL and WIDGET_INFO routines that affect or return information on base widgets can be used with compound widgets.
See Using CW_DICE in a Widget Program for an example using CW_DICE.