Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CORE RESOURCES(3W)  —  OLIT

DESCRIPTION

These are the resources of the Core class, of which all widget classes are subclasses.  They are described here to avoid repeating their descriptions for each widget. 

RESOURCES

   Core Resource Set
                Name            Type   Access XtNancestorSensitive         Boolean       G∗
       XtNbackground           Pixel  SGI†
 XtNbackgroundPixmap          Pixmap  SGI†
      XtNborderColor           Pixel  SGI†
     XtNborderPixmap          Pixmap  SGI†
      XtNborderWidth       Dimension      SGI
            XtNdepth             int       GI
  XtNdestroyCallback  XtCallbackList       SI
           XtNheight       Dimension      SGI
          XtNmanaged         Boolean     TRUE  SGI XtNmappedWhenManaged         Boolean      SGI
        XtNsensitive         Boolean      GI∗
     XtNtranslations  XtTranslations        G
            XtNwidth       Dimension      SGI
                XtNx        Position      SGI
                XtNy        Position      SGI The following resource, although not a Core resource, is available to all widgets:
       Name       Type  Access XtNuserData  XtPointer     SGI XtNancestorSensitive

Range of Values:

TRUE
FALSE

This argument specifies whether the immediate parent of the widget will receive input events.  To preserve data integrity, the application should use the XtSetSensitive() routine if it wants to change the resource (see XtNsensitive below).  XtNbackground

Range of Values:

(any Pixel value valid for the current display)/(any name from the rgb.txt file)

This resource specifies the background color for the widget. 

Note that the OPEN LOOK workspace manager arranges for a “normal video” (or “reverse video”) effect on monochrome displays by setting the XtNbackground resource to white (black) and the XtNforeground, XtNfontColor, and XtNborderColor resources to black (white) where appropriate.  The workspace manager also provides end user access to some of these resources on polychrome displays.  However, any color set by the application when a widget is created or in a later call to XtSetValues() will override the colors set by the user.  Thus applications should consider this and avoid setting these resources directly, letting the user have control over them.  XtNbackgroundPixmap

The application can specify a pixmap to be used for tiling the background.  The first tile is placed at the upper left hand corner of the widget’s window. 

This resource takes precedence over the XtNbackground resource. 

See the note about the interaction of this resource with other color resources under the description of the XtNbackground resource above.  XtNborderColor

Range of Values:

(any Pixel value valid for the current display)/(any name from the rgb.txt file)

This resource specifies the color of the border. 

See the note about the interaction of this resource with other color resources under the description of the XtNbackground resource above.  XtNborderPixmap

The application can specify a pixmap to be used for tiling the border.  The first tile is placed at the upper left hand corner of the border. 

This resource takes precedence over the XtNborderColor resource. 

See the note about the interaction of this resource with other color resources under the description of the XtNbackground resource above.  XtNborderWidth

Range of Values:

0 ≤ XtNborderWidth ≤ min(XtNwidth, XtNheight) / 2

This resource sets the width of the border for a widget.  Typically the border surrounds the widget’s window on all four sides, but in some widgets it is inside the widget, surrounding a view or control area contained in the widget.  The width is specified in pixels, and a width of zero means no border will show.  XtNdepth

Range of Values:

0 or (any value supported by the current display)

Determines how many bits should be used for each pixel in the widget’s window.  The value of this resource is used by the X Toolkit Intrinsics to set the depth of the widget’s window when the widget is created.  A value of zero causes a normal widget to inherit the depth of its parent, or a pop-up widget to inherit the default depth of the screen.  XtNdestroyCallback

This is a pointer to a callback list containing routines to be called when the widget is destroyed.  XtNheight

Range of Values:

0 ≤ XtNheight

This resource contains the height of the widget’s window in pixels, not including the border area.  Programs may request a value at creation or through later calls to XtSetValues(), but the request may not succeed because of layout requirements of the parent widget. 

The visual representations for some widgets have a fixed height for a given scale.  For these widgets, the XtNheight resource gives the height of the space that contains the widget’s representation; the representation is centered vertically in this space unless otherwise specified.  XtNmanaged

Range of Values:

TRUE
TRUE
FALSE

If this resource is set to TRUE, the widget is included in If this resource is set to TRUE, the widget is included in the geometry calculations of its parent.  If FALSE, the widget the geometry calculations of its parent.  If FALSE, the widget is ignored by its parent and is not included in the geometry calculations.  XtNmappedWhenManaged

Range of Values:

TRUE
FALSE

If set to TRUE, the widget will be mapped (made visible) as soon as it is both realized and managed.  If set to FALSE, the program is responsible for mapping and unmapping the widget.  If the value is changed from TRUE to FALSE after the widget has been realized and managed, the widget is unmapped. 
XtNsensitive

Range of Values:

TRUE
FALSE

This resource determines whether a widget will receive input events.  If a widget is sensitive, the X Toolkit Intrinsic’s event manager will dispatch to the widget all keyboard, mouse button, motion, window enter/leave, and focus events.  Insensitive widgets do not receive these events.  Also, insensitive widgets that appear on the screen are stippled with a 50% gray pattern to show that they are inactive, as a visual indication that the user can’t interact with the widget.  The 50% gray pattern is one that makes every other pixel of the widget the background color, in a checkerboard pattern. 

An application should use the XtSetSensitive() routine if it wants to change this resource.  That way it ensures that if a parent widget has XtNsensitive set to FALSE, the XtNancestorSensitive flag of all its descendants will be appropriately set.  XtNtranslations

This resource should not be set by an application.  XtNuserData

Default value:  (XtPointer) NULL Default value:  (XtPointer) NULL

This resource provides storage for application-specific data. It is not used or set by the widget.  XtNwidth

Range of Values:

0 ≤ XtNwidth

This resource contains the width of the widget’s window in pixels, not including the border area.  Programs may request a value at creation or through later calls to XtSetValues(), but the request may not succeed because of layout requirements of the parent widget.  The visual representations for some widgets have a fixed width for a given scale. For these widgets, the XtNwidth resource gives the width of the space that contains the widget’s representation; the representation is centered horizontally in this space unless otherwise specified.  XtNx

Range of Values:

0 ≤ XtNx

This argument contains the x-coordinate of the widget’s upper left hand corner (excluding the border) relative to its parent widget.  Programs may request a value at creation or through later calls to XtSetValues(), but the request may not succeed because of layout requirements of the parent widget. 
XtNy

Range of Values:

0 ≤ XtNy

This resource contains the y-coordinate of the widget’s upper left hand corner (excluding the border) relative to its parent widget.  Programs may request a value at creation or through later calls to XtSetValues(), but the request may not succeed because of layout requirements of the parent widget. 

Sun Release 4.1  —  Last change: 1/8/90

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