Specifications
Athena Widget Set libXaw 1.0.7
This function is used by the StripChart to call an application routine. The routine will pass the
value to be graphed back to the the StripChart in the value field of this routine.
3.10. Toggle Widget
Application Header file <Xaw/Toggle.h>
Class Header file <Xaw/ToggleP.h>
Class toggleWidgetClass
Class Name Toggle
Superclass Command
The Toggle widget is an area, often rectangular,that displays a graphic. The graphic may be a
text string containing multiple lines of characters in an 8 bit or 16 bit character set (to be dis-
played with a font), or in a multi-byte encoding (for use with a fontset). The graphic may also be
abitmap or pixmap.
This widget maintains a Boolean state (e.g. True/False or On/Off) and changes state wheneverit
is selected. When the pointer is on the Toggle widget, the Toggle widget may become high-
lighted by drawing a rectangle around its perimeter.This highlighting indicates that the Toggle
widget is ready for selection. When pointer button 1 is pressed and released, the Toggle widget
indicates that it has changed state by reversing its foreground and background colors, and its
notify action is invoked, calling all functions on its callback list. If the pointer is movedoff ofthe
widget before the pointer button is released, the Toggle widget reverts to its previous foreground
and background colors, and releasing the pointer button has no effect. This behavior allows the
user to cancel the operation.
Toggle widgets may also be part of a ‘‘radio group.’’ A radio group is a list of at least twoToggle
widgets in which no more than one Toggle may be set at anytime. A radio group is identified by
the widget ID of anyone of its members. The convenience routine XawToggleGetCurrent will
return information about the Toggle widget in the radio group.
Toggle widget state is preserved across changes in sensitivity.
3.10.1. Resources
When creating a Toggle widget instance, the following resources are retrievedfrom the argument
list or from the resource database:
Name Class Type Notes Default Value
accelerators Accelerators AcceleratorTable NULL
ancestorSensitive AncestorSensitive Boolean D True
background Background Pixel XtDefaultBackground
backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap
bitmap Bitmap Pixmap None
borderColor BorderColor Pixel XtDefaultForeground
borderPixmap Pixmap Pixmap XtUnspecifiedPixmap
borderWidth BorderWidth Dimension 1
callback Callback XtCallbackList NULL
colormap Colormap Colormap Parent’sColormap
cornerRoundPercent CornerRoundPercent Dimension 25
cursor Cursor Cursor None
cursorName Cursor String NULL
depth Depth int C Parent’sDepth
destroyCallback Callback XtCallbackList NULL
encoding Encoding UnsignedChar XawTextEncoding8bit
51