SgIconGadget(3X)

SgIconGadget - the Icon widget class.

As shipped in IRIX 6.5. First release of IRIX 6.5.

     NAME
          SgIconGadget - the Icon widget class.


     SYNOPSIS
          #include <Xm/IconG.h>


     VERSION
          This page documents the version of Sgm that accompanies
          Motif 1.2.

     DESCRIPTION
          SgIconGadget is an instantiable gadget that displays a
          labeled pixmap.  The SgIconGadget widget does not accept any
          button or key input, and the help callback is the only
          callback defined.  SgIconGadget also receives enter and
          leave events. The SgIconGadget is unique in that it can be
          displayed in colors other than that provided by its parent,
          a restriction that limits the usefulness of gadgets in many
          situation.

          SgIconGadget can contain both text and a pixmap.
          SgIconGadget text is a compound string.  Refer to the OSF/
          Motif Programmer's Guide for more information on compound
          strings.  The text can be multidirectional, multiline,
          and/or multifont.  When a SgIconGadget is insensitive, its
          text is stippled, or the user-supplied insensitive pixmap is
          displayed.

        Classes
          SgIconGadget inherits behavior and resources from XmGadget.

          The class pointer is SgIconGadgetClass.

          The class name is SgIconGadget.


        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).
     __________________________________________________________________________________________________________________
    |                                            SgIconGadget Resource Set                                            |
    |__________________________|__________________________________|___________________|______________________|________|
    | Name                     |  Class                           |  Type             |  Default             |  Access|
    |__________________________|__________________________________|___________________|______________________|________|
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNfontList              |  XmCFontList                     |  XmFontList       |  NULL                |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNlabelInsensitivePixmap|  XmCSgIconGadgetInsensitivePixmap|  Pixmap           |  XmUNSPECIFIED_PIXMAP|  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNlabelPixmap           |  XmCPixmap                       |  Pixmap           |  XmUNSPECIFIED_PIXMAP|  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNlabelString           |  XmCXmString                     |  XmString         |  NULL                |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNmarginBottom          |  XmCMarginBottom                 |  Dimension        |  0                   |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNmarginHeight          |  XmCMarginHeight                 |  Dimension        |  2                   |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNmarginLeft            |  XmCMarginLeft                   |  Dimension        |  0                   |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNmarginRight           |  XmCMarginRight                  |  Dimension        |  0                   |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNmarginTop             |  XmCMarginTop                    |  Dimension        |  0                   |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNmarginWidth           |  XmCMarginWidth                  |  Dimension        |  2                   |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNspacing               |  XmCSpacing                      |  Dimension        |  10                  |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNrecomputeSize         |  XmCRecomputeSize                |  Boolean          |  True                |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNstringDirection       |  XmCStringDirection              |  XmStringDirection|                      |        |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNtopShadowColor        |  XmCTopShadow                    |  Pixel            |  dynamic             |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNbottomShadowColor     |  XmCBottomShadow                 |  Pixel            |  dynamic             |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNbackground            |  XmCBackground                   |  Pixel            |  dynamic             |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNforeground            |  XmCForeground                   |  Pixel            |  dynamic             |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNiconPlacement         |  XmCIconPlacement                |  XmRIconPlacement |  icon_right          |  csg   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNpixmapWidth           |  XmCWidth                        |  Dimension        |  16                  |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNpixmapHeight          |  XmCHeight                       |  Dimension        |  16                  |  CSG   |
    |__________________________|__________________________________|___________________|______________________|________|
    | XmNshadowType            |  XmCShadowType                   |  XmRShadowType    |  XmSHADOW_ETCHED_IN  |  csg   |
    |__________________________|__________________________________|___________________|______________________|________|


          XmNfontList
               Specifies the font of the text used in the widget.  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 or XmNbuttonFontList for
               XmBulletinBoard).  Refer to XmFontListCreate(3X) for
               more information on the creation and structure of a
               font list.

          XmNlabelInsensitivePixmap
               Specifies a pixmap used as the button face if
               XmNlabelType is XmPIXMAP and the button is insensitive.

          XmNlabelPixmap
               Specifies the optional pixmap displayed.  XmPIXMAP.

          XmNlabelString
               Specifies the compound string displayed.  Refer to
               XmStringCreate(3X) or XmStringCreateLtoR(3X) for more
               information on the creation and structure of compound
               strings.

          XmNmarginBottom
               Specifies the amount of spacing that is to be left
               after the bottom margin (XmNmarginHeight) of the
               widget, before the label is drawn.

          XmNmarginHeight
               Specifies the amount of blank space between the bottom
               edge of the top shadow and the label, and the top edge
               of the bottom shadow and the label.

          XmNmarginLeft
               Specifies the amount of spacing that is to be left
               after the left margin (XmNmarginWidth) of the widget
               before the label is drawn.  This may be modified by
               SgIconGadget's subclasses.

          XmNmarginRight
               Specifies the amount of spacing that is to be left
               after the right margin (XmNmarginWidth) of the widget
               before the label is drawn.

          XmNmarginTop
               Specifies the amount of spacing that is to be left
               after the top margin (XmNmarginHeight) of the widget
               before the label is drawn.

          XmNmarginWidth
               Specifies the amount of blank space between the right
               edge of the left shadow and the label, and the left
               edge of the right shadow and the label.

          XmNspacing
               Specifies the amount of blank space between the  label
               and the pixmap.

          XmNrecomputeSize
               Specifies a Boolean value that indicates whether the
               widget attempts to be big enough to contain the label.
               If True, an XtSetValues with a new label string or
               pixmap, margins, font, or label type causes the widget
               to shrink or expand to exactly fit the new label string
               or pixmap.  If False, the widget never attempts to
               change size on its own.

          XmNstringDirection
               Specifies the direction in which the string is to be
               drawn.  The following are the values:

          o  XmSTRING_DIRECTION_L_TO_R - left to right

          o  XmSTRING_DIRECTION_R_TO_L - right to left

          The value of this resource is determined at creation time.
          If the widget's parent is a manager, this value is inherited
          from the widget's parent, otherwise it is set to
          XmSTRING_DIRECTION_L_TO_R.


        Inherited Resources
          SgIconGadget 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|
    |______________________|_______________________|__________________|__________|________|
    |______________________|_______________________|__________________|__________|________|
    | XmNhelpCallback      |  XmCCallback          |  XtCallbackList  |  NULL    |  C     |
    |______________________|_______________________|__________________|__________|________|
    | XmNhighlightColor    |  XmCForeground        |  Pixel           |  Black   |  CSG   |
    |______________________|_______________________|__________________|__________|________|
    | XmNhighlightOnEnter  |  XmCHighlightOnEnter  |  Boolean         |  False   |  CSG   |
    |______________________|_______________________|__________________|__________|________|
    | XmNhighlightPixmap   |  XmCHighlightPixmap   |  Pixmap          |  dynamic |  CSG   |
    |______________________|_______________________|__________________|__________|________|
    |______________________|_______________________|__________________|__________|________|

    | XmNhighlightThickness|  XmCHighlightThickness|  Dimension       |  2       |  CSG   |
    |______________________|_______________________|__________________|__________|________|
    | XmNnavigationType    |  XmCNavigationType    |  XmNavigationType|  XmNONE  |  G     |
    |______________________|_______________________|__________________|__________|________|
    | XmNtraversalOn       |  XmCTraversalOn       |  Boolean         |  False   |  CSG   |
    |______________________|_______________________|__________________|__________|________|
    | XmNunitType          |  XmCUnitType          |  unsigned char   |  XmPIXELS|  CSG   |
    |______________________|_______________________|__________________|__________|________|
    | XmNuserData          |  XmCUserData          |  caddr_t         |  NULL    |  CSG   |
    |______________________|_______________________|__________________|__________|________|

     ____________________________________________________________________________________________________________
    |                                             Core Resource Set                                             |
    |______________________________|_______________________________|________________|__________________|________|
    | Name                         |  Class                        |  Type          |  Default         |  Access|
    |______________________________|_______________________________|________________|__________________|________|
    |______________________________|_______________________________|________________|__________________|________|
    | XmNancestorSensitive         |  XmCSensitive                 |  Boolean       |  dynamic         |  G     |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNcolormap                  |  XmCColormap                  |  Colormap      |  XtCopyFromParent|  CG    |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNdepth                     |  XmCDepth                     |  int           |  XtCopyFromParent|  CG    |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNdestroyCallback           |  XmCCallback                  |  XtCallbackList|  NULL            |  C     |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNheight                    |  XmCHeight                    |  Dimension     |  dynamic         |  CSG   |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNinitialResourcesPersistent|  XmCInitialResourcesPersistent|  Boolean       |  True            |  CG    |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNmappedWhenManaged         |  XmCMappedWhenManaged         |  Boolean       |  True            |  CSG   |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNscreen                    |  XmCScreen                    |  Pointer       |  XtCopyScreen    |  CG    |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNsensitive                 |  XmCSensitive                 |  Boolean       |  True            |  CSG   |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNtranslations              |  XmCTranslations              |  XtTranslations|  NULL            |  CSG   |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNwidth                     |  XmCWidth                     |  Dimension     |  dynamic         |  CSG   |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNx                         |  XmCPosition                  |  Position      |  0               |  CSG   |
    |______________________________|_______________________________|________________|__________________|________|
    | XmNy                         |  XmCPosition                  |  Position      |  0               |  CSG   |
    |______________________________|_______________________________|________________|__________________|________|


        Callback Information
          The following structure is returned with each callback:

          typedef struct
          {
            int          reason;
            XEvent       * event;
          } XmAnyCallbackStruct;


          reason Indicates why the callback was invoked.  For this
                 callback, reason is set to XmCR_HELP.

          event  Points to the XEvent that triggered the callback.


        Translations
          SgIconGadget includes translations from Primitive.  The
          SgIconGadget translations are listed below.  These
          translations may not directly correspond to a translation
          table.
          KHelp:         Help()

        Action Routines
          The SgIconGadget action routines are described below:

          Help():
               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.


     RELATED INFORMATION
          Core(3X), SgCreateIconGadget(3X), XmFontListCreate(3X),
          XmStringCreate(3X), XmStringCreateLtoR(3X) and XmGadget(3X).