Nonexclusives(3w) — OLIT Widget Set
NAME
Nonexclusives − nonexclusive choice widget
SYNOPSIS
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <Xol/OpenLook.h>
#include <Xol/Nonexclusi.h>
. . .
Widget my_nonexclusive, my_parent;
String my_name;
ArgList args;
Cardinal num_args;
my_nonexclusive = XtCreate( my_name, nonexclusivesWidgetClass,
my_parent, args, num_args);
DESCRIPTION
The Nonexclusives provides layout management and selection control for a set of rectangular buttons or check boxes. It provides a simple way to build a several-of-many button selection object.
Layout and Labels
The Nonexclusives widget lays out the rectangular buttons or check boxes 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 application. If the grid has more than one row, the Nonexclusives widget forces the rectangular buttons or check boxes in each column to be the same size as the widest in the column.
Note: If the grid is a single row, each button will be only as wide as necessary to display the label.
The rectangular buttons or check boxes are separated by a distance that is 50% of the prevailing point size for the containing window.
Figure 1 Example of Nonexclusive Buttons
Use in Menu
The Nonexclusives widget can be added as a single child to a menu pane to implement a several-of-many menu choice. Only RectButton widgets can be used in a Nonexclusives widget in a menu.
Restrictions on Children
Child widgets of a Nonexclusives widget must all be from either: rectButtonWidgetClass, or checkBoxWidgetClass.
In addition, all the child widgets must be of the same class.
Coloration
There is no explicit foreground or background in the Nonexclusives composite widget; each rectangular button has its own foreground and background. The space between the rectangular buttons or check boxes is the same color or pixmap as the parent of the Nonexclusives widget.
Figure 2 Example of Nonexclusive Buttons "Nonexclusives buttons"
Keyboard Traversal
The Nonexclusives widget manages the traversal between a set of RectButtons. When the user traverses to a Nonexclusives widget, the first RectButton in the set will receive input focus. The MOVEUP, MOVEDOWN, MOVERIGHT, and MOVELEFT keys move the input focus between the RectButtons. To traverse out of the Nonexclusives 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.
These controls have two states: "set" and "not set". Pressing the SELECTKEY on a nonexclusive control will toggle the current state. If the control is in a Menu, then the MENUKEY will also toggle the current state. If the control is "set", then toggling the control will call the XtNunselect callback list. If the control is "not set", then toggling the control will call the XtNselect callback list.
RESOURCES
SEE ALSO
Version 3.0 — Last change: 19 July 91 — Last change: 19 July 91