ThumbWheel(3X) UNIX System V ThumbWheel(3X)
NAME
SgThumbWheel - The ThumbWheel widget class
SYNOPSIS
#include <Sgm/ThumbWheel.h>
VERSION
This page documents the version of Sgm that accompanies
Motif 1.2.
DESCRIPTION
ThumbWheel is used by an application to allow the user to
input or modify a value either from within a range of values
or from an unbounded (infinite) range.
A ThumbWheel has an elongated rectangular region within
which a wheel graphic is displayed. The user can modify the
ThumbWheel's value by spinning the wheel. A ThumbWheel can
also include a Home Button located outside the wheel region.
This button allows the user to set the ThumbWheel's value to
a known position.
Classes
ThumbWheel inherits behavior and resources from Core and
Primitive classes.
The class pointer is sgThumbWheelWidgetClass.
The class name is SgThumbWheel.
New Resources
The following table defines a set of widget resources used
by the programmer to specify data. The programmer can also
set the resource values 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).
SgThumbWheel Resource Set
Name Class Type Default Access
____________________________________________________________________________________
SgNhomePosition SgCHomePosition int 50 CSG
Page 1 (printed 4/30/98)
ThumbWheel(3X) UNIX System V ThumbWheel(3X)
XmNmaximum XmCMaximum int 100 CSG
XmNminimum XmCMinimum int 0 CSG
SgNangleRange SgCAngleRange int 150 CSG
SgNunitsPerRotation SgCUnitsPerRotation int 240 CSG
XmNorientation XmCOrientation unsigned char XmVERTICAL CSG
SgNshowHomeButton XmCShowHomeButton Boolean True CSG
XmNvalue XmCValue int dynamic CSG
XmNvalueChangedCallback XmCCallback XtCallbackList NULL C
XmNdragCallback XmCCallback XtCallbackList NULL C
SgNhomePosition
Specifies the "known value" to which the thumb
wheel's value is set when the home button is
clicked.
XmNmaximum
Specifies the thumb wheel's maximum value.
XmNmaximum must be greater than or equal to
XmNminimum. Setting XmNmaximum equal to
XmNminimum indicates an infinite range.
XmNminimum
Specifies the thumb wheel's minimum value.
XmNmaximum must be greater than or equal to
XmNminimum. Setting XmNmaximum equal to
XmNminimum indicates an infinite range.
SgNangleRange
Specifies the angular range, in degrees, through
which the thumb wheel is allowed to rotate. This,
in conjunction with XmNmaximum and XmNminimum,
controls the fineness or coarseness of the wheel
control when it is not infinite. If set to zero,
the thumb wheel has an infinite range.
The default of 150 represents roughly the visible
amount of the wheel. Thus clicking at one end of
the wheel and dragging the mouse to the other end
would give roughly the entire range from
XmNminimum to XmNmaximum.
SgNunitsPerRotation
Specifies the change in XmNvalue when the wheel is
rotated one full turn around. This controls the
fineness or coarseness of the wheel control when
the range is infinite.
XmNorientation
Displays ThumbWheel vertically or horizontally.
This resource can have values of XmVERTICAL and
XmHORIZONTAL.
Page 2 (printed 4/30/98)
ThumbWheel(3X) UNIX System V ThumbWheel(3X)
SgNshowHomeButton
Specifies whether a home button should be
displayed next to the slider. If the value is
True, the home button is displayed.
XmNvalue Specifies the current position of the thumb wheel,
between XmNminimum and XmNmaximum if the thumb
wheel is not infinite.
XmNvalueChangedCallback
Specifies the list of callbacks that is called
when the value of the thumb wheel has changed.
The reason sent by the callback is
XmCRVALUECHANGED.
XmNdragCallback
Specifies the list of callbacks that is called
when the wheel position changes as the wheel is
being spun. The reason sent by the callback is
XmCRDRAG.
Inherited Resources
ThumbWheel 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
Page 3 (printed 4/30/98)
ThumbWheel(3X) UNIX System V ThumbWheel(3X)
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:
typedef struct
{
int reason;
XEvent * event;
int value;
} SgThumbWheelCallbackStruct;
reason Indicates why the callback was invoked
event Points to the XEvent that triggered the callback
value Is the new thumb wheel value
Behavior
ThumbWheel behavior is described below:
BSelect Press or BDrag Press:
(in slider): Activates the interactive dragging
of the wheel.
(in home button): Sets the wheel value to
SgNhomePosition.
BSelect Motion or BDrag Motion:
If the button press occurs within the wheel, the
subsequent motion events spin the wheel to follow
Page 4 (printed 4/30/98)
ThumbWheel(3X) UNIX System V ThumbWheel(3X)
the motion of the pointer and call the callbacks
for XmNdragCallback.
BSelect Release or BDrag Release:
If the button press occurs within the wheel and
the wheel position is 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 INFORMATION
SgThumbWheelGetValue(3X), SgThumbWheelSetValue(3X),
Primitive(3X), Core(3X)
Page 5 (printed 4/30/98)