Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

FlatNonexclusives(3W)

NAME

FlatNonexclusives − flat nonexclusive choice widget

SYNOPSIS

#include <Xol/OpenLook.h>
#include <Xol/FNonexclus.h>
 . . .

ANCESTRY

 Core-Primitive-Flat-FlatExclusives-FlatNonexclusives

DESCRIPTION

The FlatNonexclusives widget provides the same functionality as a Nonexclusives widget managing RectButtons.  Instead of creating individual Rectbuttons as children of a container widget, it creates sub-objects that have the same behavior as the Rectbuttons.  It is useful in applications that use large arrays of exclusive settings since it requires fewer widgets to be created. 

Default Spacing

The default spacing between items is 50% of the prevailing point size for the container’s font. 

  Figure 1 Example of Flat Nonexclusive Buttons

Menu Use

The FlatNonexclusives can be added as child in a menu pane to implement a several-of-many menu choice. 

Coloration

The FlatNonexclusives container inherits its background color from the container’s parent widget.  Setting the background color affects only the sub-objects’ background. 

Keyboard Traversal

The FlatNonexclusives widget is a Primitive widget that manages the traversal between a set of sub-objects.  When the user traverses to a FlatNonexclusives widget, the first sub-object in the set will display itself as having input focus (see the RectButton Widget for a description of this appearance.) 

The MOVEUP, MOVEDOWN, MOVERIGHT, and MOVELEFT keys move the input focus between the sub-objects.  To traverse out of the FlatNonexclusives widget, the following keys can be used:

—NEXT_FIELD moves to the next traversable widget in the window

—PREV_FIELD moves to the previous traversable widget in the window

—NEXTWINDOW moves to the next window in the application. 

—PREVWINDOW moves to the previous window in the application. 

—NEXTAPP moves to the first window in the next application. 

—PREVAPP moves to the first window in the previous application. 

Keyboard Operation

FlatNonexclusives Activation Types
OL_MENUDEFAULTKEY: If the FlatNonexclusives is on a menu, this command will set the item with focus
to be menu’s default; otherwise, this command is ignored.
OL_SELECTKEY: This command acts as if the SELECT mouse button had been clicked on the
sub-object with focus.  See "Selection Control" section
above.

RESOURCES

Sub-object Resources

The following tables list the resources for the FlatExclusives.  Resources marked by a bullet (•) denote sub-object resources.  If these resources are not included in the XtNitemFields list, they are inherited from the container widget.  An application can change the default values for sub-object resources by setting them on the container directly.  Even though a sub-object resource is not included in the XtNitemFields list, the application can query the value of any sub-object resource with OlFlatGetValues(). 

  Table 1 Flat Nonexclusive Buttons Resource Set

Name                      Type           Default             Access
XtNaccelerator-+         String           NULL                  SGI
XtNacceleratorText-+     String           Dynamic               SGI
XtNancestorSensitive-+   Boolean          TRUE                  G
XtNbackground-+          Pixel            XtDefaultBackground   SGI
XtNbackgroundPixmap-+    Pixmap           None                  SGI
XtNborderWidth-+         Dimension        0                     SGI
XtNclientData+           XtPointer        NULL                  SGI
XtNconsumeEvent-         XtCallbackList   NULL                  SGI
XtNdefault+∗             Boolean          FALSE                 SGI
XtNdepth-                Cardinal         (parent’s)            GI
XtNdim+                  Boolean          FALSE                 SGI
XtNfont+                 XFontStruct∗     (OPEN LOOK font)      SI
XtNfontColor-+           Pixel            XtDefaultForeground   SGI
XtNforeground-           Pixel            XtDefaultForeground   SGI
XtNgravity-              int              CenterGravity         SGI
XtNhPad-                 Dimension        0                     SGI
XtNhSpace-               Dimension        (calculated)          SGI
XtNheight-               Dimension        (calculated)          SGI
XtNinputFocusColor-+     Pixel            Red                   SGI
XtNitemFields            String∗          NULL                  GI
XtNitemGravity-          int              NorthWestGravity      SGI
XtNitemMaxHeight-        Dimension        OL_IGNORE             SGI
XtNitemMaxWidth-         Dimension        OL_IGNORE             SGI
XtNitemMinHeight-        Dimension        OL_IGNORE             SGI
XtNitemMinWidth-         Dimension        OL_IGNORE             SGI
XtNitems                 XtPointer        NULL                  SGI
XtNitemsTouched          Boolean          FALSE                 SG
XtNlabel+                String           NULL                  SGI
XtNlabelImage+           XImage∗          NULL                  SGI
XtNlabelJustify+         OlDefine         OL_LEFT               SGI
XtNlabelTile+            Boolean          FALSE                 SGI
XtNlayoutHeight-         OlDefine         OL_MINIMIZE           SGI
XtNlayoutType-           OlDefine         OL_FIXEDROWS          SGI
XtNlayoutWidth-          OlDefine         OL_MINIMIZE           SGI
XtNmanaged               Boolean          TRUE                  SGI
XtNmappedWhenManaged-+   Boolean          TRUE                  SGI
XtNmeasure-              int              1                     SGI
XtNmnemonic-+            unsigned char    NULL                  SGI
XtNnoneSet               Boolean          FALSE                 SGI
XtNnumItemFields         Cardinal         0                     SGI
XtNnumItems              Cardinal         0                     SGI
XtNposition+             OlDefine         OL_LEFT               SGI
XtNreferenceName-        String           NULL                  SGI
XtNreferenceWidget-      Widget           NULL                  SGI
XtNsameHeight-           OlDefine         OL_ALL                SGI
XtNsameWidth-            OlDefine         OL_COLUMNS            SGI
XtNselectProc+           XtCallbackProc   NULL                  SGI
XtNsensitive-+           Boolean          TRUE                  SGI
XtNset+∗                 Boolean          FALSE                 SGI
XtNtraversalOn-+         Boolean          TRUE                  SGI
XtNunselectProc+         XtCallbackProc   NULL                  SGI
XtNuserData-+            XtPointer        NULL                  SGI
XtNvPad-                 Dimension        0                     SGI
XtNvSpace-               Dimension        (calculated)          SGI
XtNwidth-                Dimension        (calculated)          SGI
XtNx-                    Position         0                     SGI
XtNy-                    Position         0                     SGI

