SgIconGadget(3X)
SgIconGadget -- the Icon widget class.
As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.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 in- formation on compound strings. The text can be multidirectional, multi- line, 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 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 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 re- maining letters (in either lowercase or uppercase, but include any under- scores 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 appropri- ate default font list of the ancestor widget (XmNdefaultFontList for VendorShell and XmMenuShell, XmNlabelFontList or XmNbuttonFontList for XmBulletinBoard). Refer to XmFontListCreate(3X) for more infor- mation 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 XmStringCre- ate(3X) or XmStringCreateLtoR(3X) for more information on the cre- ation 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: * XmSTRING_DIRECTION_L_TO_R -- left to right * 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, oth- erwise it is set to XmSTRING_DIRECTION_L_TO_R. Inherited Resources SgIconGadget inherits behavior and resources from the following super- classes. 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 trans- lations 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 call- backs for the nearest ancestor that has them. RELATED INFORMATION Core(3X), SgCreateIconGadget(3X), XmFontListCreate(3X), XmStringCreate(3X), XmStringCreateLtoR(3X) and XmGadget(3X). SgIconGadget(3X)