Dial(3X)Dial(3X)NAMESgDial — The Dial widget class
SYNOPSIS
#include <Sgm/Dial.h>
VERSION
This page documents the version of Sgm that accompanies Motif 1.2.
DESCRIPTION
Dial is used by an application to allow the user to input or modify a
value from within a range of values.
A Dial has a rectangular region within which a knob or pointer graphic
is displayed. The user can modify the Dial's value by spinning this
knob or pointer.
Classes
Dial inherits behavior and resources from Core and Primitive classes.
The class pointer is sgDialWidgetClass.
The class name is SgDial.
New Resources
The following table defines a set of widget resources used by the pro‐
grammer to specify data. The programmer can also set the resource val‐
ues for the inherited classes to set attributes for this widget. To
reference a resource by name or by class in a .Xdefaults file, remove
the XmN, SgN, XmC, or SgC prefix and use the remaining letters. To
specify one of the defined values for a resource in a .Xdefaults file,
remove the Xm prefix and use the remaining letters (in either lowercase
or uppercase, but include any underscores between words). The codes in
the access column indicate if the given resource can be set at creation
time (C), set by using XtSetValues (S), retrieved by using XtGetValues
(G), or is not applicable (N/A).
SgDial Resource Set
Name Class Type Default Access
────────────────────────────────────────────────────────────────────────────
SgNdialMarkers SgCMarkers int 16 CSG
XmNminimum XmCMinimum int 0 CSG
XmNmaximum XmCMaximum int 360 CSG
SgNstartAngle SgCStartAngle int 0 CSG
SgNangleRange SgCAngleRange int 360 CSG
SgNindicatorColor XmCColor Pixel Red CSG
XmNvalue XmCValue Position 0 CSG
SgNmarkerLength XmCLength Dimension 8 CSG
SgNdialForeground SgCForeground Pixel Red CSG
SgNdialVisual SgCDialVisual SgDialVisual SgKNOB CSG
XmNvalueChangedCallback XmCCallback XtCallbackList NULL C
XmNdragCallback XmCCallback XtCallbackList NULL C
Specifies the number of divisions around the perimeter of the dial. A
"tick mark" will be drawn at each division, filled with the color set
by SgNdialForeground. Specifies the dial's maximum value. XmNmaximum
must be greater than or equal to XmNminimum. Specifies the dial's min‐
imum value. XmNmaximum must be greater than or equal to XmNminimum.
Specifies the whole number angle (0-360) where the dial will start
increasing. Specifies the angular range, in degrees, through which the
dial is allowed to rotate. This, in conjunction with XmNmaximum and
XmNminimum, controls the fineness or coarseness of the dial control.
Specifies the color to be used for filling in the center of the dial
pointer, in SgPOINTER mode. Specifies the current position of the
dial, between XmNminimum and XmNmaximum. Specifies the length (in pix‐
els) of each tick mark on the dial. The width of each tick mark is
derived from the length (length/3). Specifies the color to be used for
filling in the tick marks around the perimeter of the dial. Specifies
the look of the dial, either SgKNOB or SgPOINTER. Specifies the list
of callbacks that is called when the value of the dial has changed.
The reason sent by the callback is XmCR_VALUE_CHANGED. Specifies the
list of callbacks that is called when the dial position changes as the
dial is being spun. The reason sent by the callback is XmCR_DRAG.
Inherited Resources
Dial inherits behavior and resources from the following superclasses.
For a complete description of each resource, refer to the man page for
that superclass.
XmPrimitive Resource Set
Name Class Type Default Access
─────────────────────────────────────────────────────────────────────────────────────────────────
XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNforeground XmCForeground Pixel dynamic CSG
XmNhelpCallback XmCCallback XtCallbackList NULL C
XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
XmNhighlightOnEnter XmCHighlightOnEnter Boolean False CSG
XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
XmNhighlightThickness XmCHighlightThickness Dimension 0 CSG
XmNnavigationType XmCNavigationType XmNavigationType XmNONE CSG
XmNshadowThickness XmCShadowThickness Dimension 0 CSG
XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG
XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
XmNtraversalOn XmCTraversalOn Boolean False CSG
XmNunitType XmCUnitType unsigned char dynamic CSG
XmNuserData XmCUserData XtPointer NULL CSG
Core Resource Set
Name Class Type Default Access
───────────────────────────────────────────────────────────────────────────────────────────────────────────────
XmNaccelerators XmCAccelerators XtAccelerators dynamic CSG
XmNancestorSensitive XmCSensitive Boolean dynamic G
XmNbackground XmCBackground Pixel dynamic CSG
XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG
XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderWidth XmCBorderWidth Dimension 0 CSG
XmNcolormap XmCColormap Colormap dynamic CG
XmNdepth XmCDepth int dynamic CG
XmNdestroyCallback XmCCallback XtCallbackList NULL C
XmNheight XmCHeight Dimension dynamic CSG
XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C
XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
XmNscreen XmCScreen Screen * dynamic CG
XmNsensitive XmCSensitive Boolean True CSG
XmNtranslations XmCTranslations XtTranslations dynamic CSG
XmNwidth XmCWidth Dimension dynamic CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG
Callback Information
A pointer to the following structure is passed to each callback: type‐
def struct { int reason; XEvent * event; int posi‐
tion; } SgDialCallbackStruct; Indicates why the callback was invoked
Points to the XEvent that triggered the callback Is the new dial value
Behavior
Dial behavior is described below: Activates the interactive dragging of
the dial. Motion events spin the dial to follow the motion of the
pointer and call the callbacks for XmNdragCallback. If the dial posi‐
tion has changed, the callbacks for XmNvalueChangedCallback are called.
Virtual Bindings
The bindings for virtual keys are vendor specific. For information
about bindings for virtual buttons and keys, see VirtualBindings(3X).
RELATED INFORMATIONPrimitive(3X), Core(3X)Dial(3X)