FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
NAME
FlatNonexclusives - a Primitive widget allowing the user to select one or
more choices
SYNOPSIS
#include <Intrinsic.h>
#include <StringDefs.h>
#include <OpenLook.h>
#include <FNonexclus.h>
widget = XtCreateWidget(name, flatNonexclusivesWidgetClass, ...);
DESCRIPTION
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
Selection Control
Clicking the SELECT mouse button over an object that is set will cause
the object to become unset and its XtNunselectProc procedure is called.
If the object is unset, clicking the SELECT mouse button over it causes
it to become set and its XtNselectProc procedure is called.
Use in a Menu
The FlatNonexclusives can be added as a child in a menu pane to implement
a several-of-many menu choice.
FlatNonexclusives 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.
10/89 Page 1
FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
- 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
| Flat Nonexclusives Activation Types |
|||
| Activation Type | Expected Results |
|||
| OLMENUDEFAULTKEY| 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. |
|||
| OLSELECTKEY | This command acts as if the |
| | SELECT mouse button had been |
| | clicked on the RectButton with|
| | focus. See "Selection |
| | Control" section above. |
|||
RESOURCES
The following table lists the resources for the FlatNonexclusives.
Resources that have a bullet (⊕) in the Access column 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
directly on the container. 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().
__________________________________________________________________________________________
| Flat Nonexclusives Resource Set |
|____________________|_____________________|_______________|____________________|________|
|Name | Class | Type | Default | Access |
||||||
XtNaccelerator XtCAccelerator String NULL SGI⊕
__________________________________________________________________________________________
XtNacceleratorText XtCAcceleratorText String Dynamic SGI⊕
__________________________________________________________________________________________
XtNancestorSensitive XtCSensitive Boolean TRUE G⊕
__________________________________________________________________________________________
XtNbackground XtCBackground Pixel XtDefaultBackground SGI⊕
__________________________________________________________________________________________
XtNbackgroundPixmap XtCBackgroundPixmap Pixmap None SGI⊕
__________________________________________________________________________________________
XtNborderWidth XtCBorderWidth Dimension 0 SGI⊕
__________________________________________________________________________________________
Page 2 10/89
FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
__________________________________________________________________________________________
| Flat Nonexclusives Resource Set |
|____________________|_____________________|_______________|____________________|________|
|Name | Class | Type | Default | Access |
||||||
XtNclientData XtCClientData XtPointer NULL SGI⊕
__________________________________________________________________________________________
XtNconsumeEvent XtCConsumeEvent XtCallbackList NULL SGI
__________________________________________________________________________________________
XtNdefault XtCDefault Boolean FALSE SGI†⊕
__________________________________________________________________________________________
XtNdepth XtCDepth Cardinal (parent's) GI
__________________________________________________________________________________________
XtNdim XtCDim Boolean FALSE SGI⊕
__________________________________________________________________________________________
XtNfont XtCFont XFontStruct * (OPEN LOOK font) SI⊕
__________________________________________________________________________________________
XtNfontColor XtCFontColor Pixel XtDefaultForeground SGI⊕
__________________________________________________________________________________________
XtNforeground XtCForeground Pixel XtDefaultForeground SGI
__________________________________________________________________________________________
XtNgravity XtCGravity int CenterGravity SGI
__________________________________________________________________________________________
XtNhPad XtCHPad Dimension 0 SGI
__________________________________________________________________________________________
XtNhSpace XtCHSpace Dimension (calculated) SGI
__________________________________________________________________________________________
XtNheight XtCHeight Dimension (calculated) SGI
__________________________________________________________________________________________
XtNinputFocusColor XtCInputFocusColor Pixel Black SGI⊕
__________________________________________________________________________________________
XtNitemFields XtCItemFields String * NULL GI
__________________________________________________________________________________________
XtNitemGravity XtCItemGravity int NorthWestGravity SGI
__________________________________________________________________________________________
XtNitemMaxHeight XtCItemMaxHeight Dimension OL_IGNORE SGI
__________________________________________________________________________________________
XtNitemMaxWidth XtCItemMaxWidth Dimension OL_IGNORE SGI
__________________________________________________________________________________________
XtNitemMinHeight XtCItemMinHeight Dimension OL_IGNORE SGI
__________________________________________________________________________________________
XtNitemMinWidth XtCItemMinWidth Dimension OL_IGNORE SGI
__________________________________________________________________________________________
XtNitems XtCItems XtPointer NULL SGI
__________________________________________________________________________________________
XtNitemsTouched XtCItemsTouched Boolean FALSE SG
__________________________________________________________________________________________
XtNlabel XtCLabel String NULL SGI⊕
__________________________________________________________________________________________
XtNlabelImage XtCLabelImage XImage * NULL SGI⊕
__________________________________________________________________________________________
XtNlabelJustify XtCLabelJustify OlDefine OL_LEFT SGI⊕
10/89 Page 3
FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
__________________________________________________________________________________________
| Flat Nonexclusives Resource Set |
|____________________|_____________________|_______________|____________________|________|
|Name | Class | Type | Default | Access |
||||||
__________________________________________________________________________________________
XtNlabelTile XtCLabelTile Boolean FALSE SGI⊕
__________________________________________________________________________________________
XtNlayoutHeight XtCLayoutHeight OlDefine OL_MINIMIZE SGI
__________________________________________________________________________________________
XtNlayoutType XtCLayoutType OlDefine OL_FIXEDROWS SGI
__________________________________________________________________________________________
XtNlayoutWidth XtCLayoutWidth OlDefine OL_MINIMIZE SGI
__________________________________________________________________________________________
XtNmanaged XtCManaged Boolean TRUE SGI
__________________________________________________________________________________________
XtNmappedWhenManaged XtCMappedWhenManaged Boolean TRUE SGI⊕
__________________________________________________________________________________________
XtNmeasure XtCMeasure int 1 SGI
__________________________________________________________________________________________
XtNmnemonic XtCMnemonic unsigned char NULL SGI⊕
__________________________________________________________________________________________
XtNnumItemFields XtCNumItemFields Cardinal 0 SGI
__________________________________________________________________________________________
XtNnumItems XtCNumItems Cardinal 0 SGI
__________________________________________________________________________________________
XtNreferenceName XtCReferenceName String NULL SGI
__________________________________________________________________________________________
XtNreferenceWidget XtCReferenceWidget Widget NULL SGI
__________________________________________________________________________________________
XtNsameHeight XtCSameHeight OlDefine OL_ALL SGI
__________________________________________________________________________________________
XtNsameWidth XtCSameWidth OlDefine OL_COLUMNS SGI
__________________________________________________________________________________________
XtNselectProc XtCCallbackProc XtCallbackProc NULL SGI⊕
__________________________________________________________________________________________
XtNsensitive XtCSensitive Boolean TRUE SGI⊕
__________________________________________________________________________________________
XtNset XtCSet Boolean FALSE SGI†⊕
__________________________________________________________________________________________
XtNtraversalOn XtCTraversalOn Boolean TRUE SGI⊕
__________________________________________________________________________________________
XtNunselectProc XtCCallbackProc XtCallbackProc NULL SGI⊕
__________________________________________________________________________________________
XtNuserData XtCUserData XtPointer NULL SGI⊕
__________________________________________________________________________________________
XtNvPad XtCVPad Dimension 0 SGI
__________________________________________________________________________________________
XtNvSpace XtCVSpace Dimension (calculated) SGI
__________________________________________________________________________________________
XtNwidth XtCWidth Dimension (calculated) SGI
__________________________________________________________________________________________
Page 4 10/89
FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
__________________________________________________________________________________________
| Flat Nonexclusives Resource Set |
|____________________|_____________________|_______________|____________________|________|
|Name | Class | Type | Default | Access |
||||||
|XtNx | XtCPosition | Position | 0 | SGI |
|____________________|_____________________|_______________|____________________|________|
|XtNy | XtCPosition | Position | 0 | SGI |
|____________________|_____________________|_______________|____________________|________|
XtNancestorSensitive
Range of Values:
TRUE/"true"
FALSE/"false"
This resource indicates the sensitivity of the sub-object's ancestors.
If TRUE, all the sub-object's ancestors are sensitive and the sub-object
is sensitive to user input. If 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
This is the pixel color used to fill in the background of the sub-object.
XtNbackgroundPixmap
This resource specifies the pixmap that is displayed as the 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
This is the client data supplied to all callback procedures.
XtNdefault
Range of Values:
TRUE/"true"
FALSE/"false"
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.
When used on the container, this resource indicates whether or not one of
the sub-objects is a default item. 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
10/89 Page 5
FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
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.
XtNdim
Range of Values:
TRUE/"true"
FALSE/"false"
If 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.
XtNfont
This resource displays the string specified by the XtNlabel resource.
XtNfontColor
This resource specifies the foreground color of the sub-object's label,
even if the label is an XImage.
XtNforeground
This is the pixel color used when drawing the sub-object's outline.
XtNitems
This is 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
This is the list of resource names used to parse the records in the
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
Range of 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
Page 6 10/89
FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
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
This is the text string that appears in the sub-object.
XtNlabelImage
This is an XImage pointer that can appear in a sub-object. This resource
is ignored if XtNlabel is non-NULL.
XtNlabelJustify
Range of Values:
OL_LEFT/"left"
OL_CENTER/"center"
OL_RIGHT/"right"
This resource specifies the justification of the label or XImage that
appears within a sub-object.
XtNlabelTile
Range of Values:
TRUE/"true"
FALSE/"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.
The XtNlabelTile resource is ignored for text labels.
XtNmappedWhenManaged
Range of Values:
TRUE/"true"
FALSE/"false"
This resource specifies whether or not a managed sub-object is displayed.
Regardless of this resource's value, all managed sub-objects will be
including when determining the layout.
Note:
This resource is never inherited from the container, so its default value
10/89 Page 7
FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
is always TRUE.
XtNnumItems
This resource specifies the number of sub-object items.
XtNnumItemFields
This resource indicates the number of resource names contained in
XtNitemFields.
XtNsameHeight
Range of Values:
OL_ALL/"all"
OL_ROWS/"rows"
OL_NONE/"none"
This resource specifies the rows that are forced to the same height.
XtNsameWidth
Range of Values:
OL_ALL/"all"
OL_COLUMNS/"columns"
OL_NONE/"none"
This resource specifies the columns that are forced to the same width.
XtNselectProc
This callback procedure is called whenever the sub-object becomes
selected by user input.
XtNsensitive
Range of Values:
TRUE/"true"
FALSE/"false"
If TRUE, the sub-object is sensitive to user input. If FALSE, the sub-
object 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
Range of Values:
TRUE/"true"
FALSE/"false"
This resource reflects the current state of the sub-object.
Note:
This resource is never inherited from the container, so its default value
Page 8 10/89
FlatNonexclusives(3W) UNIX System V FlatNonexclusives(3W)
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
This callback procedure is called whenever the sub-object becomes
unselected by user input.
10/89 Page 9