Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XmScale(3X) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought



XmScale(3X)                      UNIX System V                      XmScale(3X)


NAME
      XmScale - the Scale widget class.


SYNOPSIS
      #include <Xm/Scale.h>


DESCRIPTION
      Scale is used by an application to indicate a value from within a range
      of values, and it allows the user to input or modify a value from the
      same range.

      A Scale has an elongated rectangular region similar to a ScrollBar.  A
      slider inside this region indicates the current value along the Scale.
      The user can also modify the Scale's value by moving the slider within
      the rectangular region of the Scale.  A Scale can also include a label
      set located outside the Scale region. These can indicate the relative
      value at various positions along the scale.

      A Scale can be either input/output or output only.  An input/output
      Scale's value can be set by the application and also modified by the user
      with the slider.  An output-only Scale is used strictly as an indicator
      of the current value of something and cannot be modified interactively by
      the user.


   Classes
      Scale inherits behavior and resources from Core, Composite, Constraint,
      and XmManager classes.

      The class pointer is xmScaleWidgetClass.

      The class name is XmScale.


   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 or XmC 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).






10/89                                                                    Page 1







XmScale(3X)                      UNIX System V                      XmScale(3X)


_________________________________________________________________________________________
|                                 XmScale Resource Set                                  |
|_______________________|________________________|________________|____________|________|
|Name                   |  Class                 |  Type          |  Default   |  Access|
|_______________________|________________________|________________|____________|________|
|_______________________|________________________|________________|____________|________|
|XmNdecimalPoints       |  XmCDecimalPoints      |  short         |  0         |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNdragCallback        |  XmCCallback           |  XtCallbackList|  NULL      |  C     |
|_______________________|________________________|________________|____________|________|
|XmNfontList            |  XmCFontList           |  XmFontList    |  dynamic   |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNhighlightOnEnter    |  XmCHighlightOnEnter   |  Boolean       |  False     |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNhighlightThickness  |  XmCHighlightThickness |  Dimension     |  2         |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNmaximum             |  XmCMaximum            |  int           |  100       |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNminimum             |  XmCMinimum            |  int           |  0         |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNorientation         |  XmCOrientation        |  unsigned char |  XmVERTICAL|  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNprocessingDirection |  XmCProcessingDirection|  unsigned char |  dynamic   |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNscaleHeight         |  XmCScaleHeight        |  Dimension     |  0         |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNscaleMultiple       |  XmCScaleMultiple      |  int           |  dynamic   |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNscaleWidth          |  XmCScaleWidth         |  Dimension     |  0         |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNshowValue           |  XmCShowValue          |  Boolean       |  False     |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNtitleString         |  XmCTitleString        |  XmString      |  NULL      |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNvalue               |  XmCValue              |  int           |  0         |  CSG   |
|_______________________|________________________|________________|____________|________|
|XmNvalueChangedCallback|  XmCCallback           |  XtCallbackList|  NULL      |  C     |
|_______________________|________________________|________________|____________|________|


      XmNdecimalPoints
            Specifies the number of decimal points to shift the slider value
            when displaying it.  For example, a slider value of 2,350 and an
            XmdecimalPoints value of 2 results in a display value of 23.50. The
            value must not be negative.

      XmNdragCallback
            Specifies the list of callbacks that is called when the slider
            position changes as the slider is being dragged.  The reason sent
            by the callback is XmCR_DRAG.




Page 2                                                                    10/89







XmScale(3X)                      UNIX System V                      XmScale(3X)


      XmNfontList
            Specifies the font list to use for the title text string specified
            by XmNtitleString.  If this value is NULL at initialization, it is
            initialized by looking up the parent hierarchy of the widget for an
            ancestor that is a subclass of the XmBulletinBoard, VendorShell, or
            XmMenuShell widget class.  If such an ancestor is found, the font
            list is initialized to the appropriate default font list of the
            ancestor widget (XmNdefaultFontList for VendorShell and
            XmMenuShell, XmNlabelFontList for XmBulletinBoard).

      XmNhighlightOnEnter
            Specifies whether the highlighting rectangle is drawn when the
            cursor moves into the widget.  If the shell's focus policy is
            XmEXPLICIT, this resource is ignored, and the widget is highlighted
            when it has the focus.  If the shell's focus policy is XmPOINTER
            and if this resource is True, the highlighting rectangle is drawn
            when the the cursor moves into the widget.  If the shell's focus
            policy is XmPOINTER and if this resource is False, the highlighting
            rectangle is not drawn when the the cursor moves into the widget.
            The default is False.

      XmNhighlightThickness
            Specifies the size of the slider's border drawing rectangle used
            for enter window and traversal highlight drawing.

      XmNmaximum
            Specifies the slider's maximum value.

      XmNminimum
            Specifies the slider's minimum value.

      XmNorientation
            Displays Scale vertically or horizontally.  This resource can have
            values of XmVERTICAL and XmHORIZONTAL.

      XmNprocessingDirection
            Specifies whether the value for XmNmaximum is on the right or left
            side of XmNminimum for horizontal Scales or above or below
            XmNminimum for vertical Scales.  This resource can have values of
            XmMAX_ON_TOP, XmMAX_ON_BOTTOM, XmMAX_ON_LEFT, and XmMAX_ON_RIGHT.
            If the XmScale is oriented vertically, the default value is
            XmMAX_ON_TOP.  If the XmScale is oriented horizontally, the default
            value may depend on the value of the XmNstringDirection resource.

      XmNscaleHeight
            Specifies the height of the slider area.  The value should be in
            the specified unit type (the default is pixels).  If no value is
            specified a default height is computed.

      XmNscaleMultiple
            Specifies the amount to move the slider when the user takes an
            action that moves the slider by a multiple increment.  The default


