Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Gauge(3w) — OpenWindows V3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Gauge(3w)  —  OLIT Widget Set

NAME

Gauge − a read-only, analog display widget

SYNOPSIS

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <Xol/OpenLook.h>
#include <Xol/Gauge.h>
 . . .
Widget my_gauge, my_parent;
String my_name;
ArgList args;
Cardinal num_args;

my_gauge =  XtCreate( my_name, gaugeWidgetClass,

my_parent, args, num_args);

DESCRIPTION

Components

The Gauge widget indicates of the amount of space available in any container it is measuring. 

It consists of the following elements:

—Bar (typically)

—Shaded Bar (typically)

—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

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
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
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             calculated)    SGI
XtNx                 Position       0                   SGI
XtNy                 Position       0                   SGI

XtNfont

class:XtCFont type:FontStruct∗ default:(OPENLOOK default)access:SGI This resource specifies the font used to draw the labels. It defaultsto the OPENLOOK standard font.class:XtCFontColor type:Pixel default:foregroundaccess:SGI This resource specifies the color used to draw the labels. It defaultsclass:XtCForeground type:Pixel default:Blackaccess:SGI This resource defines the foreground color for the widget.See the note about the interaction of this resource with othercolor resources under the description of theresource inclass:XtCMinLabel 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 an 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 an 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 Range of Values:OL_VERTICAL/"vertical"This resource defines the direction for the visual presentationof the widget.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 the and to the foreground color of the gauge widget.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 tick 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  —  Last change: 19 July 91  —  Last change: 19 July 91

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026