Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ olCheckBox() — Amiga System V Release 4 Version 2.03

Media Vault

Software Library

Restoration Projects

Artifacts Sought



CHECKBOX WIDGET(3W)MISC. REFERENCE MANUAL PAGEC
S
HECKBOX WIDGET(3W) WIDGET CLASS NAME CheckBox SYNOPSIS #include <Intrinsic.h> #include <StringDefs.h> #include <OpenLook.h> #include <CheckBox.h> widget = XtCreateWidget(name, checkBoxWidgetClass, ...); DESCRIPTION CheckBox Components The CheckBox widget implements one of the OPEN LOOK button widgets. It consists of a Label next to a Check Box; the Check Box will have a Check Mark, if selected. Figure 1. Check Box Widget Amiga Unix Last change: 1


CHECKBOX WIDGET(3W)MISC. REFERENCE MANUAL PAGEC
S
HECKBOX WIDGET(3W) Figure 2 shows several buttons, in unselected and selected, as well as normal and dim states. Figure 2. Check Boxes Typical Use of Check Boxes Check Boxes may be used alone, but are usually used in the Nonexclusives composite widget, where they are used to implement a several-of-many selec- tion. Making the CheckBox widget a child of a different composite widget will not produce an error, but proper behavior is not guaranteed. Operating on Check Boxes A CheckBox widget has two states: "set" and "not set". When set, the Check Mark is visible. Toggling this state alternates a resource (XtNset) between "true" and "false" and starts an action associated with the check box. Clicking SELECT on a check box toggles the state associated with it. Pressing SELECT, or moving the pointer into the check box while SELECT is pressed, adds or removes the Check Mark to reflect the state the check box would be in if SELECT was released. Releasing SELECT toggles the state. Moving the pointer off the check box before releas- ing SELECT restores the original Check Box, but does not toggle the state. Clicking or pressing MENU does not do anything in the CheckBox widget; the event is passed up to an ancestor widget. Amiga Unix Last change: 2


CHECKBOX WIDGET(3W)MISC. REFERENCE MANUAL PAGEC
S
HECKBOX WIDGET(3W) Bounds on SELECT Only the Check Box and Check Mark respond to SELECT, as shown in Figure 3. Figure 3. Active Region for a Check Box CheckBox Coloration Figure 4 illustrates the resources that affect the coloration of the CheckBox widget. Figure 4. Check Box Coloration RESOURCES ___________________________________________________________________________________________ ___________________________________CheckBox_Resource_Set___________________________________ Name Class Type Default Access ___________________________________________________________________________________________ Amiga Unix Last change: 3


()                MISC. REFERENCE MANUAL PAGES                 ()



     ___________________________________________________________________________________________
     _XtNancestorSensitive___XtCAncestorSenstitive___Boolean__________TRUE_______________G*_____
      XtNdepth               XtCDepth                int              (parent's)         GI
     ___________________________________________________________________________________________
     _XtNdestroyCallback_____XtCCallback_____________XtCallbackList___NULL_______________SI_____
      XtNdim                 XtCDim                  Boolean          FALSE              SGI
     ___________________________________________________________________________________________
     _XtNfont________________XtCFont_________________XFontStruct_*____(OPEN_LOOK_font)___SI_____
      XtNfontColor           XtCFontColor            Pixel            Black*             SGI
     ___________________________________________________________________________________________
     _XtNforeground__________XtCForeground___________Pixel____________Black______________SGI†___
    | XtNheight              XtCHeight               Dimension        (calculated)       SGI   |
    |_____________________|_______________________|________________|__________________|________|
    |_XtNlabel____________|__XtCLabel_____________|__String________|__(class_name)____|__SGI___|
    | XtNlabelImage       |  XtCLabelImage        |  XImage *      |  (class name)    |  SGI   |
    |_____________________|_______________________|________________|__________________|________|
    |_XtNlabelJustify_____|__XtCLabelJustify______|__OlDefine______|__OLLEFT_________|__SGI___|
    | XtNlabelTile        |  XtCLabelTile         |  Boolean       |  FALSE           |  SGI   |
    |_____________________|_______________________|________________|__________________|________|
    |_XtNlabelType________|__XtCLabelType_________|__int___________|__OLSTRING_______|__SGI___|
    | XtNmappedWhenManaged|  XtCMappedWhenManaged |  Boolean       |  TRUE            |  SGI   |
    |_____________________|_______________________|________________|__________________|________|

































Amiga Unix                Last change:                          1





()                MISC. REFERENCE MANUAL PAGES                 ()



     ______________________________________________________________________________
     ________________________CheckBox_Resource_Set_(cont.)_________________________
      Name               Class              Type             Default        Access
     ______________________________________________________________________________



















































Amiga Unix                Last change:                          2





()                MISC. REFERENCE MANUAL PAGES                 ()



     ______________________________________________________________________________
    |_XtNposition________XtCPosition________OlDefine_________OLLEFT________SGI___|
    | XtNrecomputeSize|  XtCRecomputeSize|  Boolean       |  TRUE        |  SGI   |
    |_________________|__________________|________________|______________|________|
    |_XtNselect_______|__XtCCallback_____|__XtCallbackList|__NULL________|__SI____|
    | XtNsensitive    |  XtCSensitive    |  Boolean       |  TRUE        |  GI*   |
    |_________________|__________________|________________|______________|________|
    |_XtNset__________|__XtCSet__________|__Boolean_______|__TRUE________|__SGI___|
    | XtNunselect     |  XtCCallback     |  XtCallbackList|  NULL        |  SI    |
    |_________________|__________________|________________|______________|________|
    |_XtNuserData_____|__XtCUserData_____|__XtPointer_____|__NULL________|__SGI___|
    | XtNwidth        |  XtCWidth        |  Dimension     |  (calculated)|  SGI   |
    |_________________|__________________|________________|______________|________|
    |_XtNx____________|__XtCPosition_____|__Position______|__0___________|__SGI___|
    | XtNy            |  XtCPosition     |  Position      |  0           |  SGI   |
    |_________________|__________________|________________|______________|________|
     XtNdim

     Range of Values:
          TRUE
          FALSE

     If this resource is TRUE, the check box border is dimmed  to
     show  that the check box represents the state of one or more
     of several objects  that,  as  a  group,  are  in  different
     states.

     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).





