Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XmGadget(Xm) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 XmGadget(Xm)                   6 January 1993                   XmGadget(Xm)


 Name

    XmGadget - the Gadget widget class

 Syntax


    #include <Xm/Xm.h>


 Description

    Gadget is a widget class used as a supporting superclass for other gadget
    classes. It handles shadow-border drawing and highlighting, traversal
    activation and deactivation, and various callback lists needed by gadg-
    ets.

    The color and pixmap resources defined by XmManager are directly used by
    gadgets. If XtSetValues is used to change one of the resources for a man-
    ager widget, all of the gadget children within the manager also change.

    Classes

    Gadget inherits behavior and resources from Object and RectObj classes.

    The class pointer is xmGadgetClass.

    The class name is XmGadget.

    New resources

    The following table defines a set of widget resources used by the pro-
    grammer 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).

 XmGadget resource set

 ____________________________________________________________________________
 Name                  Class                Type             Default   Access
 ____________________________________________________________________________
 XmNbottomShadowColor  XmCBottomShadowColor Pixel            dynamic   G
 XmNhelpCallback       XmCCallback          XtCallbackList   NULL      C
 XmNhighlightColor     XmCHighlightColor    Pixel            dynamic   G
 XmNhighlightOnEnter   XmCHighlightOnEnter  Boolean          False     CSG
 XmNhighlightThickness XmCHighlightThicknessDimension        2         CSG
 XmNnavigationType     XmCNavigationType    XmNavigationType XmNONE    CSG
 XmNshadowThickness    XmCShadowThickness   Dimension        2         CSG
 XmNtopShadowColor     XmCTopShadowColor    Pixel            dynamic   G
 XmNtraversalOn        XmCTraversalOn       Boolean          True      CSG
 XmNunitType           XmCUnitType          unsigned char    dynamic   CSG
 XmNuserData           XmCUserData          XtPointer        NULL      CSG


    XmNbottomShadowColor
            Contains the color to use to draw the bottom and right sides of
            the border shadow.

    XmNhelpCallback
            Specifies the list of callbacks that is called when the help key
            sequence is pressed. The reason sent by the callback is
            XmCRHELP.

    XmNhighlightColor
            Contains the color of the highlighting rectangle.

    XmNhighlightOnEnter
            Specifies if the highlighting rectangle is drawn when the cursor
            moves into the widget.  If the shell's focus policy is XmEXPLI-
            CIT, 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 highlight-
            ing rectangle is not drawn when the the cursor moves into the
            widget.  The default is False.

    XmNhighlightThickness
            Specifies the thickness of the highlighting rectangle.

    XmNnavigationType
            Determines whether the widget is a tab group.

            +  XmNONE indicates that the widget is not a tab group.

            +  XmTABGROUP indicates that the widget is a tab group, unless
               another widget in the hierarchy has an XmNnavigationType of
               XmEXCLUSIVETABGROUP.

            +  XmSTICKYTABGROUP indicates that the widget is a tab group,
               even if another widget in the hierarchy has an XmNnavigation-
               Type of XmEXCLUSIVETABGROUP.

            +  XmEXCLUSIVETABGROUP indicates that the widget is a tab group
               and that widgets in the hierarchy whose XmNnavigationType is
               XmTABGROUP are not tab groups.

            When a parent widget has an XmNnavigationType of
            XmEXCLUSIVETABGROUP, traversal of non-tab-group widgets within
            the group is based on the order of those widgets in their
            parent's XmNchildren list.

            When any widget in a hierarchy has an XmNnavigationType of
            XmEXCLUSIVETABGROUP, traversal of tab groups in the hierarchy
            proceeds to widgets in the order in which their XmNnavigationType
            resources were specified as XmEXCLUSIVETABGROUP or
            XmSTICKYTABGROUP, whether by creating the widgets with that
            value, by calling XtSetValues, or by calling XmAddTabGroup.

    XmNshadowThickness
            Specifies the size of the drawn border shadow.

    XmNtopShadowColor
            Contains the color to use to draw the top and left sides of the
            border shadow.

    XmNtraversalOn
            Specifies traversal activation for this gadget.

    XmNunitType
            Provides the basic support for resolution independence.  It
            defines the type of units a widget uses with sizing and position-
            ing resources.  If the widget's parent is a subclass of XmManager
            and if the XmNunitType resource is not explicitly set, it
            defaults to the unit type of the parent widget.  If the widget's
            parent is not a subclass of XmManager, the resource has a default
            unit type of XmPIXELS.

            XmNunitType can have the following values:

            +  XmPIXELS -- all values provided to the widget are treated as
               normal pixel values.

            +  Xm100THMILLIMETERS -- all values provided to the widget are
               treated as 1/100 millimeter.

            +  Xm1000THINCHES -- all values provided to the widget are
               treated as 1/1000 inch.

            +  Xm100THPOINTS -- all values provided to the widget are
               treated as 1/100 point. A point is a unit used in text pro-
               cessing applications and is defined as 1/72 inch.

            +  Xm100THFONTUNITS -- all values provided to the widget are
               treated as 1/100 of a font unit.  A font unit has horizontal
               and vertical components.  These are the values of the XmScreen
               resources XmNhorizontalFontUnit and XmNverticalFontUnit.

    XmNuserData
            Allows the application to attach any necessary specific data to
            the gadget.  This is an internally unused resource.

    Inherited resources

    Gadget inherits the following resources from the named superclass. For a
    complete description of each resource, refer to the man page for that
    superclass.

 RectObj resource set

 ____________________________________________________________________________
 Name                    Class               Type         Default      Access
 ____________________________________________________________________________


 XmNancestorSensitive    XmCSensitive        Boolean      dynamic      G
 XmNborderWidth          XmCBorderWidth      Dimension    0            CSG
 XmNheight               XmCHeight           Dimension    dynamic      CSG
 XmNsensitive            XmCSensitive        Boolean      True         CSG
 XmNwidth                XmCWidth            Dimension    dynamic      CSG
 XmNx                    XmCPosition         Position     0            CSG
 XmNy                    XmCPosition         Position     0            CSG


 Object resource set

 ____________________________________________________________________________
 Name                 Class               Type             Default     Access
 ____________________________________________________________________________
 XmNdestroyCallback   XmCCallback         XtCallbackList   NULL        C

    Callback information

    A pointer to the following structure is passed to each callback:

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


    reason  Indicates why the callback was invoked.  For this callback, rea-
            son is set to XmCRHELP.

    event   Points to the XEvent that triggered the callback.

    Behavior

    Gadgets cannot have translations associated with them.  Because of this,
    a Gadget's behavior is determined by the Manager widget into which the
    Gadget is placed. If focus is on a Gadget, events are passed to the
    Gadget by its Manager.

 See also

    Object(Xm), RectObj(Xm), XmManager(Xm) and XmScreen(Xm).


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