10/89                                                                    Page 3







XmScale(3X)                      UNIX System V                      XmScale(3X)


            is (XmNmaximum - XmNminimum) divided by 10, with a minimum of 1.

      XmNscaleWidth
            Specifies the width of the slider area.  The value should be in the
            specified unit type (the default is pixels).  If no value is
            specified a default width is computed.

      XmNshowValue
            Specifies whether a label for the current slider value should be
            displayed next to the slider.  If the value is True, the current
            slider value is displayed.

      XmNtitleString
            Specifies the title text string to appear in the Scale widget
            window.

      XmNvalue
            Specifies the slider's current position along the scale, between
            XmNminimum and XmNmaximum.  The value is constrained to be within
            these inclusive bounds.

      XmNvalueChangedCallback
            Specifies the list of callbacks that is called when the value of
            the slider has changed.  The reason sent by the callback is
            XmCR_VALUE_CHANGED.


   Inherited Resources
      Scale inherits behavior and resources from the following superclasses.
      For a complete description of each resource, refer to the man page for
      that superclass.

_________________________________________________________________________________________________________
                                         XmManager 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
_________________________________________________________________________________________________________
 XmNhighlightPixmap      XmCHighlightPixmap            Pixmap              dynamic                CSG
_________________________________________________________________________________________________________
 XmNnavigationType       XmCNavigationType             XmNavigationType    XmTAB_GROUP            G
_________________________________________________________________________________________________________


Page 4                                                                    10/89







XmScale(3X)                      UNIX System V                      XmScale(3X)


|XmNshadowThickness   |  XmCShadowThickness         |  Dimension        |  2                   |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNstringDirection   |  XmCStringDirection         |  XmStringDirection|  dynamic             |  CG    |
|_____________________|_____________________________|___________________|______________________|________|
|XmNtopShadowColor    |  XmCBackgroundTopShadowColor|  Pixel            |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNtopShadowPixmap   |  XmCTopShadowPixmap         |  Pixmap           |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNtraversalOn       |  XmCTraversalOn             |  Boolean          |  True                |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNunitType          |  XmCUnitType                |  unsigned char    |  dynamic             |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|
|XmNuserData          |  XmCUserData                |  Pointer          |  NULL                |  CSG   |
|_____________________|_____________________________|___________________|______________________|________|

    _______________________________________________________________________
   |                        Composite Resource Set                        |
   |__________________|___________________|____________|_________|________|
   | Name             |  Class            |  Type      |  Default|  Access|
   |__________________|___________________|____________|_________|________|
   |__________________|___________________|____________|_________|________|
   | XmNchildren      |  XmCReadOnly      |  WidgetList|  NULL   |  G     |
   |__________________|___________________|____________|_________|________|
   | XmNinsertPosition|  XmCInsertPosition|  (*)()     |  NULL   |  CSG   |
   |__________________|___________________|____________|_________|________|
   | XmNnumChildren   |  XmCReadOnly      |  Cardinal  |  0      |  G     |
   |__________________|___________________|____________|_________|________|

________________________________________________________________________________________________________________
                                               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
________________________________________________________________________________________________________________


10/89                                                                    Page 5







XmScale(3X)                      UNIX System V                      XmScale(3X)


|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;
      } XmScaleCallbackStruct;

     reason Indicates why the callback was invoked

     event  Points to the XEvent that triggered the callback

     value  Is the new slider value


   Behavior
      XmScale behavior is described below:

      BSelect Press or BDrag Press:
            (in region between an end of the Scale and the slider): Moves the
            slider by one multiple increment in the direction of the end of the
            Scale and calls the XmNvalueChangedCallback callbacks.  If
            XmNprocessingDirection is XmMAX_ON_RIGHT or XmMAX_ON_BOTTOM,
            movement toward the right or bottom increments the Scale value, and
            movement toward the left or top decrements the Scale value.  If
            XmNprocessingDirection is XmMAX_ON_LEFT or XmMAX_ON_TOP, movement
            toward the right or bottom decrements the Scale value, and movement
            toward the left or top increments the Scale value.  If the button


Page 6                                                                    10/89