Amiga Unix                Last change:                          1





()                MISC. REFERENCE MANUAL PAGES                 ()



     XtNforeground This resource defines the foreground color for
     the  widget.   See  the  note  about the interaction of this
     resource with other color resources under the description of
     the XtNbackground resource in CORE RESOURCES(3W).

     XtNlabel This resource is a pointer  to  the  text  for  the
     Label.    This  resource  is  ignored  if  the  XtNlabelType
     resource has the value OLIMAGE.

     XtNlabelImage This resource is a pointer to  the  image  for
     the  Label of the CheckBox widget.  This resource is ignored
     unless the XtNlabelType resource has the value OLIMAGE.  If
     the image is smaller than the space available for it next to
     the Check Box, it is centered vertically and either centered
     or left-justified horizontally depending on the value of the
     XtNlabelJustify resource.  If the image is larger  than  the
     space  available  for  it, it is clipped so that it does not
     stray outside the space.

     XtNlabelJustify

     Range of Values:
          OLLEFT/"left"
          OLRIGHT/"right"

     This resource dictates whether the Label should be left-  or
     right-justified  within  the  space left before or after the
     Check Box, if the XtNwidth resource gives  more  space  than
     needed.

     XtNlabelTile

     Range of Values:
          TRUE
          FALSE

     This  resource  augments  the   XtNlabelImage/XtNlabelPixmap
     resource  to  allow  tiling  of the sub-object's background.
     For an image/pixmap that is smaller  than  the  sub-object's
     background, the label area is tiled with the image/pixmap to
     fill the sub-object's background if this resource  is  TRUE;
     otherwise, the label is placed as described by the XtNlabel-
     Image resource.  The XtNlabelTile resource  is  ignored  for
     text labels.











Amiga Unix                Last change:                          2





()                MISC. REFERENCE MANUAL PAGES                 ()



     XtNlabelType

     Range of Values:
          OLSTRING/"string"
          OLIMAGE/"image"

     This resource identifies the form that the Label takes.   It
     can  have the value OLSTRING or OLIMAGE for text or image,
     respectively.

     XtNposition

     Range of Values:
          OLLEFT/"left"
          OLRIGHT/"right"

     This resource determines on which side of the Check Box  the
     Label  is  to be placed.  The value may be one of OLLEFT or
     OLRIGHT to indicate that the Label is to be placed  to  the
     left or to the right of the Check Box, respectively.

     XtNrecomputeSize

     Range of Values:
          TRUE
          FALSE

     This resource indicates whether the CheckBox  widget  should
     calculate  its  size and automatically set the XtNheight and
     XtNwidth resources.  If set to  TRUE,  the  CheckBox  widget
     will do normal size calculations that may cause its geometry
     to change.  If set to FALSE, the CheckBox widget will  leave
     its  size  alone;  this  may cause truncation of the visible
     image being shown by the CheckBox widget if the  fixed  size
     is  too small, or may cause padding if the fixed size is too
     large.  The location of the padding  is  determined  by  the
     XtNlabelJustify resource.

     XtNselect This is the list of  callbacks  invoked  when  the
     widget is selected.
     XtNset

     Range of Values:
          TRUE
          FALSE

     This resource reflects the current state of the  check  box.
     The  Check  Mark  is present if XtNset is TRUE and is absent
     otherwise.

     XtNunselect This is the list of  callbacks  invoked  when  a
     CheckBox  widget  is  toggled into the ``unset'' mode by the
     end user to make XtNset be FALSE.  Note that simply  setting



Amiga Unix                Last change:                          3




()                MISC. REFERENCE MANUAL PAGES                 ()



     XtNset  to FALSE with a call to XtSetValues() does not issue
     the XtNunselect callbacks.





















































Amiga Unix                Last change:                          4





()                MISC. REFERENCE MANUAL PAGES                 ()



     XtNdim  and  XtNset  Interaction  The  XtNdim   and   XtNset
     resources  can  be  set independently, as the state table in
     Figure 5 shows.

         Figure 5.  Check Box Appearance with Set/Default/Dim

     Label and Check  Box  Appearance  The  XtNwidth,  XtNheight,
     XtNrecomputeSize,  and XtNlabelJustify resources interact to
     produce a truncated, clipped, centered,  left-justified,  or
     right-justified Label and Check Box as shown in Figure 6.













































Amiga Unix                Last change:                          5





()                MISC. REFERENCE MANUAL PAGES                 ()



              Figure 6.  Label and Check Box Appearance

     When the label is left-justified, right-justified,  or  cen-
     tered the extra space is filled with the background color of
     the CheckBox widget's parent, as determined by the  XtNback-
     ground and XtNbackgroundPixmap resources of the parent.

     See also the XtNlabelTile resource for how  it  affects  the
     appearance of a label.














































Amiga Unix                Last change:                          6



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