Access:   S = XtSetValues   G = XtGetValues
            I = init time   O = other access
• sub-object resources; see below
† see resources(3W)

XtNancestorSensitive

 class:XtCSensitivetype:Booleandefault:TRUETRUE’u’access:GG’u’

Action: indicates sensitivity of sub-object’s ancestors. 

Values: TRUE – all the sub-object’s ancestors are sensitive and the sub-object is sensitive to user input.  FALSE – one or more of the sub-object’s ancestors are insensitive, so the sub-object displays an inactive visual and is not sensitive to user input. 

XtNbackground

 class:XtCBackgroundtype:Pixeldefault:XtDefaultBackgroundXtDefaultBackground’u’access:SGISGI’u’

Action: indicates pixel color used to fill background of sub-object. 

XtNbackgroundPixmap

 class:XtCBackgroundPixmaptype:Pixmapdefault:NoneNone’u’access:SGISGI’u’

Action: specifies pixmap displayed as sub-object’s label. 

Any supplied pixmap must have the same depth as the flat widget’s depth.  Pixmaps of None and ParentRelative are not considered valid values.  If either XtNlabel or XtNlabelImage has a non-NULL value, this resource is ignored. 

XtNclientData

 class:XtCClientDatatype:XtPointerdefault:NULLNULL’u’access:SGISGI’u’

Action: client data supplied to all callback procedures. 

XtNdefault

 class:XtCDefaulttype:Booleandefault:FALSEFALSE’u’access:SGISGI’u’

Action: indicates whether sub-object is default. 

Values: TRUE, FALSE

When used on the container, this resource indicates whether or not one of the sub-objects is a default item. When used on the sub-object, this resource specifies whether or not the sub-object is a default item. 

Values: TRUE, FALSE

If a sub-object is a default item, XtNdefault has a value of TRUE; else it has a value of FALSE. 

Setting this resource on the container widget indicates whether or not one of the sub-objects should be a default item.  If the application sets this value to: TRUE on the container, the container will set the first managed and mapped sub-object as the default item if a default item does not exist.  If the application sets this value to: FALSE the container will unset its default item if one exists.  Even if the application does not use XtNdefault in its item fields list, the container will correctly maintain the default item and the application can change the default item via OlFlatSetValues.

When used on the sub-object, this resource specifies whether or not the sub-object is a default item.  If more than one item is a set as a default item, a warning is generated and all but the first default item is unselected. 

XtNdim

 class:XtCDimtype:Booleandefault:FALSEFALSE’u’access:SGISGI’u’

Action: visually indicates whether sub-objects are in different states. 

Values: TRUE – the sub-object shows a dimmed visual indicating that the item represents the state of one or more objects, that as a group, are in different states.  FALSE – dim visual is not shown. 

XtNfont

 class:XtCFonttype:XFontStruct∗default:(OPEN LOOK font)(OPEN LOOK font)’u’access:SISI’u’

Action: specifies the font for the string specified by the XtNlabel resource. 

XtNfontColor

 class:XtCFontColortype:Pixeldefault:XtDefaultForegroundXtDefaultForeground’u’access:SGISGI’u’

Action: This resource specifies the foreground color of the sub-object’s label, even if the label is an XImage. 

XtNforeground

 class:XtCForegroundtype:Pixeldefault:XtDefaultForegroundXtDefaultForeground’u’access:SGISGI’u’

Action: gives pixel color used when drawing sub-object’s outline (in 2-D mode only). 

XtNitems

 class:XtCItemstype:XtPointerdefault:NULLNULL’u’access:SGISGI’u’

Action: points to the list of sub-object items. 

This value must point to a static list since flat containers reference this list after initialization but do not cache its information. 

XtNitemFields

 class:XtCItemFieldstype:Stringdefault:NULLNULL’u’access:GIGI’u’

Action: list of resource names used to parse the records in XtNitems list. 