XmScale(3X)                      UNIX System V                      XmScale(3X)


            is held down longer than a delay period, the slider is moved again
            by the same increment and the same callbacks are called.

            (in slider):  Activates the interactive dragging of the slider.

      BSelect Motion or BDrag Motion:
            If the button press occurs within the slider, the subsequent motion
            events move the slider to the position of the pointer and call the
            callbacks for XmNdragCallback.

      BSelect Release or BDrag Release:
            If the button press occurs within the slider and the slider
            position is changed, the callbacks for XmNvalueChangedCallback are
            called.

      MCtrl BSelect Press:
            (in region between an end of the Scale and the slider): Moves the
            slider to that end of the Scale and calls the
            XmNvalueChangedCallback callbacks.  If XmNprocessingDirection is
            XmMAX_ON_RIGHT or XmMAX_ON_BOTTOM, movement toward the right or
            bottom increments the Scale value, and movement toward the left or
            top decrements the Scale value.  If XmNprocessingDirection is
            XmMAX_ON_LEFT or XmMAX_ON_TOP, movement toward the right or bottom
            decrements the Scale value, and movement toward the left or top
            increments the Scale value.

      KUp:  For vertical Scales, moves the slider up one increment and calls
            the XmNvalueChangedCallback callbacks.  If XmNprocessingDirection
            is XmMAX_ON_TOP, movement toward the top increments the Scale
            value.  If XmNprocessingDirection is XmMAX_ON_BOTTOM, movement
            toward the top decrements the Scale value.

      KDown:
            For vertical Scales, moves the slider down one increment and calls
            the XmNvalueChangedCallback callbacks.  If XmNprocessingDirection
            is XmMAX_ON_BOTTOM, movement toward the bottom increments the Scale
            value.  If XmNprocessingDirection is XmMAX_ON_TOP, movement toward
            the bottom decrements the Scale value.

      KLeft:
            For horizontal Scales, moves the slider one increment to the left
            and calls the XmNvalueChangedCallback callbacks.  If
            XmNprocessingDirection is XmMAX_ON_LEFT, movement toward the left
            increments the Scale value.  If XmNprocessingDirection is
            XmMAX_ON_RIGHT, movement toward the left decrements the Scale
            value.

      KRight:
            For horizontal Scales, moves the slider one increment to the right
            and calls the XmNvalueChangedCallback callbacks.  If
            XmNprocessingDirection is XmMAX_ON_RIGHT, movement toward the right
            increments the Scale value.  If XmNprocessingDirection is


10/89                                                                    Page 7







XmScale(3X)                      UNIX System V                      XmScale(3X)


            XmMAX_ON_LEFT, movement toward the right decrements the Scale
            value.

      MCtrl KUp or KPageUp:
            For vertical Scales, moves the slider up one multiple increment and
            calls the XmNvalueChangedCallback callbacks.  If
            XmNprocessingDirection is XmMAX_ON_TOP, movement toward the top
            increments the Scale value.  If XmNprocessingDirection is
            XmMAX_ON_BOTTOM, movement toward the top decrements the Scale
            value.

      MCtrl KDown or KPageDown:
            For vertical Scales, moves the slider down one multiple increment
            and calls the XmNvalueChangedCallback callbacks.  If
            XmNprocessingDirection is XmMAX_ON_BOTTOM, movement toward the
            bottom increments the Scale value.  If XmNprocessingDirection is
            XmMAX_ON_TOP, movement toward the bottom decrements the Scale
            value.

      MCtrl KLeft or KPageLeft:
            For horizontal Scales, moves the slider one multiple increment to
            the left and calls the XmNvalueChangedCallback callbacks.  If
            XmNprocessingDirection is XmMAX_ON_LEFT, movement toward the left
            increments the Scale value.  If XmNprocessingDirection is
            XmMAX_ON_RIGHT, movement toward the left decrements the Scale
            value.

      MCtrl KRight or KPageRight:
            For horizontal Scales, moves the slider one multiple increment to
            the right and calls the XmNvalueChangedCallback callbacks.  If
            XmNprocessingDirection is XmMAX_ON_RIGHT, movement toward the right
            increments the Scale value.  If XmNprocessingDirection is
            XmMAX_ON_LEFT, movement toward the right decrements the Scale
            value.

      KBeginLine or KBeginData:
            Moves the slider to the minimum value and calls the
            XmNvalueChangedCallback callbacks.

      KEndLine or KEndData:
            Moves the slider to the maximum value and calls the
            XmNvalueChangedCallback callbacks.

      KNextField:
            Traverses to the first item in the next tab group.  If the current
            tab group is the last entry in the tab group list, it wraps to the
            beginning of the tab group list.

      KPrevField:
            Traverses to the first item in the previous tab group.  If the
            beginning of the tab group list is reached, it wraps to the end of
            the tab group list.


Page 8                                                                    10/89







XmScale(3X)                      UNIX System V                      XmScale(3X)


      KHelp:
            Calls the callbacks for XmNhelpCallback if any exist.  If there are
            no help callbacks for this widget, this action calls the help
            callbacks for the nearest ancestor that has them.


   Virtual Bindings
      The bindings for virtual keys are vendor specific.  For information about
      bindings for virtual buttons and keys, see VirtualBindings(3X).

RELATED INFORMATION
      Composite(3X), Constraint(3X), Core(3X), XmCreateScale(3X),
      XmManager(3X), XmScaleGetValue(3X), and XmScaleSetValue(3X).









































10/89                                                                    Page 9





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