SgThumbWheel(3X)

SgThumbWheel --The ThumbWheel widget class

As shipped in IRIX 6.5.7. Unchanged since IRIX 6.5.

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 spin-
     ning the wheel.  A ThumbWheel can also include a Home Button  located  out-
     side 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 program-
     mer 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 in-
     clude any underscores between words).  The codes in the access column indi-
     cate 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
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.

     XmNmaximumSpecifies  the  thumb  wheel's maximum value.  XmNmaximum must be
               greater than or equal to XmNminimum.  Setting XmNmaximum equal to
               XmNminimum indicates an infinite range.

     XmNminimumSpecifies 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.

     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 XmN-
               minimum 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
               XmCR_VALUE_CHANGED.

     XmNdragCallback
               Specifies the list of callbacks that is called when the wheel po-
               sition changes as the wheel is being spun.  The  reason  sent  by
               the callback is XmCR_DRAG.


   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
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 mo-
               tion events spin the wheel to follow 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 posi-
               tion 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)

                                                                  ThumbWheel(3X)