'\"!  tbl | tbl | tbl | mmdoc
'\"macro stdmacro
.if n .pH g3w.olCaption @(#)olCaption	40.3 of 1/8/90
.SO BP.HEADER \" This header enables use of .BP macro for PostScript graphics
.ig
Modified by lmh 10/18/89
..
.ds cW CAPTION
.ds rW Caption
.ds nW Caption
.ds wW caption
.ds bW \fB\*(rW\fP
.ds iW \fI\*(rW\fP
.ds oS \*(cW
.nr oN 0
.nr X
.if \nX=0 .ds x} ""CAPTION WIDGET" 3W "\&"
.if \nX=1 .ds x} ""CAPTION WIDGET" 3W
.if \nX=2 .ds x} ""CAPTION WIDGET" "" "\&"
.if \nX=3 .ds x} ""CAPTION "" "" "\&"
.TH \*(x}
.SH "WIDGET CLASS NAME"
\*(bW
.SH "SYNOPSIS"
.nf
\s-1\f4#include <Intrinsic.h>
#include <StringDefs.h>
#include <OpenLook.h>
#include <\*(nW.h>\f1\s+1\f1
.fi
.nf
.P
\s-1\f4widget = XtCreateWidget(\f2name\f4, \*(wWWidgetClass, ...);\f1\s+1
.fi
.SH "DESCRIPTION"
.P
\f3\*(rW Components\f1
.P
The \*(bW composite widget provides a convenient way to label
an arbitrary widget.
It has only two parts:
the Label and the Child Widget.
.br
.ne3.5i
.BP PSART/ps.caption1
.P
.ce
\f3Figure 1.\f1  Caption Widget
.P
\f3Layout Control\f1
.P
The application can determine how the Label is placed next to
the Child Widget
(by specifying that it goes above, below, to the left, or to the
right),
and by specifying how far away the Label is to be placed.
.bp
\f3Child Constraints\f1
.P
The \*(bW composite allows at most one child;
attempts to add more than one are refused with a warning.
If the \*(bW widget is mapped without a Child Widget,
or if the Child Widget is not managed,
only the Label is shown.
.P
\f3\*(rW Coloration\f1
.P
Figure 2 illustrates the resources that affect the coloration
of the \*(bW widget.
.br
.ne3.5i
.BP PSART/ps.caption2
.P
.ce
\f3Figure 2.\f1  Caption Coloration
.P
.ne 3.5i
.SH "RESOURCES"
.ds cO
.TS 
expand, allbox;
cB s s s s
lBp-2 lBp-2 lBp-2 lBp-2 lBp-2
lp-2 lp-2 lp-2 lp-2 lp-2.
\*(bW Resource Set
Name	Class	Type	Default	Access
_
XtNalignment	XtCAlignment	OlDefine	OL_CENTER	SGI
XtNancestorSensitive	XtCSenstitive	Boolean	TRUE	G*
XtNdepth	XtCDepth	int	(parent's)	GI
XtNdestroyCallback	XtCCallback	XtCallbackList	NULL	SI
XtNfont	XtCFont	XFontStruct *	(OPEN LOOK font)	SI
XtNfontColor	XtCFontColor	Pixel	Black*	SGI
XtNheight	XtCHeight	Dimension	(calculated)	SGI
XtNlabel	XtCLabel	String	NULL	SGI
XtNmappedWhenManaged	XtCMappedWhenManaged	Boolean	TRUE	SGI
XtNposition	XtCPosition	OlDefine	OL_LEFT	SGI
XtNsensitive	XtCSensitive	Boolean	TRUE	GI*
XtNspace	XtCSpace	Dimension	4	SGI
XtNuserData	XtCUserData	XtPointer	NULL	SGI
XtNwidth	XtCWidth	Dimension	(calculated)	SGI
XtNx	XtCPosition	Position	0	SGI
XtNy	XtCPosition	Position	0	SGI
.TE
\f3XtNalignment\f1
.PP
Range of Values:
.br
.in +5
.nf
If \f4XtNposition \f1is \f4OL_LEFT \f1or \f4OL_RIGHT\f1:\f4
.sp .5
\f4OL_TOP/"top"
OL_CENTER/"center"
OL_BOTTOM/"bottom"\f1
.sp .5
\f1If \f4XtNposition \f1is \f4OL_TOP \f1or \f4OL_BOTTOM\f1:\f4
.sp .5
\f4OL_LEFT/"left"
OL_CENTER/"center"
OL_RIGHT/"right"\f1
.in -5
.fi
.PP
This specifies how the Label is to be aligned relative to
the Child Widget,
as described below:
.IP "\f4OL_LEFT\f1" 12 
.sp -1
The left edge of the Label is aligned with the left edge of
the Child Widget.
.IP "\f4OL_TOP\f1" 
.sp -1
The top edge of the Label is aligned with the top edge of
the Child Widget.
.IP "\f4OL_CENTER\f1" 
.sp -1
The center of the Label is aligned with the center of the
Child Widget.
.IP "\f4OL_RIGHT\f1" 
.sp -1
The right edge of the Label is aligned with the right edge of
the Child Widget.
.IP "\f4OL_BOTTOM\f1" 
.sp -1
The bottom edge of the Label is aligned with the bottom edge of
the Child Widget.
.P
.sp
\f3XtNfont\f1
.PP
Range of Values:
.br
.in +5
(any valid return from \f4XLoadQueryFont()\f1)
.in -5
.P
Default:
.P
.in +5
(chosen to match the scale and screen resolution)
.in -5
.PP
This resource identifies the font to be used to display the
Label.
.P
The default value points to a cached font structure;
an application should not expect to get this value with a call to
\f4XtGetValues()\f1
and use it reliably thereafter.
.sp
\f3XtNfontColor\f1
.PP
Range of Values:
.br
.in +5
(any \f4Pixel \f1value valid for the current display)/(any name from the \f4rgb.txt \f1file)
.in -5
.PP
This resource specifies the color for the font.
If not set,
the color from the
\f4XtNforeground\f1
resource,
if available,
is used for the font.
.P
See the note about the interaction of this resource with other
color resources under the description of the
\f4XtNbackground\f1
resource in \f3CORE RESOURCES(3W)\f1.
.sp
\f3XtNlabel\f1
.P
This resource gives the string to use for the Label.
If NULL,
the size of the \*(bW widget will be identical to the size of
the child widget.
.P
Note that the Label is displayed as given;
no punctuation (such as a colon) is added.
.P
Control characters (other than spaces) are ignored without
warning.
For example, embedded newlines do not cause line breaks.
.sp
\f3XtNposition\f1
.PP
Range of Values:
.br
.in +5
.nf
\f4OL_LEFT/"left"
OL_RIGHT/"right"
OL_TOP/"top"
OL_BOTTOM/"bottom"\f1
.in -5
.fi
.P
This resource determines on which side of the Child Widget the
Label is to be placed.
The value may be one of
\f4OL_LEFT\f1,
\f4OL_RIGHT\f1,
\f4OL_TOP\f1,
or
\f4OL_BOTTOM\f1
to indicate that the Label is to be placed to the left, to
the right, above, or below the Child Widget, respectively.
.bp
\f3XtNspace\f1
.PP
Range of Values:
.br
.in +5
.nf
\f40 \(<= XtNspace\f1
.in -5
.fi
.PP
This resource gives the separation of the Label from the
child widget,
in pixels,
as suggested by Figure 3.
.br
.ne3.5i
.BP PSART/ps.caption3
.P
.ce
\f3Figure 3.\f1  Label and Child Widget Spacing
.\" EOF
