EXCLUSIVE SETTINGS M
WID
SC
G.
ET(
R3
EF
W)
ERENCE MA
EN
XC
UA
LL
USI
PA
VE
GESETTINGS WIDGET(3W)
WIDGET CLASS NAME
Exclusives
SYNOPSIS
#include <Intrinsic.h>
#include <StringDefs.h>
#include <OpenLook.h>
#include <Exclusives.h>
widget = XtCreateWidget(name, exclusivesWidgetClass, ...);
DESCRIPTION
The Exclusives widget provides a simple way to build a one-
of-many button selection object. It manages a set of rec-
tangular buttons, providing layout management.
Grid Layout and Button Labels The Exclusives widget lays out
the rectangular buttons in a grid in the order they are
added as child widgets by the application. The number of
rows or columns in this grid can be controlled by the appli-
cation. If the grid has more than one row, the Exclusives
widget forces the buttons in each column to be the same size
as the widest in the column, and forces their labels to be
left-justified. (Note: If the grid has a single row, each
button will be only as wide as necessary to display the
label.)
Amiga Unix Last change: 1
EXCLUSIVE SETTINGS M
WID
SC
G.
ET(
R3
EF
W)
ERENCE MA
EN
XC
UA
LL
USI
PA
VE
GESETTINGS WIDGET(3W)
Figure 1. Example of Exclusive Buttons
Amiga Unix Last change: 2
EXCLUSIVE SETTINGS M
WID
SC
G.
ET(
R3
EF
W)
ERENCE MA
EN
XC
UA
LL
USI
PA
VE
GESETTINGS WIDGET(3W)
Selection Control-One Set
In one mode of operation (i.e, XtNnoneSet is FALSE), exactly
one button in an Exclusives widget must be "set" (i.e. the
XtNset resource set to TRUE). An error is generated if an
Exclusives is configured with two or more rectangular but-
tons set or with no button set. The Exclusives widget main-
tains this condition by ensuring that when a button is set
by the user clicking SELECT over it, the button that was set
is cleared and its XtNunselect callbacks are invoked. How-
ever, clicking SELECT over a button that was already set
does nothing.
Selection Control-None Set
In the other mode of operation (i.e, XtNnoneSet is TRUE), at
most one button in an Exclusives widget can be set. An
error is generated if an Exclusives is configured with two
or more rectangular buttons set, but not if configured with
no button set. The Exclusives widget maintains this condi-
tion by ensuring that when a button is set by the user
clicking SELECT over it, any button that was previously set
is cleared. Also, clicking SELECT over a button that was
already set will unset it. Clearing a button in either case
invokes its XtNunselect callbacks.
Amiga Unix Last change: 3
EXCLUSIVE SETTINGS M
WID
SC
G.
ET(
R3
EF
W)
ERENCE MA
EN
XC
UA
LL
USI
PA
VE
GESETTINGS WIDGET(3W)
Use in a Menu The Exclusives widget can be added as a single
child to a menu pane to implement a one-of-many menu choice.
Child Constraint The Exclusives widget constrains its child
widgets to be of the class rectButtonWidgetClass.
Exclusives Coloration There is no explicit foreground or
background in the Exclusives composite widget; each rec-
tangular button has its own coloration.
RESOURCES__________________________________________________________________________________
Exclusives Resource Set
______________________________________________________________________________________
_Name___________________Class__________________Type_____________Default________Access_
Amiga Unix Last change: 4
() MISC. REFERENCE MANUAL PAGES ()
______________________________________________________________________________________
_XtNancestorSensitive___XtCSenstitive__________Boolean__________TRUE___________G*_____
XtNdepth XtCDepth int (parent's) GI
______________________________________________________________________________________
_XtNdestroyCallback_____XtCCallback____________XtCallbackList___NULL___________SI_____
XtNheight XtCHeight Dimension (calculated) SGI
______________________________________________________________________________________
_XtNlayoutType__________XtCLayoutType__________OlDefine_________OLFIXEDROWS___SGI____
XtNmappedWhenManaged XtCMappedWhenManaged Boolean TRUE SGI
______________________________________________________________________________________
_XtNmeasure_____________XtCMeasure_____________int______________1______________SGI____
| XtNnoneSet XtCNoneSet Boolean FALSE SGI |
|_____________________________________________________________________________________|
|_XtNsensitive________|__XtCSensitive________|__Boolean_______|__TRUE________|__GI*___|
| XtNuserData | XtCUserData | XtPointer | NULL | SGI |
|_____________________|______________________|________________|______________|________|
|_XtNwidth____________|__XtCWidth____________|__Dimension_____|__(calculated)|__SGI___|
| XtNx | XtCPosition | Position | 0 | SGI |
|_____________________|______________________|________________|______________|________|
|_XtNy________________|__XtCPosition_________|__Position______|__0___________|__SGI___|
Amiga Unix Last change: 1
() MISC. REFERENCE MANUAL PAGES ()
XtNlayoutType
Range of Values:
OLFIXEDROWS/"fixedrows"
OLFIXEDCOLS/"fixedcols"
This resource controls the type of layout of the child widg-
ets by the Exclusives composite. The choices are to specify
the number of rows or the number of columns. Only one of
these dimensions can be specified directly; the other is
determined by the number of child widgets added, and will
always be enough to show all the child widgets. The values
of the XtNlayoutType resource can be
OLFIXEDROWS if the layout should have a fixed number of
rows;
OLFIXEDCOLS if the layout should have a fixed number of
columns.
XtNmeasure
Range of Values:
0 < XtNmeasure
This resource gives the number of rows or columns in the
layout of the child widgets. If there are not enough child
widgets to fill a row or column, the remaining space is left
blank. If there is only one row (column), and it is not
filled with child widgets, the remaining ``space'' is of
zero width (height).
XtNnoneSet
Range of Values:
TRUE
FALSE
This resource controls whether the buttons controlled by the
Exclusives composite can be toggled into an unset mode
directly. If set to FALSE, at all times exactly one button
must be set. Attempting to select the currently set button
does nothing. If set to TRUE, at all times no more than one
button can be set. However, the user can select the
currently set button again to toggle it back into an unset
mode.
Amiga Unix Last change: 2