ControlArea(3W) UNIX System V ControlArea(3W)
NAME
ControlArea - manages a number of child widgets in rows or columns
SYNOPSIS
#include <Intrinsic.h>
#include <StringDefs.h>
#include <OpenLook.h>
#include <ControlAre.h>
widget = XtCreateWidget(name, controlAreaWidgetClass, ...);
DESCRIPTION
ControlArea Components
The ControlArea widget has zero or more Child Widgets and an optional
Border.
Layout Control
The ControlArea composite widget arranges its child widgets, presenting
them to the end-user as a group of "controls". The application can
choose one of four simple layout schemes: Fixed number of columns in the
control pane, fixed number of rows, fixed overall width of the control
area, and fixed overall height. The application can also specify the
inter-control spacing and the size of the margin around the children.
Equal Height Rows
The children in each row align at the top of the row. The distance
between the top of one row and the next is the height of the tallest
control in the row plus the application specified inter-row spacing.
ControlArea Coloration
Figure 1 illustrates the resources that affect the coloration of the
ControlArea widget.
10/89 Page 1
ControlArea(3W) UNIX System V ControlArea(3W)
Figure 1. Control Area Coloration
RESOURCES
_______________________________________________________________________________________
| ControlArea Resource Set |
|_____________________|______________________|_________________|______________|________|
| Name | Class | Type | Default | Access|
|_____________________|______________________|_________________|______________|________|
_______________________________________________________________________________________
XtNalignCaptions XtCAlignCaptions Boolean FALSE SGI
_______________________________________________________________________________________
XtNancestorSensitive XtCSenstitive Boolean TRUE G*
_______________________________________________________________________________________
XtNbackground XtCBackground Pixel White SGI†
_______________________________________________________________________________________
XtNbackgroundPixmap XtCPixmap Pixmap (none) SGI†
_______________________________________________________________________________________
XtNborderColor XtCBorderColor Pixel Black SGI†
_______________________________________________________________________________________
XtNborderPixmap XtCPixmap Pixmap (none) SGI†
_______________________________________________________________________________________
XtNborderWidth XtCBorderWidth Dimension 0 SGI
_______________________________________________________________________________________
XtNcenter XtCCenter Boolean FALSE SGI
_______________________________________________________________________________________
XtNconsumeEvent XtCConsumeEvent XtCallbackList NULL SG
_______________________________________________________________________________________
XtNdepth XtCDepth int (parent's) GI
_______________________________________________________________________________________
XtNdestroyCallback XtCCallback XtCallbackList NULL SI
_______________________________________________________________________________________
XtNhPad XtCHPad Dimension 4 SGI
_______________________________________________________________________________________
XtNhSpace XtCHSpace Dimension 4 SGI
_______________________________________________________________________________________
XtNheight XtCHeight Dimension (calculated) SGI
_______________________________________________________________________________________
XtNlayoutType XtCLayoutType OlDefine OL_FIXEDROWS SGI
_______________________________________________________________________________________
XtNmappedWhenManaged XtCMappedWhenManaged Boolean TRUE SGI
_______________________________________________________________________________________
XtNmeasure XtCMeasure int 1 SGI
_______________________________________________________________________________________
XtNsameSize XtCSameSize OlDefine OL_COLUMNS SGI
_______________________________________________________________________________________
XtNsensitive XtCSensitive Boolean TRUE GI*
_______________________________________________________________________________________
XtNuserData XtCUserData XtPointer NULL SGI
_______________________________________________________________________________________
XtNvPad XtCVPad Dimension 4 SGI
_______________________________________________________________________________________
XtNvSpace XtCVSpace Dimension 4 SGI
Page 2 10/89
ControlArea(3W) UNIX System V ControlArea(3W)
_______________________________________________________________________________________
| ControlArea Resource Set |
|_____________________|______________________|_________________|______________|________|
| Name | Class | Type | Default | Access|
|_____________________|______________________|_________________|______________|________|
|_____________________|______________________|_________________|______________|________|
| XtNwidth | XtCWidth | Dimension | (calculated)| SGI |
|_____________________|______________________|_________________|______________|________|
| XtNx | XtCPosition | Position | 0 | SGI |
|_____________________|______________________|_________________|______________|________|
| XtNy | XtCPosition | Position | 0 | SGI |
|_____________________|______________________|_________________|______________|________|
XtNalignCaptions
Range of Values:
TRUE
FALSE
This resource controls how the ControlArea widget aligns widgets of the
Caption class. If set to TRUE, the ControlArea will align all Caption
widgets in each column so that their captions are right justified. This
may affect the width calculation for a column: The effective width for
the Caption widgets in a column becomes the sum of the width of the
widest caption, plus the largest caption/child widget separation and
child widget width.
This alignment is only for groups of Caption widgets with all their
captions on the left or the right. Mixed orientation, or captions above
or below, cannot be aligned well.
Figure 2. Aligning Captions
If the XtNalignCaption resource is set to FALSE, the ControlArea will
align all Caption widgets the same as other widgets-by their overall
width.
This resource takes precedence over the XtNcenter resource, but only for
Caption widgets.
XtNcenter
Range of Values:
TRUE
FALSE
This resource controls how the ControlArea widget orients each widget
within a column (although see also XtNalignCaptions). If set to TRUE,
the ControlArea will center each widget with each column; if set to
FALSE, the ControlArea will left justify each widget within each column,
unless the XtNalignCaptions resource is TRUE. XtNhPad
XtNvPad
10/89 Page 3
ControlArea(3W) UNIX System V ControlArea(3W)
Range of Values:
0 < XtNhPad
0 < XtNvPad
These resources give the amount of padding, in pixels, to leave around
the edges of the control area, left and right, and top and bottom,
respectively, as suggested by Figure 3.
Figure 3. Padding Around Controls
XtNhSpace
XtNvSpace
Range of Values:
0 < XtNhSpace
0 < XtNvSpace
These resources give the amount of space, in pixels, to leave between
controls horizontally and vertically, respectively. If the controls are
of different sizes in a row or column, the spacing applies to the widest
or tallest dimension of all the controls.
Figure 4. Spacing Between Controls
XtNlayoutType
Range of Values:
OL_FIXEDROWS/"fixedrows"
OL_FIXEDCOLS/"fixedcols"
OL_FIXEDWIDTH/"fixedwidth"
OL_FIXEDHEIGHT/"fixedheight"
This resource controls the layout of the child widgets by the ControlArea
composite. The choices are to specify the number of rows or columns, or
to specify the overall height or width of the layout area. Only one of
these dimensions can be specified directly; the other is determined by
the number of controls added. For instance, if the application specifies
that the control area should have four columns, the number of rows will
be the number of controls divided by four.
The values of the XtNlayoutType resource can be:
OL_FIXEDROWS if the layout should have a fixed number of rows and
enough columns to hold all the controls;
OL_FIXEDCOLS if the layout should have a fixed number of columns and
enough rows to hold all the controls;
OL_FIXEDWIDTH if the layout should be of a fixed width but tall
enough to hold all the controls;
Page 4 10/89
ControlArea(3W) UNIX System V ControlArea(3W)
OL_FIXEDHEIGHT if the layout should be of a fixed height but wide
enough to hold all the controls.
The XtNmeasure resource gives the number of rows or columns or the fixed
height or width.
XtNmeasure
Range of Values:
0 < XtNmeasure
Default:
If XtNlayoutType is OL_FIXEDROWS or OL_FIXEDCOLS: 1
If XtNlayoutType is OL_FIXEDWIDTH or OL_FIXEDHEIGHT:
width or height of widest or tallest widget, depending on
XtNlayoutType.
This resource gives the number of rows or columns in the layout of the
child widgets, or the fixed width or height of the control area. When
XtNlayoutType is OL_FIXEDWIDTH or OL_FIXEDHEIGHT, the measure includes
the padding on both edges and the inter-control spacing, as suggested by
Figure 5.
Figure 5. XtNmeasure
XtNsameSize
Range of Values:
OL_NONE/"none"
OL_COLUMNS/"columns"
OL_ALL/"all"
This resource controls which controls, if any, are forced to be the same
width within the ControlArea widget:
OL_NONE The controls are placed in fixed-width columns, but the size
of each control is left alone. The width of each column is
the width of the widest control in the column.
OL_COLUMNS Controls of the same class in each column are made the same
width as the widest of them. The width of each column is
thus the width of the widest control in the column.
OL_ALL All controls are made the same width, the width of the widest
control in the ControlArea widget.
10/89 Page 5