<!-- $XConsortium: ToggleBB.sgm /main/15 1996/09/25 13:46:27 cdedoc $ -->
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
<!-- (c) Copyright 1995 International Business Machines Corp. -->
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1995 Novell, Inc. -->
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
<!-- (c) Copyright 1995 Hitachi. -->
<RefEntry Id="CDEMMA.MAN548.rsml.1">
<RefMeta>
<RefEntryTitle>XmToggleButtonGadget</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Classname>XmToggleButtonGadget</Classname></RefName>
<RefPurpose>The ToggleButtonGadget widget class
<IndexTerm>
<Primary>XmToggleButtonGadget</Primary>
</IndexTerm><IndexTerm>
<Primary>widget class</Primary>
<Secondary>ToggleButtonGadget</Secondary>
</IndexTerm></RefPurpose>
</RefNameDiv>
<RefSynopsisDiv>
<Synopsis>#include &lt;Xm/ToggleBG.h>
</Synopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>ToggleButtonGadget sets nontransitory state data within an
application. Usually this gadget consists of an indicator
(square, diamond, or round)
with either text or a pixmap on one side of it.
However,
it can also consist of just text or a pixmap without the indicator.
</Para>
<Para>The toggle graphics display a <Literal>1-of-many</Literal>, <Literal>N-of-many</Literal>, or
<Literal>N-of-many-round</Literal> selection state.
When a toggle indicator is displayed, a square indicator shows an
<Literal>N-of-many</Literal>
selection state, a diamond-shaped indicator shows a
<Literal>1-of-many</Literal> selection state, and a circle-shaped indicator shows a
<Literal>1-of-many-round</Literal> selection state.
</Para>
<Para>ToggleButtonGadget
implies a set or unset state.
In the case of a label and an indicator, an
empty indicator (square, diamond, or round) indicates that
ToggleButtonGadget
is unset, and a filled indicator shows that it is
set. The indicator may be filled with a check mark or the
select color. In the case of a pixmap
toggle, different pixmaps are used to display the set/unset
states.
ToggleButtonGadget can also indicate an indeterminate state. In the case of
a label and an indicator, an indeterminate state is indicated by a
stippled flat box.
In the case of a pixmap toggle, a different pixmap is used to display
the indeterminate state.
</Para>
<Para>The default behavior associated with a ToggleButtonGadget in a menu depends on
the type of menu system in which it resides.
By default, <KeySym>Btn1</KeySym> controls the behavior of the ToggleButtonGadget.
In addition, <KeySym>Btn3</KeySym> controls the behavior of the ToggleButtonGadget if
it resides in a PopupMenu system.
The actual mouse button used is determined by its RowColumn parent.
</Para>
<Para>Label's resource <SystemItem Class="Resource">XmNmarginLeft</SystemItem> may
be increased
to accommodate the toggle indicator when it is created.
</Para>
<Para>ToggleButtonGadget uses the <Symbol Role="Globalvar">XmQTmenuSystem</Symbol> and
<Symbol Role="Globalvar">XmQTspecifyRenderTable</Symbol> traits.
</Para>
<RefSect2>
<Title>Classes</Title>
<Para>ToggleButtonGadget inherits behavior,
resources, and traits from <Classname>Object</Classname>, <Classname>RectObj</Classname>, <Classname>XmGadget</Classname>
and <Classname>XmLabelGadget</Classname>.
</Para>
<Para>The class pointer is <Symbol Role="Globalvar">xmToggleButtonGadgetClass</Symbol>.
</Para>
<Para>The class name is <Classname>XmToggleButtonGadget</Classname>.
</Para>
</RefSect2>
<RefSect2>
<Title>New Resources</Title>
<Para>The following table defines a set of widget resources used by the programmer
to specify data. The programmer can also set the resource values for the
inherited classes to set attributes for this widget. To reference a
resource by name or by class in a <Filename>.Xdefaults</Filename> file, remove the <SystemItem Class="Constant">XmN</SystemItem> or
<SystemItem Class="Constant">XmC</SystemItem> prefix and use the remaining letters. To specify one of the defined
values for a resource in a <Filename>.Xdefaults</Filename> file, remove the <SystemItem Class="Constant">Xm</SystemItem> prefix and use
the remaining letters (in either lowercase or uppercase, but include any
underscores between
words).
The codes in the access column indicate if the given resource can be
set at creation time (C),
set by using <Function>XtSetValues</Function> (S),
retrieved by using <Function>XtGetValues</Function> (G), or is not applicable (N/A).
</Para>
<Para><!-- --><!-- @OSF_COPYRIGHT@--><!-- COPYRIGHT NOTICE--><!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.--><!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for--><!-- the full copyright text.--><!-- --><!-- HISTORY--><!-- --><!--no-op:  .in 0--></Para>
<InformalTable Frame="All" Remap="center" Orient="Port">
<TGroup Cols="5">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="1">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="2">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="3">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="4">
<ColSpec Rowsep="1" Align="Left" Colname="5">
<TBody>
<Row>
<Entry Align="Center" Nameend="5" Namest="1"><Literal>XmToggleButtonGadget Resource Set</Literal></Entry>
</Row>
<Row>
<Entry Rowsep="1"><Literal>Name</Literal></Entry>
<Entry Rowsep="1"><Literal>Class</Literal></Entry>
<Entry Rowsep="1"><Literal>Type</Literal></Entry>
<Entry Rowsep="1"><Literal>Default</Literal></Entry>
<Entry Rowsep="1"><Literal>Access</Literal></Entry>
</Row>
<Row>
<Entry>XmNarmCallback</Entry>
<Entry>XmCArmCallback</Entry>
<Entry>XtCallbackList</Entry>
<Entry>NULL</Entry>
<Entry>C</Entry>
</Row>
<Row>
<Entry>XmNdetailShadowThickness</Entry>
<Entry>XmCDetailShadowThickness</Entry>
<Entry>Dimension</Entry>
<Entry>2</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNdisarmCallback</Entry>
<Entry>XmCDisarmCallback</Entry>
<Entry>XtCallbackList</Entry>
<Entry>NULL</Entry>
<Entry>C</Entry>
</Row>
<Row>
<Entry>XmNfillOnSelect</Entry>
<Entry>XmCFillOnSelect</Entry>
<Entry>Boolean</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNindeterminatePixmap</Entry>
<Entry>XmCIndeterminatePixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>XmUNSPECIFIED_PIXMAP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNindicatorOn</Entry>
<Entry>XmCIndicatorOn</Entry>
<Entry>unsigned char</Entry>
<Entry>XmINDICATOR_FILL</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNindicatorSize</Entry>
<Entry>XmCIndicatorSize</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNindicatorType</Entry>
<Entry>XmCIndicatorType</Entry>
<Entry>unsigned char</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNselectColor</Entry>
<Entry>XmCSelectColor</Entry>
<Entry>Pixel</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNselectInsensitivePixmap</Entry>
<Entry>XmCSelectInsensitivePixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>XmUNSPECIFIED_PIXMAP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNselectPixmap</Entry>
<Entry>XmCSelectPixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>XmUNSPECIFIED_PIXMAP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNset</Entry>
<Entry>XmCSet</Entry>
<Entry>unsigned char</Entry>
<Entry>XmUNSET</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNspacing</Entry>
<Entry>XmCSpacing</Entry>
<Entry>Dimension</Entry>
<Entry>4</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNtoggleMode</Entry>
<Entry>XmCToggleMode</Entry>
<Entry>unsigned char</Entry>
<Entry>XmTOGGLE_BOOLEAN</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNunselectColor</Entry>
<Entry>XmCUnselectColor</Entry>
<Entry>Pixel</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNvalueChangedCallback</Entry>
<Entry>XmCValueChangedCallback</Entry>
<Entry>XtCallbackList</Entry>
<Entry>NULL</Entry>
<Entry>C</Entry>
</Row>
<Row>
<Entry>XmNvisibleWhenOff</Entry>
<Entry>XmCVisibleWhenOff</Entry>
<Entry>Boolean</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
</TBody>
</TGroup>
</InformalTable>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNarmCallback</SystemItem></Term>
<ListItem>
<Para>Specifies a list of callbacks
that is called when the ToggleButtonGadget is armed.
To arm this gadget, press the active mouse button
while the pointer is inside the ToggleButtonGadget.
For this callback, the reason is <SystemItem Class="Constant">XmCR_ARM</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNdetailShadowThickness</SystemItem></Term>
<ListItem>
<Para>Specifies the thickness of the indicator shadow. The default thickness
is 2 pixels.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNdisarmCallback</SystemItem></Term>
<ListItem>
<Para>Specifies a list of callbacks
called when ToggleButtonGadget is disarmed.
To disarm this gadget, press and release the active
mouse button while the pointer is inside the ToggleButtonGadget.
The gadget is also disarmed
when the user moves out of the gadget
and releases the mouse button when the pointer is outside the gadget.
For this callback, the reason is <SystemItem Class="Constant">XmCR_DISARM</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNfillOnSelect</SystemItem></Term>
<ListItem>
<Para>Fills the indicator with the color specified in
<SystemItem Class="Resource">XmNselectColor</SystemItem> and switches the top and bottom shadow
colors when set to True. If unset, fills the indicator with the
unselect color. If indeterminate, fills the indicator with
half select color and half unselect color.
Otherwise, it switches only the top
and bottom shadow colors. The default is set
True only if a box type of indicator
(such as a check box) is specified, or if the <SystemItem Class="Resource">XmNindicatorType</SystemItem> is a
<Literal>1-of</Literal> type and a toggle indicator is drawn.
If <SystemItem Class="Resource">XmNfillOnSelect</SystemItem> is True, <SystemItem Class="Resource">XmNset</SystemItem> is <SystemItem Class="Constant">XmSET</SystemItem>, and
<SystemItem Class="Resource">XmNindicatorOn</SystemItem> is <SystemItem Class="Constant">XmINDICATOR_NONE</SystemItem> the ToggleButtonGadget's
background is set to <SystemItem Class="Resource">XmNselectColor</SystemItem>. For the other
<SystemItem Class="Resource">XmNindicatorOn</SystemItem> values, only the indicator is filled with
<SystemItem Class="Resource">XmNselectColor</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNindeterminateInsensitivePixmap</SystemItem></Term>
<ListItem>
<Para>Specifies the pixmap to be displayed as the button face when
the Label <Symbol>XmNlableType</Symbol> resource is <SystemItem Class="Constant">XmPIXMAP</SystemItem>,
the ToggleButtonGadget <SystemItem Class="Resource">XmNset</SystemItem> resource is <SystemItem Class="Constant">XmINDETERMINATE</SystemItem>,
and the <Classname>Core</Classname> <SystemItem Class="Resource">XmNsensitive</SystemItem> resource is False.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNindeterminatePixmap</SystemItem></Term>
<ListItem>
<Para>Specifies the pixmap to be displayed as the button face when
the Label <Symbol>XmNlableType</Symbol> resource is <SystemItem Class="Constant">XmPIXMAP</SystemItem>,
the ToggleButtonGadget <SystemItem Class="Resource">XmNset</SystemItem> resource is <SystemItem Class="Constant">XmINDETERMINATE</SystemItem>,
and the <Classname>Core</Classname> <SystemItem Class="Resource">XmNsensitive</SystemItem> resource is True.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNindicatorOn</SystemItem></Term>
<ListItem>
<Para>Specifies that if a toggle indicator is to be drawn, it will be drawn
to one side of the toggle
text or pixmap, depending on the <SystemItem Class="Resource">XmNlayoutDirection</SystemItem> resource of
the widget. The default value is <SystemItem Class="Constant">XmINDICATOR_FILL</systemitem>.
Toggles accept the following values:
</Para>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Constant">XmINDICATOR_NONE</SystemItem></Term>
<ListItem>
<Para>No space is allocated
for the indicator, and it is not displayed. Any shadows around the
entire widget are switched when the toggle is selected or unselected.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmINDICATOR_BOX</SystemItem></Term>
<ListItem>
<Para>The toggle indicator is in the shape of a shadowed box.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmINDICATOR_FILL</SystemItem></Term>
<ListItem>
<Para>If the value of the
<literal>XmDisplay XmNenableToggleVisual</literal>
resource is
<literal>True</literal>
, the visuals are those of
<Symbol>XmINDICATOR_CHECK_BOX</Symbol>
; if
<literal>False</literal>
, the indicator visuals are those of
<Symbol>XmINDICATOR_BOX</Symbol>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmINDICATOR_CHECK</SystemItem></Term>
<ListItem>
<Para>The toggle indicator is in the shape of a checkmark in the
foreground color.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmINDICATOR_CHECK_BOX</SystemItem></Term>
<ListItem>
<Para>The toggle indicator is in the shape of a checkmark enclosed in a box.
This is the default if the <Literal>XmDisplay XmNenableToggleVisual</Literal>
resource is set.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmINDICATOR_CROSS_BOX</SystemItem></Term>
<ListItem>
<Para>The toggle indicator is in the shape of a cross enclosed in a box.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmINDICATOR_CROSS</SystemItem></Term>
<ListItem>
<Para>The toggle indicator is in the shape of a cross.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<Para>All ToggleButton checks and crosses should be drawn in the
foreground color.
</Para>
<Para>If this resource is not <SystemItem Class="Constant">XmINDICATOR_NONE</SystemItem>, it will control the
appearance of the toggle visual. If <SystemItem Class="Resource">XmNset</SystemItem> is
<SystemItem Class="Constant">XmINDETERMINATE</SystemItem> and <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is not
<SystemItem Class="Constant">XmINDICATOR_NONE</SystemItem>, this resource
shows a stippled flat box.
If <SystemItem Class="Resource">XmNset</SystemItem> is <SystemItem Class="Constant">XmINDETERMINATE</SystemItem>, <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is
<SystemItem Class="Constant">XmINDICATOR_NONE</SystemItem>, and <SystemItem Class="Resource">XmNtoggleMode</SystemItem> is
<SystemItem Class="Constant">XmTOGGLE_INDETERMINATE</SystemItem>, the label and the ToggleButton are stippled with
a combination of the <SystemItem Class="Resource">XmNselectColor</SystemItem> and
the <SystemItem Class="Resource">XmNunselectColor</SystemItem> color,
and the border is flat.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNindicatorSize</SystemItem></Term>
<ListItem>
<Para>Sets the size of the indicator.
If no value is specified, the size of the indicator is based on the size
of the label string or pixmap.
If the label string or pixmap changes, the size of the indicator is
recomputed based on the size of the label string or pixmap.
Once a
value has been specified for <SystemItem Class="Resource">XmNindicatorSize</SystemItem>, the
indicator has that size, regardless of the size of the label string or
pixmap, until a new value is specified.
The size of indicators inside menus may differ from those outside of menus.
Note that a change in this resource may also cause a change in the
values of the inherited resources <SystemItem Class="Resource">XmNmarginTop</SystemItem>,
<SystemItem Class="Resource">XmNmarginBottom</SystemItem>, and <SystemItem Class="Resource">XmNmarginLeft</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNindicatorType</SystemItem></Term>
<ListItem>
<Para>Specifies if the indicator is a <Literal>1-of</Literal> or
<Literal>N-of</Literal> indicator. For the <Literal>1-of</Literal> indicator, the
value can be <SystemItem Class="Constant">XmONE_OF_MANY</SystemItem>,
<SystemItem Class="Constant">XmONE_OF_MANY_ROUND</SystemItem>, or
<SystemItem Class="Constant">XmONE_OF_MANY_DIAMOND</SystemItem>.
For the <Literal>N-of</Literal> indicator,
the value is <SystemItem Class="Constant">XmN_OF_MANY</SystemItem>.
This value specifies only the visuals and does not enforce the
behavior. When the ToggleButton is in a radio box, the default is
<SystemItem Class="Constant">XmONE_OF_MANY</SystemItem>; otherwise,
the default is
<SystemItem Class="Constant">XmN_OF_MANY</SystemItem>. Legal values
are:
</Para>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Constant">XmONE_OF_MANY</SystemItem></Term>
<ListItem>
<Para>When the Display <SystemItem Class="Resource">XmNenableToggleVisual</systemitem>
resource is set,
indicators are drawn with the same appearance as
<SystemItem Class="Constant">XmONE_OF_MANY_ROUND</systemitem>;
otherwise, they appear the same as
<SystemItem Class="Constant">XmONE_OF_MANY_DIAMOND</systemitem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmN_OF_MANY</SystemItem></Term>
<ListItem>
<Para>The indicators are drawn as specified by the
<SystemItem Class="Resource">XmNindicatorOn</systemitem>
resource.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmONE_OF_MANY_ROUND</SystemItem></Term>
<ListItem>
<Para>A shadowed circle.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmONE_OF_MANY_DIAMOND</SystemItem></Term>
<ListItem>
<Para>A shadowed diamond.
</Para>
</ListItem>
</VarListEntry>
</variablelist>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNselectColor</SystemItem></Term>
<ListItem>
<Para>Allows the application to specify what color fills
the center of the square, diamond-shaped, or round indicator when it is set.
If this color is the same as either the top or the bottom shadow color of the
indicator, a one-pixel-wide margin is left between the shadows and the fill;
otherwise, it is filled completely.
The results of this resource depend on the value of the Display
resource <SystemItem Class="Resource">XmNenableToggleColor</SystemItem>. A value of True causes the fill
color to use the <SystemItem Class="Constant">XmHIGHLIGHT_COLOR</SystemItem> color by default. A value of False
causes the fill
color to use the background color.
This resource's default for a color display is a color between the background
and the bottom shadow color. For a monochrome display, the default is set to
the foreground color. To set the background of the button to
<SystemItem Class="Resource">XmNselectColor</SystemItem> when <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is <SystemItem Class="Constant">XmINDICATOR_NONE</SystemItem>,
the value of
<SystemItem Class="Resource">XmNfillOnSelect</SystemItem> must be explicitly set to True.
</Para>
<Para>This resource can take the following values:
</Para>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Constant">XmDEFAULT_SELECT_COLOR</SystemItem></Term>
<ListItem>
<Para>Is the same as the current dynamic default, which is a color between
the background and the bottom shadow color.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmREVERSED_GROUND_COLORS</SystemItem></Term>
<ListItem>
<Para>Forces the select color to the
foreground color and causes the default color of any text rendered over the
select color to be in the background color.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmHIGHLIGHT_COLOR</SystemItem></Term>
<ListItem>
<Para>Forces the fill color to use the highlight color.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<!--.zA "feature, 5750, R2.0, fix XmNindicatorOn ref"
.LI "&bsol;*LXmNselectColor&bsol;*O"
Allows the application to specify what color fills the center of the
square, diamond-shaped, or round indicator when it is set.  If this color is
the same as either the top or the bottom shadow color of the indicator,
a one-pixel-wide margin is left between the shadows and the fill;  otherwise,
it is filled completely.  This resource's default for a color display is
a color between the background and the bottom shadow color.  For a
monochrome display, the default is set to the foreground color.  To set
the background of the button to &bsol;*LXmNselectColor&bsol;*O when
&bsol;*LXmNindicatorOn&bsol;*O is &bsol;*LXmINDICATOR_NONE&bsol;*O, the value of
&bsol;*LXmNfillOnSelect&bsol;*O must
be explicitly set to True.
.zZ "feature, 5750, R2.0, fix XmNindicatorOn ref"
-->
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNselectInsensitivePixmap</SystemItem></Term>
<ListItem>
<Para>Specifies a pixmap used as the button face when the ToggleButtonGadget
is selected,
the button is insensitive, and the LabelGadget resource <SystemItem Class="Resource">XmNlabelType</SystemItem>
is <SystemItem Class="Constant">XmPIXMAP</SystemItem>. If the ToggleButtonGadget
is unselected and the button is insensitive, the pixmap in
<SystemItem Class="Resource">XmNlabelInsensitivePixmap</SystemItem> is used as the button face.
If no value is specified for <SystemItem Class="Resource">XmNlabelInsensitivePixmap</SystemItem>, that
resource is set to the value specified for
<SystemItem Class="Resource">XmNselectInsensitivePixmap</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNselectPixmap</SystemItem></Term>
<ListItem>
<Para>Specifies the pixmap to be used as the button
face if <SystemItem Class="Resource">XmNlabelType</SystemItem> is <SystemItem Class="Constant">XmPIXMAP</SystemItem> and
the ToggleButtonGadget is selected.
When the ToggleButtonGadget is unselected,
the pixmap specified in LabelGadget's <SystemItem Class="Resource">XmNlabelPixmap</SystemItem> is used.
If no value is specified for <SystemItem Class="Resource">XmNlabelPixmap</SystemItem>, that resource is set
to the value specified for <SystemItem Class="Resource">XmNselectPixmap</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNset</SystemItem></Term>
<ListItem>
<Para>Represents the state of the ToggleButton. A value of <SystemItem Class="Constant">XmUNSET</SystemItem> indicates
that the ToggleButton is not set. A value of <SystemItem Class="Constant">XmSET</SystemItem> indicates that
the ToggleButton is set. A value of <SystemItem Class="Constant">XmINDETERMINATE</SystemItem> indicates that the
ToggleButton is in an indeterminate state (neither set nor unset).
The ToggleButton states cycle through in the order of <SystemItem Class="Constant">XmSET</SystemItem>,
<SystemItem Class="Constant">XmINDETERMINATE</SystemItem> (if <SystemItem Class="Resource">XmNtoggleMode</SystemItem> is set to
<SystemItem Class="Constant">XmTOGGLE_INDETERMINATE</SystemItem>), and <SystemItem Class="Constant">XmUNSET</SystemItem>, and then
back around to <SystemItem Class="Constant">XmSET</SystemItem>. If <SystemItem Class="Resource">XmNtoggleMode</SystemItem> is
set to <SystemItem Class="Constant">XmTOGGLE_BOOLEAN</SystemItem>, then the ToggleButton states cycle
through in the order of <SystemItem Class="Constant">XmSET</SystemItem>, then <SystemItem Class="Constant">XmUNSET</SystemItem>, and then
back around to <SystemItem Class="Constant">XmSET</SystemItem>.
Setting this resource sets the state of the
ToggleButton.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNspacing</SystemItem></Term>
<ListItem>
<Para>Specifies the amount of spacing between the toggle indicator and the
toggle label (text or pixmap).
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNtoggleMode</SystemItem></Term>
<ListItem>
<Para>Specifies the mode of the ToggleButtonGadget as either
<SystemItem Class="Constant">XmTOGGLE_BOOLEAN</SystemItem> or <SystemItem Class="Constant">XmTOGGLE_INDETERMINATE</SystemItem>. The
<SystemItem Class="Constant">XmTOGGLE_INDETERMINATE</SystemItem> value allows the <SystemItem Class="Resource">XmNset</SystemItem> resource to
be able to accept the values <SystemItem Class="Constant">XmINDETERMINATE</SystemItem>, <SystemItem Class="Constant">XmSET</SystemItem>, and
<SystemItem Class="Constant">XmUNSET</SystemItem>. The <SystemItem Class="Resource">XmNtoggleMode</SystemItem> resource is forced to
<SystemItem Class="Constant">XmTOGGLE_BOOLEAN</SystemItem> if the toggle is in an <Classname>XmRowColumn</Classname> widget
whose radio behavior is <SystemItem Class="Constant">XmONE_OF_MANY</SystemItem>. In
<SystemItem Class="Constant">XmTOGGLE_BOOLEAN</SystemItem> mode, the <SystemItem Class="Resource">XmNset</SystemItem> resource can only accept
<SystemItem Class="Constant">XmSET</SystemItem> and <SystemItem Class="Constant">XmUNSET</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNunselectColor</SystemItem></Term>
<ListItem>
<Para>Allows the application to specify what color fills
the center of the square, diamond-shaped, or round indicator when it
is not set.
If this color is the same as either the top or the bottom shadow color of the
indicator, a one-pixel-wide margin is left between the shadows and the fill;
otherwise, it is filled completely.
This resource's default for a color display is <SystemItem Class="Resource">XmNbackground</SystemItem>.
For a monochrome display, the default is set to
the background color. To set the background of the button to
<SystemItem Class="Resource">XmNunselectColor</SystemItem> when <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is
<SystemItem Class="Constant">XmINDICATOR_NONE</SystemItem>, the value of
<SystemItem Class="Resource">XmNfillOnSelect</SystemItem> must be explicitly set to True. This resource
acts like the <SystemItem Class="Resource">XmNselectColor</SystemItem> resource, but for the case when
<SystemItem Class="Resource">XmNset</SystemItem> is <SystemItem Class="Constant">XmUNSET</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNvalueChangedCallback</SystemItem></Term>
<ListItem>
<Para>Specifies a list of callbacks
called when the ToggleButtonGadget value
is changed. To change the value,
press and release the active mouse button while the pointer
is inside the ToggleButtonGadget. This action
also causes the gadget to be disarmed.
For this callback, the reason is <SystemItem Class="Constant">XmCR_VALUE_CHANGED</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNvisibleWhenOff</SystemItem></Term>
<ListItem>
<Para>Indicates that the toggle indicator is visible in the unselected state when
the Boolean value is True.
When the ToggleButtonGadget is in a menu, the default value is False.
When the ToggleButtonGadget is in a RadioBox, the default value is True.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect2>
<RefSect2>
<Title>Inherited Resources</Title>
<Para>ToggleButtonGadget inherits behavior and resources from the
superclasses described in the following tables.
For a complete description of each resource, refer to the
reference page for that superclass.
</Para>
<Para><!-- --><!-- @OSF_COPYRIGHT@--><!-- COPYRIGHT NOTICE--><!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.--><!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for--><!-- the full copyright text.--><!-- --><!-- HISTORY--><!-- --><!--no-op:  .in 0--></Para>
<InformalTable Frame="All" Remap="center" Orient="Port">
<TGroup Cols="5">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="1">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="2">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="3">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="4">
<ColSpec Rowsep="1" Align="Left" Colname="5">
<TBody>
<Row>
<Entry Align="Center" Nameend="5" Namest="1"><Literal>XmLabelGadget Resource Set</Literal></Entry>
</Row>
<Row>
<Entry Rowsep="1"><Literal>Name</Literal></Entry>
<Entry Rowsep="1"><Literal>Class</Literal></Entry>
<Entry Rowsep="1"><Literal>Type</Literal></Entry>
<Entry Rowsep="1"><Literal>Default</Literal></Entry>
<Entry Rowsep="1"><Literal>Access</Literal></Entry>
</Row>
<Row>
<Entry>XmNaccelerator</Entry>
<Entry>XmCAccelerator</Entry>
<Entry>String</Entry>
<Entry>NULL</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNacceleratorText</Entry>
<Entry>XmCAcceleratorText</Entry>
<Entry>XmString</Entry>
<Entry>NULL</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNalignment</Entry>
<Entry>XmCAlignment</Entry>
<Entry>unsigned char</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNfontList</Entry>
<Entry>XmCFontList</Entry>
<Entry>XmFontList</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNlabelInsensitivePixmap</Entry>
<Entry>XmCLabelInsensitivePixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>XmUNSPECIFIED_PIXMAP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNlabelPixmap</Entry>
<Entry>XmCLabelPixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>XmUNSPECIFIED_PIXMAP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNlabelString</Entry>
<Entry>XmCXmString</Entry>
<Entry>XmString</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNlabelType</Entry>
<Entry>XmCLabelType</Entry>
<Entry>unsigned char</Entry>
<Entry>XmSTRING</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmarginBottom</Entry>
<Entry>XmCMarginBottom</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmarginHeight</Entry>
<Entry>XmCMarginHeight</Entry>
<Entry>Dimension</Entry>
<Entry>2</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmarginLeft</Entry>
<Entry>XmCMarginLeft</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmarginRight</Entry>
<Entry>XmCMarginRight</Entry>
<Entry>Dimension</Entry>
<Entry>0</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmarginTop</Entry>
<Entry>XmCMarginTop</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmarginWidth</Entry>
<Entry>XmCMarginWidth</Entry>
<Entry>Dimension</Entry>
<Entry>2</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmnemonic</Entry>
<Entry>XmCMnemonic</Entry>
<Entry>KeySym</Entry>
<Entry>NULL</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmnemonicCharSet</Entry>
<Entry>XmCMnemonicCharSet</Entry>
<Entry>String</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNrecomputeSize</Entry>
<Entry>XmCRecomputeSize</Entry>
<Entry>Boolean</Entry>
<Entry>True</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNrenderTable</Entry>
<Entry>XmCRenderTable</Entry>
<Entry>XmRenderTable</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNstringDirection</Entry>
<Entry>XmCStringDirection</Entry>
<Entry>XmStringDirection</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
</TBody>
</TGroup>
</InformalTable>
<Para><!-- --><!-- @OSF_COPYRIGHT@--><!-- COPYRIGHT NOTICE--><!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.--><!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for--><!-- the full copyright text.--><!-- --><!-- HISTORY--><!-- --></Para>
<InformalTable Frame="All" Remap="center" Orient="Port">
<TGroup Cols="5">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="1">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="2">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="3">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="4">
<ColSpec Rowsep="1" Align="Left" Colname="5">
<TBody>
<Row>
<Entry Align="Center" Nameend="5" Namest="1"><Literal>XmGadget Resource Set</Literal></Entry>
</Row>
<Row>
<Entry Rowsep="1"><Literal>Name</Literal></Entry>
<Entry Rowsep="1"><Literal>Class</Literal></Entry>
<Entry Rowsep="1"><Literal>Type</Literal></Entry>
<Entry Rowsep="1"><Literal>Default</Literal></Entry>
<Entry Rowsep="1"><Literal>Access</Literal></Entry>
</Row>
<Row>
<Entry>XmNbackground</Entry>
<Entry>XmCBackground</Entry>
<Entry>Pixel</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNbackgroundPixmap</Entry>
<Entry>XmCPixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>XmUNSPECIFIED_PIXMAP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNbottomShadowColor</Entry>
<Entry>XmCBottomShadowColor</Entry>
<Entry>Pixel</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNbottomShadowPixmap</Entry>
<Entry>XmCBottomShadowPixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNhelpCallback</Entry>
<Entry>XmCCallback</Entry>
<Entry>XtCallbackList</Entry>
<Entry>NULL</Entry>
<Entry>C</Entry>
</Row>
<Row>
<Entry>XmNforeground</Entry>
<Entry>XmCForeground</Entry>
<Entry>Pixel</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNhighlightColor</Entry>
<Entry>XmCHighlightColor</Entry>
<Entry>Pixel</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNhighlightOnEnter</Entry>
<Entry>XmCHighlightOnEnter</Entry>
<Entry>Boolean</Entry>
<Entry>False</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNhighlightPixmap</Entry>
<Entry>XmCHighlightPixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNhighlightThickness</Entry>
<Entry>XmCHighlightThickness</Entry>
<Entry>Dimension</Entry>
<Entry>2</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNlayoutDirection</Entry>
<Entry>XmNCLayoutDirection</Entry>
<Entry>XmDirection</Entry>
<Entry>dynamic</Entry>
<Entry>CG</Entry>
</Row>
<Row>
<Entry>XmNnavigationType</Entry>
<Entry>XmCNavigationType</Entry>
<Entry>XmNavigationType</Entry>
<Entry>XmNONE</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNshadowThickness</Entry>
<Entry>XmCShadowThickness</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNtopShadowColor</Entry>
<Entry>XmCTopShadowColor</Entry>
<Entry>Pixel</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNtopShadowPixmap</Entry>
<Entry>XmCTopShadowPixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNtraversalOn</Entry>
<Entry>XmCTraversalOn</Entry>
<Entry>Boolean</Entry>
<Entry>True</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNunitType</Entry>
<Entry>XmCUnitType</Entry>
<Entry>unsigned char</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNuserData</Entry>
<Entry>XmCUserData</Entry>
<Entry>XtPointer</Entry>
<Entry>NULL</Entry>
<Entry>CSG</Entry>
</Row>
</TBody>
</TGroup>
</InformalTable>
<Para><!-- --><!-- @OSF_COPYRIGHT@--><!-- COPYRIGHT NOTICE--><!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.--><!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for--><!-- the full copyright text.--><!-- --><!-- HISTORY--><!-- --></Para>
<InformalTable Frame="All" Remap="center" Orient="Port">
<TGroup Cols="5">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="1">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="2">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="3">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="4">
<ColSpec Rowsep="1" Align="Left" Colname="5">
<TBody>
<Row>
<Entry Align="Center" Nameend="5" Namest="1"><Literal>RectObj Resource Set</Literal></Entry>
</Row>
<Row>
<Entry Rowsep="1"><Literal>Name</Literal></Entry>
<Entry Rowsep="1"><Literal>Class</Literal></Entry>
<Entry Rowsep="1"><Literal>Type</Literal></Entry>
<Entry Rowsep="1"><Literal>Default</Literal></Entry>
<Entry Rowsep="1"><Literal>Access</Literal></Entry>
</Row>
<Row>
<Entry>XmNancestorSensitive</Entry>
<Entry>XmCSensitive</Entry>
<Entry>Boolean</Entry>
<Entry>dynamic</Entry>
<Entry>G</Entry>
</Row>
<Row>
<Entry>XmNborderWidth</Entry>
<Entry>XmCBorderWidth</Entry>
<Entry>Dimension</Entry>
<Entry>0</Entry>
<Entry>N/A</Entry>
</Row>
<Row>
<Entry>XmNheight</Entry>
<Entry>XmCHeight</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNsensitive</Entry>
<Entry>XmCSensitive</Entry>
<Entry>Boolean</Entry>
<Entry>True</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNwidth</Entry>
<Entry>XmCWidth</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNx</Entry>
<Entry>XmCPosition</Entry>
<Entry>Position</Entry>
<Entry>0</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNy</Entry>
<Entry>XmCPosition</Entry>
<Entry>Position</Entry>
<Entry>0</Entry>
<Entry>CSG</Entry>
</Row>
</TBody>
</TGroup>
</InformalTable>
<Para><!-- --><!-- @OSF_COPYRIGHT@--><!-- COPYRIGHT NOTICE--><!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.--><!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for--><!-- the full copyright text.--><!-- --><!-- HISTORY--><!-- --></Para>
<InformalTable Frame="All" Remap="center" Orient="Port">
<TGroup Cols="5">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="1">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="2">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="3">
<ColSpec Rowsep="1" Colsep="1" Align="Left" Colname="4">
<ColSpec Rowsep="1" Align="Left" Colname="5">
<TBody>
<Row>
<Entry Align="Center" Nameend="5" Namest="1"><Literal>Object Resource Set</Literal></Entry>
</Row>
<Row>
<Entry Rowsep="1"><Literal>Name</Literal></Entry>
<Entry Rowsep="1"><Literal>Class</Literal></Entry>
<Entry Rowsep="1"><Literal>Type</Literal></Entry>
<Entry Rowsep="1"><Literal>Default</Literal></Entry>
<Entry Rowsep="1"><Literal>Access</Literal></Entry>
</Row>
<Row>
<Entry>XmNdestroyCallback</Entry>
<Entry>XmCCallback</Entry>
<Entry>XtCallbackList</Entry>
<Entry>NULL</Entry>
<Entry>C</Entry>
</Row>
</TBody>
</TGroup>
</InformalTable>
</RefSect2>
<RefSect2>
<Title>Callback Information</Title>
<Para>A pointer to the following structure is passed to each callback:
</Para>
<Synopsis>typedef struct
{
        int <Symbol Role="Variable">reason</Symbol>;
        XEvent <Symbol Role="Variable">* event</Symbol>;
        int <Symbol Role="Variable">set</Symbol>;
} XmToggleButtonCallbackStruct;</Synopsis>
<!--no-op:  .fi-->
<VariableList>
<VarListEntry>
<Term><Symbol Role="Variable">reason</Symbol></Term>
<ListItem>
<Para>Indicates why the callback was invoked
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">event</Symbol></Term>
<ListItem>
<Para>Points to the <Symbol>XEvent</Symbol> that triggered the callback
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">set</Symbol></Term>
<ListItem>
<Para>Reflects the ToggleButtonGadget's state, either
<SystemItem Class="Constant">XmSET</SystemItem> (selected), <SystemItem Class="Constant">XmUNSET</SystemItem> (unselected), or
<SystemItem Class="Constant">XmINDETERMINATE</SystemItem> (neither).
Note that the reported state is the state that the ToggleButtonGadget
is in after the <Symbol Role="Variable">event</Symbol> has been processed. For example,
suppose that a user clicks on a ToggleButtonGadget to change it from
the unselected state to the selected state. In this case,
ToggleButtonGadget changes the value of <Symbol Role="Variable">set</Symbol> from <SystemItem Class="Constant">XmUNSET</SystemItem>
to <SystemItem Class="Constant">XmSET</SystemItem> prior to calling the callback.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<!-- -->
<!-- @OSF_COPYRIGHT@-->
<!-- COPYRIGHT NOTICE-->
<!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.-->
<!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for-->
<!-- the full copyright text.-->
<!-- -->
<!-- HISTORY-->
<!-- -->
<!-- Action Table for XmToggleButtonGadget -->
</RefSect2>
<RefSect2>
<Title>Behavior</Title>
<Para><Classname>XmToggleButtonGadget</Classname> includes behavior from <Classname>XmGadget</Classname>.
<Classname>XmToggleButtonGadget</Classname> includes menu traversal behavior from <Classname>XmLabelGadget</Classname>.
Additional <Classname>XmToggleButtonGadget</Classname> behavior is described in the
following list:
</Para>
<VariableList>
<VarListEntry>
<Term><KeySym>Btn2Down</KeySym>:</Term>
<ListItem>
<Para>Drags the contents of a ToggleButtonGadget label, identified when
<KeySym>Btn2</KeySym> is pressed.
This action is undefined for ToggleButtonGadgets used in a menu system.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Btn1Down</KeySym>:</Term>
<ListItem>
<Para>In a menu, this action unposts any menus posted by the ToggleButtonGadget's
parent menu,
disables keyboard traversal for the menu, and enables mouse traversal
for the menu.
It draws the shadow in the armed state
and, unless the button is already armed, calls the <SystemItem Class="Resource">XmNarmCallback</SystemItem>
callbacks.
</Para>
<Para>Outside a menu, if the button was previously unset, this action does the
following:
if <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is True, it draws the indicator shadow so that
the indicator looks pressed; if <SystemItem Class="Resource">XmNfillOnSelect</SystemItem> is True, it fills
the indicator with the color specified by <SystemItem Class="Resource">XmNselectColor</SystemItem>.
If <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is False, it draws the button shadow so that the
button looks pressed.
If <SystemItem Class="Resource">XmNlabelType</SystemItem> is <SystemItem Class="Constant">XmPIXMAP</SystemItem>, the <SystemItem Class="Resource">XmNselectPixmap</SystemItem> is
used as the button face.
This resource calls the <SystemItem Class="Resource">XmNarmCallback</SystemItem> callbacks.
</Para>
<Para>Outside a menu, if the button was previously set, this action does the
following:
if both <SystemItem Class="Resource">XmNindicatorOn</SystemItem> and <SystemItem Class="Resource">XmNvisibleWhenOff</SystemItem> are True, it
draws the indicator shadow so that the indicator looks raised; if
<SystemItem Class="Resource">XmNfillOnSelect</SystemItem> is True, it fills the indicator with the
background color.
If <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is False, it draws the button shadow so that the
button looks raised.
If <SystemItem Class="Resource">XmNlabelType</SystemItem> is <SystemItem Class="Constant">XmPIXMAP</SystemItem>, the <SystemItem Class="Resource">XmNlabelPixmap</SystemItem> is
used as the button face.
This resource calls the <SystemItem Class="Resource">XmNarmCallback</SystemItem> callbacks.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Btn1Up</KeySym>:</Term>
<ListItem>
<Para>In a menu, this action
unposts all menus in the menu hierarchy.
If the ToggleButtonGadget was previously set, this action
unsets it; if the ToggleButtonGadget
was previously unset, this action sets it.
It calls the <SystemItem Class="Resource">XmNvalueChangedCallback</SystemItem> callbacks and then the
<SystemItem Class="Resource">XmNdisarmCallback</SystemItem> callbacks.
</Para>
<Para>If the button is outside a menu and the pointer is within the button,
this action does the following:
if the button was previously unset, sets it; if the button was
previously set, unsets it.
This action calls the <SystemItem Class="Resource">XmNvalueChangedCallback</SystemItem> callbacks.
</Para>
<Para>If the button is outside a menu, this action calls the <SystemItem Class="Resource">XmNdisarmCallback</SystemItem>
callbacks.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Key</KeySym><KeySym>osfHelp</KeySym>:</Term>
<ListItem>
<Para>In a Pulldown or Popup MenuPane, unposts all menus in the menu hierarchy
and,
when the shell's keyboard focus policy is
<SystemItem Class="Constant">XmEXPLICIT</SystemItem>,
restores keyboard focus to the widget that had the focus before
the menu system was entered.
Calls the callbacks for <SystemItem Class="Resource">XmNhelpCallback</SystemItem> if any exist.
If there are no help callbacks for this widget, this action calls the
help callbacks for the nearest ancestor that has them.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Key</KeySym><KeySym>osfActivate</KeySym>:</Term>
<ListItem>
<Para>In a menu, this action unposts all menus in the menu hierarchy.
Unless the button is already armed, this action calls the <SystemItem Class="Resource">XmNarmCallback</SystemItem>
callbacks; and calls the <SystemItem Class="Resource">XmNvalueChangedCallback</SystemItem> and
<SystemItem Class="Resource">XmNdisarmCallback</SystemItem> callbacks. Outside a menu,
if the parent is a manager, this action passes the event to the parent.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Key</KeySym><KeySym>osfSelect</KeySym>:</Term>
<ListItem>
<Para>If the ToggleButtonGadget was previously set, this action unsets it; if the
ToggleButtonGadget was previously unset, this action sets it.
</Para>
<Para>In a menu, this action
unposts all menus in the menu hierarchy.
Unless the button is already armed,
this action calls the <SystemItem Class="Resource">XmNarmCallback</SystemItem>,
the <SystemItem Class="Resource">XmNvalueChangedCallback</SystemItem>, and
<SystemItem Class="Resource">XmNdisarmCallback</SystemItem> callbacks.
</Para>
<Para>Outside a menu, if the button was previously unset, this action does the
following:
If <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is True, it draws the indicator shadow so that
the indicator looks pressed; if <SystemItem Class="Resource">XmNfillOnSelect</SystemItem> is True, it fills
the indicator with the color specified by <SystemItem Class="Resource">XmNselectColor</SystemItem>.
If <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is False, it draws the button shadow so that the
button looks pressed.
If <SystemItem Class="Resource">XmNlabelType</SystemItem>
is <SystemItem Class="Constant">XmPIXMAP</SystemItem>, the <SystemItem Class="Resource">XmNselectPixmap</SystemItem> is
used as the button face.
This action calls the <SystemItem Class="Resource">XmNarmCallback</SystemItem>, <SystemItem Class="Resource">XmNvalueChangedCallback</SystemItem>,
<SystemItem Class="Resource">XmNdisarmCallback</SystemItem> callbacks.
</Para>
<Para>Outside a menu, if the button was previously set, this action does the
following:
If both <SystemItem Class="Resource">XmNindicatorOn</SystemItem> and <SystemItem Class="Resource">XmNvisibleWhenOff</SystemItem> are True, it
draws the indicator shadow so that the indicator looks raised; if
<SystemItem Class="Resource">XmNfillOnSelect</SystemItem> is True, it fills the indicator with the
background color.
If <SystemItem Class="Resource">XmNindicatorOn</SystemItem> is False, it draws the button shadow so that the
button looks raised.
If <SystemItem Class="Resource">XmNlabelType</SystemItem> is <SystemItem Class="Constant">XmPIXMAP</SystemItem>, the <SystemItem Class="Resource">XmNlabelPixmap</SystemItem> is
used as the button face.
Calls the <SystemItem Class="Resource">XmNarmCallback</SystemItem>, <SystemItem Class="Resource">XmNvalueChangedCallback</SystemItem>, and
<SystemItem Class="Resource">XmNdisarmCallback</SystemItem> callbacks.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Key</KeySym><KeySym>osfCancel</KeySym>:</Term>
<ListItem>
<Para>In a toplevel Pulldown MenuPane from a MenuBar, unposts the menu,
disarms the MenuBar CascadeButton and the MenuBar, and,
when the shell's keyboard focus policy is
<SystemItem Class="Constant">XmEXPLICIT</SystemItem>,
restores keyboard
focus to the widget that had the focus before the MenuBar was
entered.
In other Pulldown MenuPanes, this action unposts the menu.
Outside a menu, if the parent is a manager, this action passes the event to the
parent.
</Para>
<Para>In a Popup MenuPane, this action unposts the menu and restores keyboard focus to the
widget from which the menu was posted.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Enter</KeySym>:</Term>
<ListItem>
<Para>In a menu, if keyboard traversal is enabled, this action does nothing.
Otherwise, it draws the shadow in the armed state and calls the
<SystemItem Class="Resource">XmNarmCallback</SystemItem> callbacks.
</Para>
<Para>If the ToggleButtonGadget is not in a menu and the cursor leaves and then
reenters the ToggleButtonGadget while the button is pressed, this
action restores the button's armed appearance.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Leave</KeySym>:</Term>
<ListItem>
<Para>In a menu, if keyboard traversal is enabled, this action does nothing.
Otherwise, it draws the shadow in the unarmed state and calls the
<SystemItem Class="Resource">XmNdisarmCallback</SystemItem> callbacks.
</Para>
<Para>If the ToggleButtonGadget is not in a menu and the cursor leaves the
ToggleButtonGadget while the button is pressed, this action restores
the button's unarmed appearance.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect2>
<RefSect2>
<Title>Virtual Bindings</Title>
<Para>The bindings for virtual keys are vendor specific.
For information about bindings for virtual buttons and keys, see &cdeman.VirtualBindings;.
</Para>
</RefSect2>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.Object;,
&cdeman.RectObj;,
&cdeman.XmCreateRadioBox;,
&cdeman.XmCreateToggleButtonGadget;,
&cdeman.XmGadget;,
&cdeman.XmLabelGadget;,
&cdeman.XmRowColumn;,
&cdeman.XmToggleButtonGadgetGetState;, and
&cdeman.XmToggleButtonGadgetSetState;.
</Para>
</RefSect1>
</RefEntry>
