<!-- $XConsortium: SSpinBox.sgm /main/10 1996/09/25 16:01:39 cdedoc $ -->
<!-- (c) Copyright 1996 Digital Equipment Corporation. -->
<!-- (c) Copyright 1996 Hewlett-Packard Company. -->
<!-- (c) Copyright 1996 International Business Machines Corp. -->
<!-- (c) Copyright 1996 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1996 Novell, Inc. -->
<!-- (c) Copyright 1996 FUJITSU LIMITED. -->
<!-- (c) Copyright 1996 Hitachi. -->
<RefEntry Id="CDEMOT.XmSimpleSpinBox">
<refmeta>
<refentrytitle>XmSimpleSpinBox</refentrytitle>
<manvolnum>library call</manvolnum></refmeta><refnamediv><refname><classname>XmSimpleSpinBox</classname></refname><refpurpose>a simple SpinBox widget class</refpurpose>
</refnamediv><!-- CDE Common Source Format, Version 1.0.0--><!-- (c) Copyright
1993, 1994, 1995 Hewlett-Packard Company--><!-- (c) Copyright 1993, 1994,
1995 International Business Machines Corp.--><!-- (c) Copyright 1993, 1994,
1995 Sun Microsystems, Inc.--><!-- (c) Copyright 1993, 1994, 1995 Novell,
Inc.--><!-- (c) Copyright 1993, 1994, 1995 Interleaf, Inc.--><refsynopsisdiv>
<synopsis>#include &lt;Xm/SSpinB.h></synopsis>
</refsynopsisdiv><refsect1>
<title>DESCRIPTION</title>
<para>The XmSimpleSpinBox widget is a user interface control to increment and decrement
an arbitrary TextField. For example, it can be used to cycle through the months
of the year or days of the month.</para>
<para>Widget subclassing is not supported for the XmSimpleSpinBox widget class.
</para>
<refsect2>
<title>Classes</title>
<para>The XmSimpleSpinBox widget inherits behavior and resources from the <classname>Core</classname>, <classname>Composite</classname> and <classname>XmManager</classname> classes.</para>
<para><?Pub Caret1>The class pointer is <Symbol>XmSimpleSpinBoxWidgetClass</Symbol>.
</para>
<para>The class name is <structname role="typedef">XmSimpleSpinBoxWidget</structname>.
</para>
</refsect2>
<refsect2>
<title>New Resources</title>
<para>The following table defines a set of widget resources used by the application
to specify data. The application 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, the application
must remove the <Symbol>XmN</Symbol> or <Symbol>XmC</Symbol> prefix and
use the remaining letters. To specify one of the defined values for a resource
in a <Filename>.Xdefaults</Filename> file, the application must remove the <literal>Xm</literal> prefix and use the remaining letters (in either lower case or
upper case, but including 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>
<informaltable>
<tgroup cols="5" colsep="0" rowsep="0">
<?PubTbl tgroup dispwid="8.51in">
<colspec align="left" colname="col1" colwidth="225*">
<colspec align="left" colname="col2" colwidth="186*">
<colspec align="left" colwidth="86*">
<colspec align="left" colwidth="107*">
<colspec align="left" colwidth="99*">
<spanspec nameend="col2" namest="col1" spanname="1to2">
<tbody>
<row>
<entry align="left" spanname="1to2" valign="top"><literal>XmSimpleSpinBox Resource
Set</literal></entry></row>
<row>
<entry align="left" valign="top"><literal>Name</literal></entry>
<entry align="left" valign="top"><literal>Class</literal></entry>
<entry align="left" valign="top"><literal>Type</literal></entry>
<entry align="left" valign="top"><literal>Default</literal></entry>
<entry align="left" valign="top"><literal>Access</literal></entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNarrowLayout</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCArrowLayout</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">unsigned char</StructName></entry>
<entry align="left" valign="top">XmARROWS_END</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNarrowSensitivity</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCArrowSensitivity</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">unsigned char</StructName></entry>
<entry align="left" valign="top">XmARROWS-_SENSITIVE</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNcolumns</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCColumn</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">short</StructName></entry>
<entry align="left" valign="top">20</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNdecimalPoints</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCDecimalPoints</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">short</StructName></entry>
<entry align="left" valign="top">0</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNeditable</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCEditable</systemitem></entry>
<entry align="left" valign="top"><literal>Boolean</literal></entry>
<entry align="left" valign="top">True</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNincrementValue</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCIncrementValue</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">int</StructName></entry>
<entry align="left" valign="top">1</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNinitialDelay</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCInitialDelay</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">unsigned int</StructName></entry>
<entry align="left" valign="top">250</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNmaximumValue</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCMaximumValue</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">int</StructName></entry>
<entry align="left" valign="top">10</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNminimumValue</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCMinimumValue</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">int</StructName></entry>
<entry align="left" valign="top">0</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNmodifyVerifyCallback</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCCallback</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XtCallbackList</structname></entry>
<entry align="left" valign="top">NULL</entry>
<entry align="left" valign="top">C</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNnumValues</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCNumValues</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">int</StructName></entry>
<entry align="left" valign="top">0</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNposition</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCPosition</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">int</StructName></entry>
<entry align="left" valign="top">0</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNrepeatDelay</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCRepeatDelay</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">unsigned int</StructName></entry>
<entry align="left" valign="top">200</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNspinBoxChildType</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCSpinBoxChildType</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">unsigned char</StructName></entry>
<entry align="left" valign="top">XmSTRING</entry>
<entry align="left" valign="top">CG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNtextField</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCTextField</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Widget</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">G</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNvalueChangedCallback</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCCallback</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XtCallbackList</structname></entry>
<entry align="left" valign="top">NULL</entry>
<entry align="left" valign="top">C</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNvalues</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCValues</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XmStringTable</structname></entry>
<entry align="left" valign="top">NULL</entry>
<entry align="left" valign="top">CSG</entry></row></tbody></tgroup></informaltable>
<variablelist>
<varlistentry><term><systemitem class="Resource">XmNarrowLayout</systemitem></term>
<listitem>
<para>Specifies the style and position of the SpinBox arrows. The following
values are supported:</para>
<variablelist>
<varlistentry><term>XmARROWS_FLAT_BEGINNING</term>
<listitem>
<para>The arrows are placed side by side to the right of the TextField.</para>
</listitem>
</varlistentry>
<varlistentry><term>XmARROWS_FLAT_END</term>
<listitem>
<para>The arrows are placed side by side to the left of the TextField.</para>
</listitem>
</varlistentry>
<varlistentry><term>XmARROWS_SPLIT</term>
<listitem>
<para>The down arrow is on the left and the up arrow is on the right of the
TextField.</para>
</listitem>
</varlistentry>
<varlistentry><term>XmARROWS_BEGINNING</term>
<listitem>
<para>The arrows are stacked and placed on the left of the TextField.</para>
</listitem>
</varlistentry>
<varlistentry><term>XmARROWS_END</term>
<listitem>
<para>The arrows are stacked and placed on the right of the TextField.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNarrowSensitivity</systemitem></term>
<listitem>
<para>Specifies the sensitivity of the arrows in the XmSimpleSpinBox. The following
values are supported:</para>
<variablelist>
<varlistentry><term>XmARROWS_SENSITIVE</term>
<listitem>
<para>Both arrows are active to user selection.</para>
</listitem>
</varlistentry>
<varlistentry><term>XmARROWS_DECREMENT_SENSITIVE</term>
<listitem>
<para>The down arrow is active and the up arrow is inactive to user selection.
</para>
</listitem>
</varlistentry>
<varlistentry><term>XmARROWS_INCREMENT_SENSITIVE</term>
<listitem>
<para>The up arrow is active and the down arrow is inactive to user selection.
</para>
</listitem>
</varlistentry>
<varlistentry><term>XmARROWS_INSENSITIVE</term>
<listitem>
<para>Both arrows are inactive to user selection.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNcolumns</systemitem></term>
<listitem>
<para>Specifies the number of columns of the text field.
</Para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNdecimalPoints</systemitem></term>
<listitem>
<para>Specifies the position of the radix character within the numeric value
when <systemitem class="Resource">XmNspinBoxChildType</systemitem> is <systemitem class="Constant">XmNUMERIC</systemitem>. This resource is used to allow for
floating point values in the XmSimpleSpinBox widget.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNeditable</systemitem></term>
<listitem>
<para>Specifies whether the text field can take input.
</Para>
<para>
When <SystemItem Class="Resource">XmNeditable</SystemItem> is used on a widget
it sets the dropsite to <SystemItem Class="Constant">XmDROP_SITE_ACTIVE</SystemItem>.
</PARA>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNincrementValue</systemitem></term>
<listitem>
<para>Specifies the amount to increment or decrement the <systemitem class="Resource">XmNposition</systemitem> when the <systemitem class="Resource">XmNspinBoxChildType</systemitem> is <systemitem class="Constant">XmNUMERIC</systemitem>. When
the Up action is activated, the <systemitem class="Resource">XmNincrementValue</systemitem> is added to the <systemitem class="Resource">XmNposition</systemitem>
value; when the Down action is activated, the <systemitem class="Resource">XmNincrementValue</systemitem> is subtracted from the <systemitem class="Resource">XmNposition</systemitem> value. When <systemitem class="Resource">XmNspinBoxChildType</systemitem> is <systemitem class="Constant">XmSTRING</systemitem>, this
resource is ignored.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNinitialDelay</systemitem></term>
<listitem>
<para>Specifies the amount of time in milliseconds before the Arrow buttons
will begin to spin continuously.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNnumValues</systemitem></term>
<listitem>
<para>Specifies the number of items in the <systemitem class="Resource">XmNvalues</systemitem> list when the <systemitem class="Resource">XmNspinBoxChildType</systemitem> resource is <systemitem class="Constant">XmSTRING</systemitem>.
The value of this resource must be a positive integer. The <systemitem class="Resource">XmNnumValues</systemitem> is maintained by the XmSimpleSpinBox widget when items
are added or deleted from the <systemitem class="Resource">XmNvalues</systemitem>
list. When <systemitem class="Resource">XmNspinBoxChildType</systemitem> is
not <systemitem class="Constant">XmSTRING</systemitem>, this resource is ignored.
</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNvalues</systemitem></term>
<listitem>
<para>Supplies the list of strings to cycle through when the <Symbol>XmNspinButtonChildType</Symbol> resource is <systemitem class="Constant">XmSTRING</systemitem>.
When <systemitem class="Resource">XmNspinBoxChildType</systemitem> is not <systemitem class="Constant">XmSTRING</systemitem>, this resource is ignored.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNmaximumValue</systemitem></term>
<listitem>
<para>Specifies the upper bound on the XmSimpleSpinBox's range when <systemitem class="Resource">XmNspinBoxChildType</systemitem> is <systemitem class="Constant">XmNUMERIC</systemitem>.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNminimumValue</systemitem></term>
<listitem>
<para>Specifies the lower bound on the XmSimpleSpinBox's range when <systemitem class="Resource">XmNspinBoxChildType</systemitem> is <systemitem class="Constant">XmNUMERIC</systemitem>.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNmodifyVerifyCallback</systemitem></term>
<listitem>
<para>Specifies the callback to be invoked just before the XmSimpleSpinBox position
changes. The application can use this callback to implement new application-related
logic (including setting new position spinning to, or canceling the impending
action). For example, this callback can be used to stop the spinning just
before wrapping at the upper and lower position boundaries. If the application
sets the <symbol role="Variable">doit</symbol> member of the <structname role="typedef">XmSimpleSpinBoxCallbackStruct</structname> to False, nothing happens. Otherwise,
the position changes. Reasons sent by the callback are <systemitem class="Constant">XmCR_SPIN_NEXT</systemitem>, or <systemitem class="Constant">XmCR_SPIN_PRIOR</systemitem>.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNposition</systemitem></term>
<listitem>
<para>The <systemitem class="Resource">XmNposition</systemitem> resource has
a different value based on the <systemitem class="Resource">XmNspinBoxChildType</systemitem> resource. When <systemitem class="Resource">XmNspinBoxChildType</systemitem> is <systemitem class="Constant">XmSTRING</systemitem>, the <systemitem class="Resource">XmNposition</systemitem> is the index into the <systemitem class="Resource">XmNvalues</systemitem> list for the current item. When the <systemitem class="Resource">XmNspinBoxChildType</systemitem> resource is <systemitem class="Constant">XmNUMERIC</systemitem>, the <systemitem class="Resource">XmNposition</systemitem> is the integer value of the XmSimpleSpinBox that falls
within the range of <systemitem class="Resource">XmNmaximumValue</systemitem>
and <systemitem class="Resource">XmNminimumValue</systemitem>.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNrepeatDelay</systemitem></term>
<listitem>
<para>Specifies the number of milliseconds between repeated calls to the <systemitem class="Resource">XmNvalueChangedCallback</systemitem> while the user is spinning
the XmSimpleSpinBox.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNspinBoxChildType</systemitem></term>
<listitem>
<para>Specifies the style of the XmSimpleSpinBox. The following values are supported:
</para>
<variablelist>
<varlistentry><term>XmSTRING</term>
<listitem>
<para>The child is a string value that is specified through the <systemitem class="Resource">XmNvalues</systemitem> resource and incremented and decremented
by changing the <systemitem class="Resource">XmNposition</systemitem> resource.
</para>
</listitem>
</varlistentry>
<varlistentry><term>XmNUMERIC</term>
<listitem>
<para>The child is a numeric value that is specified through the <systemitem class="Resource">XmNposition</systemitem> resource and incremented according
to the <systemitem class="Resource">XmNincrementValue</systemitem> resource.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmtextField</systemitem></term>
<listitem>
<para>Specifies the textfield widget.
</Para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem class="Resource">XmNvalueChangedCallback</systemitem></term>
<listitem>
<para>Specifies the callback to be invoked whenever the value of the <systemitem class="Resource">XmNposition</systemitem> resource is changed through the
use of the spinner arrows. The <systemitem class="Resource">XmNvalueChangedCallback</systemitem> passes the <structname role="typedef">XmSimpleSpinBoxCallbackStruct</structname> <symbol role="Variable">call_data</symbol> structure.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>Inherited Resources</title>
<para>The XmSimpleSpinBox widget inherits behavior and resources from the following
named superclasses. For a complete description of each resource, see the <![ %CDE.C.CDE; [man page
]]><![ %CDE.C.XO; [entry in &str-ZM; ]]>for that superclass.</para>
<informaltable>
<tgroup cols="5" colsep="0" rowsep="0">
<?PubTbl tgroup dispwid="8.04in">
<colspec align="left" colname="col1" colwidth="190*">
<colspec align="left" colname="col2" colwidth="189*">
<colspec align="left" colwidth="108*">
<colspec align="left" colwidth="86*">
<colspec align="left" colwidth="91*">
<spanspec nameend="col2" namest="col1" spanname="1to2">
<tbody>
<row>
<entry align="left" spanname="1to2" valign="top"><literal>XmManager Resource
Set</literal></entry></row>
<row>
<entry align="left" valign="top"><literal>Name</literal></entry>
<entry align="left" valign="top"><literal>Class</literal></entry>
<entry align="left" valign="top"><literal>Type</literal></entry>
<entry align="left" valign="top"><literal>Default</literal></entry>
<entry align="left" valign="top"><literal>Access</literal></entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNbottomShadowColor</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCBottomShadowColor</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixel</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNbottomShadowPixmap</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCBottomShadowPixmap</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixmap</structname></entry>
<entry align="left" valign="top"><systemitem class="Constant">XmUNSPECIFIED_PIXMAP</systemitem></entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNforeground</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCForeground</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixel</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNhelpCallback</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCCallback</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XtCallbackList</structname></entry>
<entry align="left" valign="top">NULL</entry>
<entry align="left" valign="top">C</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNhighlightColor</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCHighlightColor</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixel</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNhighlightPixmap</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCHighlightPixmap</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixmap</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNinitialFocus</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCInitialFocus</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Widget</structname></entry>
<entry align="left" valign="top">NULL</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNnavigationType</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCNavigationType</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XmNavigationType</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNshadowThickness</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCShadowThickness</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Dimension</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNstringDirection</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCStringDirection</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XmStringDirection</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNtopShadowColor</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCTopShadowColor</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixel</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNtopShadowPixmap</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCTopShadowPixmap</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixmap</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNtraversalOn</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCTraversalOn</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Boolean</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNunitType</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCUnitType</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">unsigned char</StructName></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNuserData</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCUserData</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XtPointer</structname></entry>
<entry align="left" valign="top">NULL</entry>
<entry align="left" valign="top">CSG</entry></row></tbody></tgroup></informaltable>
<informaltable>
<tgroup cols="5" colsep="0" rowsep="0">
<?PubTbl tgroup dispwid="7.46in">
<colspec align="left" colname="col1" colwidth="176*">
<colspec align="left" colname="col2" colwidth="178*">
<colspec align="left" colwidth="79*">
<colspec align="left" colwidth="99*">
<colspec align="left" colwidth="87*">
<spanspec nameend="col2" namest="col1" spanname="1to2">
<tbody>
<row>
<entry align="left" spanname="1to2" valign="top"><literal>Composite Resource
Set</literal></entry></row>
<row>
<entry align="left" valign="top"><literal>Name</literal></entry>
<entry align="left" valign="top"><literal>Class</literal></entry>
<entry align="left" valign="top"><literal>Type</literal></entry>
<entry align="left" valign="top"><literal>Default</literal></entry>
<entry align="left" valign="top"><literal>Access</literal></entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNchildren</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCReadOnly</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">WidgetList</structname></entry>
<entry align="left" valign="top">NULL</entry>
<entry align="left" valign="top">G</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNinsertPosition</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCInsertPosition</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XtOrderProc</structname></entry>
<entry align="left" valign="top">default procedure</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNnumChildren</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCReadOnly</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Cardinal</structname></entry>
<entry align="left" valign="top">0</entry>
<entry align="left" valign="top">G</entry></row></tbody></tgroup></informaltable>
<informaltable>
<tgroup cols="5" colsep="0" rowsep="0">
<?PubTbl tgroup dispwid="8.22in">
<colspec align="left" colname="col1" colwidth="197*">
<colspec align="left" colname="col2" colwidth="194*">
<colspec align="left" colwidth="94*">
<colspec align="left" colwidth="87*">
<colspec align="left" colwidth="107*">
<spanspec nameend="col2" namest="col1" spanname="1to2">
<tbody>
<row>
<entry align="left" spanname="1to2" valign="top"><literal>Core Resource Set</literal></entry></row>
<row>
<entry align="left" valign="top"><literal>Name</literal></entry>
<entry align="left" valign="top"><literal>Class</literal></entry>
<entry align="left" valign="top"><literal>Type</literal></entry>
<entry align="left" valign="top"><literal>Default</literal></entry>
<entry align="left" valign="top"><literal>Access</literal></entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNaccelerators</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCAccelerators</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XtAccelerators</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNancestorSensitive</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCSensitive</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Boolean</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">G</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNbackground</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCBackground</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixel</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNbackgroundPixmap</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCPixmap</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixmap</structname></entry>
<entry align="left" valign="top"><systemitem class="Constant">XmUNSPECIFIED_PIXMAP</systemitem></entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNborderColor</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCBorderColor</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixel</structname></entry>
<entry align="left" valign="top">XtDefaultForeground</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNborderPixmap</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCPixmap</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Pixmap</structname></entry>
<entry align="left" valign="top"><systemitem class="Constant">XmUNSPECIFIED_PIXMAP</systemitem></entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNborderWidth</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCBorderWidth</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Dimension</structname></entry>
<entry align="left" valign="top">0</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNcolormap</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCColormap</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Colormap</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNdepth</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCDepth</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">int</StructName></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNdestroyCallback</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCCallback</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XtCallbackList</structname></entry>
<entry align="left" valign="top">NULL</entry>
<entry align="left" valign="top">C</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNheight</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCHeight</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Dimension</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNinitialResourcesPersistent</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCInitialResourcesPersistent</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Boolean</structname></entry>
<entry align="left" valign="top">True</entry>
<entry align="left" valign="top">C</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNmappedWhenManaged</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCMappedWhenManaged</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Boolean</structname></entry>
<entry align="left" valign="top">True</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNscreen</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCScreen</systemitem></entry>
<entry align="left" valign="top"><StructName Role="typedef">Screen *</StructName></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNsensitive</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCSensitive</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Boolean</structname></entry>
<entry align="left" valign="top">True</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNtranslations</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCTranslations</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">XtTranslations</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNwidth</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCWidth</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Dimension</structname></entry>
<entry align="left" valign="top">dynamic</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNx</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCPosition</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Position</structname></entry>
<entry align="left" valign="top">0</entry>
<entry align="left" valign="top">CSG</entry></row>
<row>
<entry align="left" valign="top"><systemitem class="Resource">XmNy</systemitem></entry>
<entry align="left" valign="top"><systemitem class="Resource">XmCPosition</systemitem></entry>
<entry align="left" valign="top"><structname role="typedef">Position</structname></entry>
<entry align="left" valign="top">0</entry>
<entry align="left" valign="top">CSG</entry></row></tbody></tgroup></informaltable>
</refsect2>
<refsect2>
<title>Callback Information</title>
<para>A pointer to the following structure is passed to each XmSimpleSpinBox callback:
</para>
<informalexample remap="indent">
<programlisting>typedef struct {
        int             <symbol role="Variable">reason</symbol>;
        XEvent          *<symbol role="Variable">event</symbol>;
        Widget          <symbol role="Variable">widget</symbol>;
        Boolean <symbol role="Variable">doit</symbol>;
        int             <symbol role="Variable">position</symbol>;
        XmString        <symbol role="Variable">value</symbol>;
        Boolean <symbol role="Variable">crossed_boundary</symbol>;
} XmSimpleSpinBoxCallbackStruct;</programlisting>
</informalexample>
<para>The <symbol role="Variable">reason</symbol> argument indicates why the
callback was invoked. There are three possible reasons for this callback to
be issued. The reason is <systemitem class="Constant">XmCR_OK</systemitem>
when this is the first call to the callback at the beginning of a spin or
if it is a single activation of the spin arrows. If the XmSimpleSpinBox is in the
process of being continuously spun, then the reason will be <systemitem class="Constant">XmCR_SPIN_NEXT</systemitem> or <systemitem class="Constant">XmCR_SPIN_PRIOR</systemitem>, depending on the arrow that is spinning.</para>
<para>The <symbol role="Variable">event</symbol> argument points to the <structname role="typedef">XEvent</structname> that triggered the callback. It can be <systemitem class="Constant">NULL</systemitem> when the XmSimpleSpinBox is continuously spinning.
</para>
<para>The <symbol role="Variable">widget</symbol> argument is the widget identifier
for the simple spin box widget that has been affected by this callback.</para>
<para>The <symbol role="Variable">doit</symbol> argument is set only when
the <symbol role="Variable">call_data</symbol> comes from the <systemitem class="Resource">XmNmodifyVerifyCallback</systemitem>. It indicates that the
action that caused the callback to be called should be performed. The action
is not performed if <symbol role="Variable">doit</symbol> is set to False.
</para>
<para>The <symbol role="Variable">position</symbol> argument is the new value
of the <systemitem class="Resource">XmNposition</systemitem> resource as a
result of the spin.</para>
<para>The <symbol role="Variable">value</symbol> argument is the new <structname role="typedef">XmString</structname> value displayed in the Text widget as
a result of the spin. The application must copy this string if it is used
beyond the scope of the <symbol role="Variable">call_data</symbol> structure.
</para>
<para>The <symbol role="Variable">crossed_boundary</symbol> argument is True
when the spinbox cycles. This is the case when a <systemitem class="Resource">XmNspinBoxChildType</systemitem> of <systemitem class="Constant">XmSTRING</systemitem> wraps from the first item to the last or the last item to the
first. In the case of the <systemitem class="Resource">XmNspinBoxChildType</systemitem> of <systemitem class="Constant">XmNUMERIC</systemitem>, the
boundary is crossed when the XmSimpleSpinBox cycles from the maximum value to the
minimum or vice versa.</para>
</refsect2>
</refsect1>
<refsect1>
<title>ERRORS/WARNINGS</title>
<para>The toolkit will display a warning if the application tries to
set the value of the <systemitem class="Resource">XmNtextField</systemitem> resource, which is read-only
(marked G in the resource table).
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>&cdeman.XmSpinBox;,
&cdeman.XmCreateSpinBox;, &cdeman.XmSimpleSpinBoxAddItem;, &cdeman.XmSimpleSpinBoxDeletePos;, <![ %CDE.C.CDE; [&cdeman.XmSimpleSpinBoxSetItem;, &cdeman.Composite;, &cdeman.Core;, &cdeman.XmManager;, &cdeman.XmText;, &cdeman.XmTextField;, <Function>XtGetValues</Function>(3), <Function>XtSetValues</Function>(3) ]]><![ %CDE.C.XO; [ &cdeman.XmSimpleSpinBoxSetItem;; <classname>Composite</classname>, <classname>Core</classname>, <classname>XmManager</classname>, <classname>XmText</classname>, <classname>XmTextField</classname>, in the &str-ZM;; <function>XtGetValues</function>, <function>XtSetValues</function> in the &str-Zt;. ]]></para>
</refsect1>
</refentry>
