Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



CAPTION WIDGET(3W)MISC. REFERENCE MANUAL PAGES CAPTION WIDGET(3W)



WIDGET CLASS NAME
     Caption

SYNOPSIS
     #include <Intrinsic.h>
     #include <StringDefs.h>
     #include <OpenLook.h>
     #include <Caption.h>
     widget = XtCreateWidget(name, captionWidgetClass, ...);

DESCRIPTION
     Caption Components The Caption composite widget  provides  a
     convenient  way  to  label an arbitrary widget.  It has only
     two parts:  the Label and the Child Widget.
                      Figure 1.  Caption Widget
     Layout Control 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.




































Amiga Unix                Last change:                          1





CAPTION WIDGET(3W)MISC. REFERENCE MANUAL PAGES CAPTION WIDGET(3W)



     Child Constraints The Caption composite allows at  most  one
     child;  attempts  to  add  more  than one are refused with a
     warning.  If the Caption widget is mapped  without  a  Child
     Widget,  or  if  the  Child  Widget is not managed, only the
     Label is shown.  Caption Coloration Figure 2 illustrates the
     resources that affect the coloration of the Caption widget.
                    Figure 2.  Caption Coloration

RESOURCES
     __________________________________________________________________________________________
    |___________________________________Caption_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___|
     XtNalignment

     Range of Values:
          If XtNposition is OL_LEFT or OL_RIGHT:

          OL_TOP/"top"
          OL_CENTER/"center"
          OL_BOTTOM/"bottom"
          If XtNposition is OL_TOP or OL_BOTTOM:

          OL_LEFT/"left"
          OL_CENTER/"center"
          OL_RIGHT/"right"





Amiga Unix                Last change:                          2





CAPTION WIDGET(3W)MISC. REFERENCE MANUAL PAGES CAPTION WIDGET(3W)



     This specifies how the Label is to be  aligned  relative  to
     the Child Widget, as described below:

     OL_LEFT     The left edge of the Label is aligned  with  the
                 left edge of the Child Widget.

     OL_TOP      The top edge of the Label is  aligned  with  the
                 top edge of the Child Widget.

     OL_CENTER   The center of the  Label  is  aligned  with  the
                 center of the Child Widget.

     OL_RIGHT    The right edge of the Label is aligned with  the
                 right edge of the Child Widget.

     OL_BOTTOM   The bottom edge of the Label is aligned with the
                 bottom edge of the Child Widget.

                 XtNfont

     Range of Values:
          (any valid return from XLoadQueryFont())
     Default:
          (chosen to match the scale and screen resolution)

     This resource identifies the font to be used to display  the
     Label.  The default value points to a cached font structure;
     an application should not expect to get this  value  with  a
     call to XtGetValues() and use it reliably thereafter.

     XtNfontColor

     Range of Values:
          (any Pixel value valid for  the  current  display)/(any
          name from the rgb.txt file)

     This resource specifies the color for the font.  If not set,
     the  color from the XtNforeground resource, if available, is
     used for the font.  See the note about  the  interaction  of
     this  resource with other color resources under the descrip-
     tion of the XtNbackground resource in CORE RESOURCES(3W).

     XtNlabel This resource gives  the  string  to  use  for  the
     Label.   If  NULL,  the  size  of the Caption widget will be
     identical to the size of the child widget.   Note  that  the
     Label  is  displayed  as  given;  no  punctuation (such as a
     colon) is added.  Control characters (other than spaces) are
     ignored  without warning.  For example, embedded newlines do
     not cause line breaks.

     XtNposition




Amiga Unix                Last change:                          3





CAPTION WIDGET(3W)MISC. REFERENCE MANUAL PAGES CAPTION WIDGET(3W)



     Range of Values:
          OL_LEFT/"left"
          OL_RIGHT/"right"
          OL_TOP/"top"
          OL_BOTTOM/"bottom"
     This resource determines on which side of the  Child  Widget
     the Label is to be placed.  The value may be one of OL_LEFT,
     OL_RIGHT, OL_TOP, or OL_BOTTOM to indicate that the Label is
     to  be placed to the left, to the right, above, or below the
     Child Widget, respectively.













































Amiga Unix                Last change:                          4





CAPTION WIDGET(3W)MISC. REFERENCE MANUAL PAGES CAPTION WIDGET(3W)



     XtNspace

     Range of Values:
          0 _ XtNspace

     This resource gives the separation of  the  Label  from  the
     child widget, in pixels, as suggested by Figure 3.
              Figure 3.  Label and Child Widget Spacing















































Amiga Unix                Last change:                          5



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026