This resource does not have to point to static information since the flat container does not use this information after initialization.  Though the flat container does not reference this resource’s value after initialization, it holds onto it for responding to an XtGetValues() request and supplying it in the OlFlatCallData structure during callbacks.  Therefore, if the application plans on querying this resource, it’s recommended that the application make this resource point to static information. 

XtNitemsTouched

 class:XtCItemsTouchedtype:Booleandefault:FALSEFALSE’u’access:SGSG’u’

Action: indicated the need for the container to update the visuals

Values: TRUE, FALSE

Whenever the application modifies an item list directly, it must supply this resource (with a value of TRUE to the flat widget container so that the container can update the visual.  If the resource value is supplied, the flat widget container treats its current item list as a new list and hence, updates its entire visual.  Since the list is treated as a new list, the flat container may request a change in geometry from its parent. 

Note: It is not necessary to use this resource if the application modifies the list with the OlFlatSetValues procedure, nor is it necessary to use this resource whenever the application supplies a new list to the flat container. 

XtNlabel

 class:XtCLabeltype:Stringdefault:NULLNULL’u’access:SGISGI’u’

Action: is the text string that appears in the sub-object. 

XtNlabelImage

 class:XtCLabelImagetype:XImagedefault:NULLNULL’u’access:SGISGI’u’

Action: is an XImage pointer that can appear in a sub-object.  This resource is ignored if XtNlabel is non-NULL. 

XtNlabelJustify

 class:XtCLabelJustifytype:OlDefinedefault:OL_LEFTOL_LEFT’u’access:SGISGI’u’

Action: specifies how to justify sub-object’s label or image. 

Values: OL_LEFT, OL_CENTER, OL_RIGHT

This resource specifies the justification of the label or XImage that appears within a sub-object. 

XtNlabelTile

 class:XtCLabelTiletype:Booleandefault:FALSEFALSE’u’access:SGISGI’u’

Action: partially controls tiling of background.  The XtNlabelTile resource is ignored for text labels. 

Values: TRUE, FALSE

This resource augments the XtNlabelImage/XtNlabelPixmap resource to allow tiling of the sub-object’s background.  For an image/pixmap that is smaller than the sub-object’s background, the label area is tiled with the image/pixmap to fill the sub-object’s background if this resource is TRUE; otherwise, the label is placed as described by the XtNlabelJustify resource. 

XtNmanaged

 class:XtCManagedtype:Booleandefault:TRUETRUE’u’access:SGISGI’u’

Action: Determines whether the FlatNonexclusives widget manages its sub-objects. 

Values: TRUE – the widget manages its sub-objects.  FALSE – the widget doesn’t manage its sub-objects. 

XtNmappedWhenManaged

 class:XtCMappedWhenManagedtype:Booleandefault:TRUETRUE’u’access:SGISGI’u’

Action: specifies whether or not a managed sub-object is displayed. 

Note This resource is never inherited from the container, so its default value is always TRUE

Values: TRUE, FALSE

Regardless of this resource’s value, all managed sub-objects will be including when determining the layout. 

XtNnumItems

 class:XtCNumItemstype:Cardinaldefault:00’u’access:SGISGI’u’

Action: specifies the number of sub-object items. 

XtNnumItemFields

 class:XtCNumItemFieldstype:Cardinaldefault:00’u’access:SGISGI’u’

Action: indicates the number of resource names contained in XtNitemFields

XtNsameHeight

 class:XtCSameHeighttype:OlDefinedefault:OL_ALLOL_ALL’u’access:SGISGI’u’

Action: specifies the rows that are forced to the same height

Values: OL_ALL, OL_ROWS, OL_NONE

XtNsameWidth

 class:XtCSameWidthtype:OlDefinedefault:OL_COLUMNSOL_COLUMNS’u’access:SGISGI’u’

Action: specifies the columns that are forced to the same width. 

Values: OL_ALL, OL_COLUMNS, OL_NONE

XtNselectProc

 class:XtCCallbackProctype:XtCallbackProcdefault:NULLNULL’u’access:SGISGI’u’

Action: callback procedure for sub-object becoming selected by user input. 

XtNsensitive

 class:XtCSensitivetype:Booleandefault:TRUETRUE’u’access:SGISGI’u’

Action: Sensitivity to user input. 

Values: TRUE – the sub-object is sensitive to user input.  FALSE – is insensitive to user input and an inactive visual is displayed to indicate this state. 

Note: This resource is never inherited from the container, so its default value is always TRUE. 

XtNset

 class:XtCSettype:Booleandefault:FALSEFALSE’u’access:SGISGI’u’

Action: reflects current state of sub-object. 

Values: TRUE, FALSE

Note: This resource is never inherited from the container, so its default value is always FALSE.  Even if the application does not use XtNset in its item fields list, the container will correctly maintain the set item and the application can change the set item via OlFlatSetValues. 

XtNunselectProc

 class:XtCCallbackProctype:XtCallbackProcdefault:NULLNULL’u’access:SGISGI’u’

Action: callback procedure when the sub-object becomes unselected by user input. 
 

Version 3.0.1  —  Last change: June 92

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