Gauge(3W)
NAME
Gauge − a read-only, analog display widget
SYNOPSIS
#include <Xol/OpenLook.h>
#include <Xol/Gauge.h>
. . .
ANCESTRY
Core-Primitive-Gauge
DESCRIPTION
Components
The Gauge widget displays a numeric value graphically. It is similar to a Slider except that it is read-only.
It consists of the following elements:
—Bar (typically)
—Shaded Bar (typically)
—Ticks (not visible)
—Current Value (not visible)
—Minimum Value (not visible)
—Maximum Value (not visible)
Figure 1 Horizontal Gauge
Figure 2 Vertical Gauge
Application Notification
The application is responsible for providing any feedback to the end user deemed appropriate, such as updating the Current Value in a text field.
RESOURCES
Table 1 Gauge Resource Set
Name Type Default Access
XtNancestorSensitive- Boolean TRUE G∗
XtNaccelerator- String NULL SGI
XtNacceleratorText- String Dynamic SGI
XtNbackground- Pixel XtDefaultBackground SGI
XtNbackgroundPixmap- Pixmap (none) SGI-
XtNconsumeEvent- XtCallbackList NULL SGI
XtNdestroyCallback- XtCallbackList NULL SI
XtNfont- FontStruct ∗ (OPENLOOK default) SGI
XtNfontColor- Pixel foreground SGI
XtNforeground- Pixel XtDefaultForeground SGI
XtNheight- Dimension (calculated) SGI
XtNgranularity- int 1 SGI
XtNinputFocusColor- Pixel Red SGI
XtNmappedWhenManaged- Boolean TRUE SGI
XtNminLabel String NULL SGI
XtNmaxLabel String NULL SGI
XtNmnemonic- unsigned char NULL SGI
XtNorientation OlDefine OL_VERTICAL GI
XtNrecomputeSize- Boolean FALSE SGI
XtNreferenceName- String NULL SGI
XtNreferenceWidget- Widget NULL SGI
XtNscale- int 12 ISG
XtNsensitive- Boolean TRUE GI∗
XtNsliderMax int 100 SGI
XtNsliderMin int 0 SGI
XtNsliderValue- int 0 SGI
XtNspan Dimension OL_IGNORE SGI
XtNticks int 0 SGI
XtNtickUnit OlDefine OL_NONE SGI
XtNtraversalOn- Boolean TRUE SGI
XtNuserData- XtPointer NULL SGI
XtNwidth- Dimension (calculated) SGI
XtNx- Position 0 SGI
XtNy- Position 0 SGI
Access: S = XtSetValues G = XtGetValues
I = init time O = other access
XtNfont
class:XtCFont type:FontStruct∗ default:(OPENLOOK default)access:SGI
Action: specifies the font used to draw the labels. It defaults to the OPENLOOK standard font.
XtNfontColor
class:XtCFontColor type:Pixel default:foregroundaccess:SGI
Action: specifies the color used to draw the labels.
XtCForeground
class:XtCForeground type:Pixel default:XtDefaultForegroundaccess:SGI
Action: defines the foreground color for the widget.
See the note about the interaction of this resource with other color resources under the description of the XtNbackground resource in resources(3W).
XtNminLabel
class:XtCLabel type:String default:NULLaccess:SGI This is the label to be placed next to the minimum value position.For a vertical gauge, the label is placed to the right of the minimumvalue position. If there is not enough space for the entire label andIf there is not enough space for the entire label and is TRUE, then the widget will request for more space to show the entirelabel.For a horizontal gauge, the label is placed centered and belowthe minimum value position. If there is not enough room to center thelabel and will be aligned with the left anchor and is drawn to the right. If thislabel collides with the max label, some part of the labels will overlap.If there is not enough room to center thelabel and more space to center the label below the minimum value position.class:XtCLabel type:String default:NULLaccess:SGI This is the label to be placed next to the maximum value position.For a vertical gauge, the label is placed to the right of the minimumvalue position. If there is not enough space for the entire label andIf there is not enough space for the entire label and is TRUE, then the widget will request for more space to show the entirelabel.For a horizontal gauge, the label is placed centered and belowthe maximum value position. If there is not enough room to center thelabel and XtNrecomputeSize is set to FALSE, the end of the labelwill be aligned with the left anchor. If thislabel collides with the min label, some part of the labels will overlap.If there is not enough room to center thelabel and more space to center the label below the maximum value position.class:XtNorientation type:OlDefine default:OL_VERTICALaccess:GI
OL_HORIZONTAL/"horizontal"
OL_VERTICAL/"vertical"
Action: defines the direction for the visual presentation of the widget.
XtNrecomputeSize
class:XtNrecomputeSize type:Boolean default:FALSEaccess:SGI This resource, if set to TRUE, allows the gauge widget to resize itselfwhenever needed, to compensate for the space needed to show the tick marksand the labels. The gauge widget uses and class:XtNsliderMax type:int default:100access:SGI class:XtNsliderMin type:int default:0access:SGI Range of Values:These two resources give the range of values tracked by theMathematically, the range is open on the right;that is,the range is the following subset of the set of integers:class:XtCSliderValue type:int default:0access:SGI Range of Values:This resource gives the current position of the Drag Box,in the range[The class:XtCSspan type:Dimension default:OL_IGNOREaccess:SGI If the preferred length of the gauge, not counting the space needed for thelabels. The gauge widget uses the span value, the sizes of the labels,and class:XtCTticks type:int default:0access:SGI This is the interval betweentick marks. The unit of the interval valueis determined by class:XtCTickUnit type:OlDefine default:OL_NONEaccess:SGI Range of values: OL_NONE/"none" OL_SLIDERVALUE/"slidervalue" OL_PERCENT/"percent"This resource can have one of the values: OL_NONE, OL_SLIDERVALUE, andOL_PERCENT. If it is OL_NONE, then no tick marks will be displayed andas the percent of the gauge value range. If it is OL_SLIDERVALUE, theTo be consistent with the scrollbar widget,we recommend that the effective spacing between tick marks,designated in less than or equal to the spacing in
Version 3.0.1 — Last change: June 92