<!-- $XConsortium: ComboBox.sgm /main/16 1996/10/29 16:07: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.MAN103.rsml.1">
<RefMeta>
<RefEntryTitle>XmComboBox</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Classname>XmComboBox</Classname></RefName>
<RefPurpose>The ComboBox widget class
<IndexTerm>
<Primary>XmComboBox</Primary>
</IndexTerm><IndexTerm>
<Primary>widget class</Primary>
<Secondary>ComboBox</Secondary>
</IndexTerm></RefPurpose>
</RefNameDiv>
<RefSynopsisDiv>
<Synopsis>#include &lt;Xm/ComboBox.h>
</Synopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para><Classname>XmComboBox</Classname> combines the capabilities of a single-line
TextField widget
and a List widget. It allows users to perform opoerations like
typing and pasting information, and it also
provides a list of possible choices that the user
can select from to complete
the TextField entry field. The list can either be displayed at all
times or can be dropped down by the user. When the list portion of the
ComboBox is hidden, users are given a visual cue (a
downward-pointing arrow)
next to the TextField field. The position of the arrow relative to the
TextField field depends on the <SystemItem Class="Resource">XmNlayoutDirection</SystemItem> resource of the
widget. This
version of the
ComboBox is called
the "drop-down" ComboBox. Drop-down ComboBoxes are useful
when screen space is limited, or when users will
complete the text entry field more often by typing text than by
selecting the entry field text from the list.
The user can access the drop-down ComboBox in either one of two ways:
</Para>
<ItemizedList>
<ListItem>
<Para>By clicking and releasing <KeySym>Btn1</KeySym> on the downward-pointing arrow,
which
pops the list up, and the list stays up. A later selection of an item
in the list will cause the item to appear in the text entry field, and
the list will unpost itself.
</Para>
</ListItem>
<ListItem>
<Para>By pressing <KeySym>Btn1</KeySym> on the downward-pointing arrow, dragging
it to a list item, and then releasing it there, which selects that
item. The list
disappears, and the selected item appears in the text entry field.
</Para>
</ListItem>
</ItemizedList>
<Para>The application provides an array of strings that fill the list. At
creation time, string items can be passed to the ComboBox via an
arglist.
Each string becomes an item in the list, with the first string becoming
the item in position 1, the second string becoming the item in position 2,
and so on. The size of the list is
set by specifying the number of items that are visible in the list
(<SystemItem Class="Resource">XmNvisibleItemCount</SystemItem>). If the number of items in the list exceeds the
number of items that are visible, a vertical scroll bar will
automatically appear that allows the user to scroll through a
large number of items.
</Para>
<Para>ComboBox creates two child widgets: a TextField widget for entering
text and a ScrolledWindow containing a List for the list of items.
The name of the items list itself is <Literal>List</Literal>, and the name of the
TextField is <Literal>Text</Literal>.
The application or user can specify resource values for these widgets in
a resource file, and the application can use <Function>XtNameToWidget</Function>
(specifying <Literal>"*List"</Literal> for the items list or <Literal>"*Text"</Literal> for the
TextField widget) to obtain the widget IDs of the
descendant widgets.
At creation time, ComboBox passes appropriate resource values in the
creation arglist, including <SystemItem Class="Resource">XmNitems</SystemItem>, to the items list.
Note that the result of providing the <SystemItem Class="Resource">XmNdestroyCallback</SystemItem>
resource in the creation <Symbol Role="Variable">arglist</Symbol> is unspecified. The
application should use the <Function>XtAddCallback</Function> function to add
callbacks to the appropriate widget (TextField or List) after
creating it.
</Para>
<Para>ComboBox forces the following resource values
on its List child:
</Para>
<ItemizedList>
<ListItem>
<Para>If <SystemItem Class="Resource">XmNcomboBoxType</SystemItem> is <SystemItem Class="Constant">XmCOMBO_BOX</SystemItem>,
<SystemItem Class="Resource">XmNtraversalOn</SystemItem> is forced to False.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNhighlightThickness</SystemItem> is forced to 2 in a drop-down ComboBox and
to 0 in other types of ComboBoxes.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNborderWidth</SystemItem> is forced to 0.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNnavigationType</SystemItem> is forced to <SystemItem Class="Constant">XmNONE</SystemItem>.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNselectionPolicy</SystemItem> is forced to <SystemItem Class="Constant">XmBROWSE_SELECT</SystemItem>.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNlistSizePolicy</SystemItem> is forced to <SystemItem Class="Constant">XmVARIABLE</SystemItem>.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNspacing</SystemItem> is forced to 0.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNvisualPolicy</SystemItem> is forced to <SystemItem Class="Constant">XmVARIABLE</SystemItem>.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNselectedPositions</SystemItem> is forced to NULL.
</Para>
</ListItem>
<ListItem>
<Para><Symbol>XmNselectedPositionsCount</Symbol> is forced to 0.
</Para>
</ListItem>
</ItemizedList>
<Para>When <SystemItem Class="Resource">XmNcomboBoxType</SystemItem> is <SystemItem Class="Constant">XmDROP_DOWN_LIST</SystemItem>,
ComboBox forces the following resource values on
its TextField child:
</Para>
<ItemizedList>
<ListItem>
<Para><SystemItem Class="Resource">XmNeditable</SystemItem> is forced to False.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNcursorPositionVisible</SystemItem> is forced to False.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNshadowThickness</SystemItem> is forced to 0.
</Para>
</ListItem>
</ItemizedList>
<Para>By contrast, when <SystemItem Class="Resource">XmNcomboBoxType</SystemItem> is <SystemItem Class="Constant">XmCOMBO_BOX</SystemItem> or
<SystemItem Class="Constant">XmDROP_DOWN_COMBO_BOX</SystemItem>, ComboBox forces the following
resource values on its TextField child:
</Para>
<ItemizedList>
<ListItem>
<Para><SystemItem Class="Resource">XmNeditable</SystemItem> is forced to True.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNcursorPositionVisible</SystemItem> is forced to True.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNeditMode</SystemItem> is forced to <SystemItem Class="Constant">XmSINGLE_LINE_EDIT</SystemItem>.
</Para>
</ListItem>
</ItemizedList>
<Para>ComboBox always forces the values of the following resources on
the TextField:
</Para>
<ItemizedList>
<ListItem>
<Para><SystemItem Class="Resource">XmNnavigationType</SystemItem> is forced to <SystemItem Class="Constant">XmNONE</SystemItem>.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNhighlightThickness</SystemItem> is forced to 0.
</Para>
</ListItem>
<ListItem>
<Para><SystemItem Class="Resource">XmNborderWidth</SystemItem> is forced to 0.
</Para>
</ListItem>
</ItemizedList>
<Para>ComboBox allows a single item to be selected in two ways: by
selecting the desired item from the List or by entering text
into the TextField.
ComboBox does not automatically select a list item if the user types
that string into the TextField. It selects the item when the user
presses <Literal>KActivate</Literal> or moves the focus.
ComboBox supports the Browse
Select selection model of List (see the <Classname>XmList</Classname> reference page
for a description of this model), so selections are mutually
exclusive. Selecting an item from the list causes
that item to be displayed in the TextField portion of the
ComboBox.
If an application sets the <SystemItem Class="Resource">XmNvalue</SystemItem> resource of TextField,
that string is shown in the TextField.
If the application has not provided any list items,
or if there is no current selection, the TextField
is empty.
</Para>
<Para>The TextField in the ComboBox widget
can be either editable or noneditable, depending on the value of
the <SystemItem Class="Resource">XmNcomboBoxType</SystemItem> resource.
</Para>
<Para>If the TextField is editable, the user can type into it.
When the user presses the Return key, the ComboBox will
compare the typed entry to the items in the List.
If there is an exact match, then the matched List item is
selected.
If the application wishes to validate the entered text (for example, to
ensure that the typed selection is a valid one), it can do so by
setting <SystemItem Class="Resource">XmNmodifyVerifyCallback</SystemItem> on the TextField widget.
</Para>
<Para>If the TextField is noneditable, typing text may invoke a matching
algorithm that will attempt to match the entered text with items in
the list. The specific matching algorithm applied, which may be none,
is determined by the value of the <SystemItem Class="Resource">XmNmatchBehavior</SystemItem> resource in
ComboBox, which can be either <SystemItem Class="Constant">XmNONE</SystemItem> or
<SystemItem Class="Constant">XmQUICK_NAVIGATE</SystemItem>. A value
of <SystemItem Class="Constant">XmNONE</SystemItem> indicates that no matching algorithm will occur. A value of
<SystemItem Class="Constant">XmQUICK_NAVIGATE</SystemItem> indicates that when the List widget has focus,
one-character navigation is supported. In this algorithm, if the typed
character is the initial character of some item in the List, this
algorithm causes that item to be navigated to and selected, and the
item is displayed in the TextField. Subsequently typing the same
character will cycle among the items with the same first character.
</Para>
<Para>Regardless of the selection mechanism used (either selected directly
from the List or typed into the TextField), when an item in the
List is selected, that item is highlighted in the List.
In addition, the selected item is displayed in the
TextField of the ComboBox. If the user performs an action
that would move focus away from ComboBox, or selects a List item,
the <SystemItem Class="Resource">XmNselectionCallback</SystemItem> callbacks are invoked to notify
the application of the current contents of the TextField (or choice). The
application then takes whatever action is required based on those
contents (or choice).
</Para>
<Para>ComboBox uses the <Symbol Role="Globalvar">XmQTspecifyRenderTable</Symbol> trait and holds the
<Symbol Role="Globalvar">XmQTaccessTextual</Symbol> trait.
</Para>
<RefSect2>
<Title>Classes</Title>
<Para><Classname>XmComboBox</Classname> inherits behavior, resources, and traits from <Classname>Core</Classname>,
<Classname>Composite</Classname>,
and <Classname>XmManager</Classname> classes.
</Para>
<Para>The class pointer is <Symbol Role="Globalvar">xmComboBoxWidgetClass</Symbol>.
</Para>
<Para>The class name is <Classname>XmComboBox</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 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 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>XmComboBox 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>XmNarrowSize</Entry>
<Entry>XmCArrowSize</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNarrowSpacing</Entry>
<Entry>XmCArrowSpacing</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNcolumns</Entry>
<Entry>XmCColumn</Entry>
<Entry>short</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNcomboBoxType</Entry>
<Entry>XmCComboBoxType</Entry>
<Entry>unsigned char</Entry>
<Entry>XmCOMBO_BOX</Entry>
<Entry>CG</Entry>
</Row>
<Row>
<Entry>XmNfontList</Entry>
<Entry>XmCFontList</Entry>
<Entry>XmFontList</Entry>
<Entry>NULL</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNhighlightThickness</Entry>
<Entry>XmCHighlightThickness</Entry>
<Entry>Dimension</Entry>
<Entry>2</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNitemCount</Entry>
<Entry>XmCItemCount</Entry>
<Entry>int</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNitems</Entry>
<Entry>XmCItems</Entry>
<Entry>XmStringTable</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNlist</Entry>
<Entry>XmCList</Entry>
<Entry>Widget</Entry>
<Entry>dynamic</Entry>
<Entry>G</Entry>
</Row>
<Row>
<Entry>XmNmarginHeight</Entry>
<Entry>XmCMarginHeight</Entry>
<Entry>Dimension</Entry>
<Entry>2</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmarginWidth</Entry>
<Entry>XmCMarginWidth</Entry>
<Entry>Dimension</Entry>
<Entry>2</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNmatchBehavior</Entry>
<Entry>XmCMatchBehavior</Entry>
<Entry>unsigned char</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNpositionMode</Entry>
<Entry>XmCPositionMode</Entry>
<Entry>XtEnum</Entry>
<Entry>XmZERO_BASED</Entry>
<Entry>CG</Entry>
</Row>
<Row>
<Entry>XmNrenderTable</Entry>
<Entry>XmCRenderTable</Entry>
<Entry>XmRenderTable</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNselectedItem</Entry>
<Entry>XmCSelectedItem</Entry>
<Entry>XmString</Entry>
<Entry>NULL</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNselectedPosition</Entry>
<Entry>XmCSelectedPosition</Entry>
<Entry>int</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNselectionCallback</Entry>
<Entry>XmCCallback</Entry>
<Entry>XmCallbackList</Entry>
<Entry>NULL</Entry>
<Entry>C</Entry>
</Row>
<Row>
<Entry>XmtextField</Entry>
<Entry>XmCTextField</Entry>
<Entry>Widget</Entry>
<Entry>dynamic</Entry>
<Entry>G</Entry>
</Row>
<Row>
<Entry>XmNvisibleItemCount</Entry>
<Entry>XmCVisibleItemCount</Entry>
<Entry>int</Entry>
<Entry>10</Entry>
<Entry>CSG</Entry>
</Row>
</TBody>
</TGroup>
</InformalTable>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNarrowSize</SystemItem></Term>
<ListItem>
<Para>Specifies the width of the arrow. The default size
depends on the size of the text, as well as
the size of the ComboBox.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNarrowSpacing</SystemItem></Term>
<ListItem>
<Para>Specifies the space between the text and arrow visual in pixels. The
default value is obtained from the <SystemItem Class="Resource">XmNmarginWidth</SystemItem> resource.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNcolumns</SystemItem></Term>
<ListItem>
<Para>Specifies the number of columns in the text field. If unset,
the text field's value is used. Refer to the <Symbol>XmTextField</Symbol> man page
for more detailed information.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNcomboBoxType</SystemItem></Term>
<ListItem>
<Para>Specifies the type of ComboBox to be created. This can be one of
the following:
</Para>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Constant">XmCOMBO_BOX</SystemItem></Term>
<ListItem>
<Para>Generates a ComboBox where the list is always displayed, and the text
entry field is editable.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmDROP_DOWN_COMBO_BOX</SystemItem></Term>
<ListItem>
<Para>Generates a ComboBox where the list is hidden unless specifically
requested, and the text entry field is editable.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmDROP_DOWN_LIST</SystemItem></Term>
<ListItem>
<Para>Generates a ComboBox where the list is hidden unless specifically
requested, and the text entry field is noneditable.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNfontList</SystemItem></Term>
<ListItem>
<Para>Specifies the fontlist associated with <Classname>XmComboBox</Classname>. The fontlist
is an obsolete construct, and has been superseded by the render table.
It is included for compatibility with earlier versions of Motif, and
for applications that do not easily support render tables. The
default fontlist is derived from the default render table, and if
both a fontlist and a render table are specified, the render table
takes precedence.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNhighlightThickness</SystemItem></Term>
<ListItem>
<Para>Specifies the thickness of the highlighting rectangle.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNitemCount</SystemItem></Term>
<ListItem>
<Para>Specifies the number of items in the list. If unset,
the lists's value is used.
Refer to the <Symbol>XmList</Symbol> man page for more detailed information.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNitems</SystemItem></Term>
<ListItem>
<Para>Specifies the items in the list. If unset,
the lists's value is used. Refer to the <Symbol>XmList</Symbol> man page for more detailed information.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNlist</SystemItem></Term>
<ListItem>
<Para>The list widget.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNmarginWidth</SystemItem></Term>
<ListItem>
<Para>Specifies the horizontal spacing between the child widgets and the boundary
of the ComboBox.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNmarginHeight</SystemItem></Term>
<ListItem>
<Para>Specifies the vertical spacing between the child widgets and the boundary
of the ComboBox.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNmatchBehavior</SystemItem></Term>
<ListItem>
<Para>Defines the matching algorithm applied to match the text
typed by the user in the TextField field with items in the list.
The current values are <SystemItem Class="Constant">XmNONE</SystemItem> and <SystemItem Class="Constant">XmQUICK_NAVIGATE</SystemItem>, as follows:
</Para>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Constant">XmNONE</SystemItem></Term>
<ListItem>
<Para>Indicates that there is no assigned matching algorithm.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmQUICK_NAVIGATE</SystemItem></Term>
<ListItem>
<Para>Is only valid for noneditable ComboBoxes (<SystemItem Class="Resource">XmNcomboBoxType</SystemItem> resource value
<SystemItem Class="Constant">XmDROP_DOWN_LIST</SystemItem>). This algorithm supports 1-character navigation
when the List widget has focus. If the typed character is the
initial character of some item in the List, this algorithm causes
that item to be navigated to and selected. Subsequently typing the
same character will cycle among the items with the same first character.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNpositionMode</SystemItem></Term>
<ListItem>
<Para>Specifies how the value of the
<SystemItem Class="Resource">XmNselectedPosition</SystemItem>
resource and the <Literal>item_position</Literal> field
of the callback structure are to be interpreted. Note that
the convenience functions <Symbol>XmComboBoxDeletePos</Symbol> and <Symbol>XmComboBoxAddItem</Symbol>
are not affected by this resource, and (like <Symbol>XmList</Symbol>) always use
1-based positions. Valid values for this resource are:
</Para>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Constant">XmZERO_BASED</SystemItem></Term>
<ListItem>
<Para>(DtComboBox compatibility mode: default) <SystemItem Class="Resource">XmNselectedPosition</SystemItem>
is in <Literal>[0,itemcount-1]</Literal>.
The <Literal>item_position</Literal> in the <Symbol>XmComboBoxCallbackStruct</Symbol>
is 0 if the first element in the list
was selected. Note that 0 is also returned if no element in the list
was selected (that is, a new item was entered in the text field).
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">XmONE_BASED</SystemItem></Term>
<ListItem>
<Para>(Motif mode) Both the resource value and the callback fields
are 1-based. This is consistent with other Motif widgets.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNrenderTable</SystemItem></Term>
<ListItem>
<Para>Specifies the render table associated with ComboBox.
This render table is used in both the TextField field and the
List in the ComboBox. This is used in conjunction with the
<SystemItem Class="Resource">XmNvisibleItemCount</SystemItem> resource of the List to determine the height
of the ComboBox widget.
</Para>
<Para>If this value is NULL at initialization, and if the widget parent is
<Classname>XmBulletinBoard</Classname> or its subclasses,
<Classname>VendorShell</Classname> or its subclasses, or <Classname>XmMenuShell</Classname>, then the
widget parent provides the default render table associated with
the widget.
If both a render table and a fontlist are specified, the render table
will take precedence.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNselectedItem</SystemItem></Term>
<ListItem>
<Para>Specifies a compound string that represents the current selection of
the ComboBox. The selected item is the content of the
ComboBox text entry field.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNselectedPosition</SystemItem></Term>
<ListItem>
<Para>If the selection in the ComboBox is an item in the list, this is
the index of the selected item in the list. If no item in
the list is selected, this is 0.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNselectionCallback</SystemItem></Term>
<ListItem>
<Para>Specifies the list of callbacks called when an item is selected.
The reason field in the <StructName Role="typedef">XmComboBoxCallbackStruct</StructName> is
<SystemItem Class="Constant">XmCR_SELECT</SystemItem>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNtextField</SystemItem></Term>
<ListItem>
<Para>The text field widget.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Resource">XmNvisibleItemCount</SystemItem></Term>
<ListItem>
<Para>Specifies the number of visible items in the list. This will override any
value specified for the list.
Refer to the <Symbol>XmList</Symbol> man page for more detailed information.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect2>
<RefSect2>
<Title>Inherited Resources</Title>
<Para>ComboBox inherits behavior and resources from superclasses described
in the following tables. For a complete description of each
resource, refer to the reference page for that superclass.
</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>XmManager 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>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>XmUNSPECIFIED_PIXMAP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNforeground</Entry>
<Entry>XmCForeground</Entry>
<Entry>Pixel</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>XmNhighlightColor</Entry>
<Entry>XmCHighlightColor</Entry>
<Entry>Pixel</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNhighlightPixmap</Entry>
<Entry>XmCHighlightPixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNinitialFocus</Entry>
<Entry>XmCInitialFocus</Entry>
<Entry>Widget</Entry>
<Entry>NULL</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNlayoutDirection</Entry>
<Entry>XmCLayoutDirection</Entry>
<Entry>XmDirection</Entry>
<Entry>dynamic</Entry>
<Entry>CG</Entry>
</Row>
<Row>
<Entry>XmNnavigationType</Entry>
<Entry>XmCNavigationType</Entry>
<Entry>XmNavigationType</Entry>
<Entry>XmSTICKY_TAG_GROUP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNpopupHandlerCallback</Entry>
<Entry>XmCCallback</Entry>
<Entry>XtCallbackList</Entry>
<Entry>NULL</Entry>
<Entry>C</Entry>
</Row>
<Row>
<Entry>XmNshadowThickness</Entry>
<Entry>XmCShadowThickness</Entry>
<Entry>Dimension</Entry>
<Entry>2</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNstringDirection</Entry>
<Entry>XmCStringDirection</Entry>
<Entry>XmStringDirection</Entry>
<Entry>dynamic</Entry>
<Entry>CG</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>
<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>Composite 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>XmNchildren</Entry>
<Entry>XmCReadOnly</Entry>
<Entry>WidgetList</Entry>
<Entry>NULL</Entry>
<Entry>G</Entry>
</Row>
<Row>
<Entry>XmNinsertPosition</Entry>
<Entry>XmCInsertPosition</Entry>
<Entry>XtOrderProc</Entry>
<Entry>NULL</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNnumChildren</Entry>
<Entry>XmCReadOnly</Entry>
<Entry>Cardinal</Entry>
<Entry>0</Entry>
<Entry>G</Entry>
</Row>
</TBody>
</TGroup>
</InformalTable>
<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>Core 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>XmNaccelerators</Entry>
<Entry>XmCAccelerators</Entry>
<Entry>XtAccelerators</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNancestorSensitive</Entry>
<Entry>XmCSensitive</Entry>
<Entry>Boolean</Entry>
<Entry>dynamic</Entry>
<Entry>G</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>XmNborderColor</Entry>
<Entry>XmCBorderColor</Entry>
<Entry>Pixel</Entry>
<Entry>XtDefaultForeground</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNborderPixmap</Entry>
<Entry>XmCPixmap</Entry>
<Entry>Pixmap</Entry>
<Entry>XmUNSPECIFIED_PIXMAP</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNborderWidth</Entry>
<Entry>XmCBorderWidth</Entry>
<Entry>Dimension</Entry>
<Entry>0</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNcolormap</Entry>
<Entry>XmCColormap</Entry>
<Entry>Colormap</Entry>
<Entry>dynamic</Entry>
<Entry>CG</Entry>
</Row>
<Row>
<Entry>XmNdepth</Entry>
<Entry>XmCDepth</Entry>
<Entry>int</Entry>
<Entry>dynamic</Entry>
<Entry>CG</Entry>
</Row>
<Row>
<Entry>XmNdestroyCallback</Entry>
<Entry>XmCCallback</Entry>
<Entry>XtCallbackList</Entry>
<Entry>NULL</Entry>
<Entry>C</Entry>
</Row>
<Row>
<Entry>XmNheight</Entry>
<Entry>XmCHeight</Entry>
<Entry>Dimension</Entry>
<Entry>dynamic</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNinitialResourcesPersistent</Entry>
<Entry>XmCInitialResourcesPersistent</Entry>
<Entry>Boolean</Entry>
<Entry>True</Entry>
<Entry>C</Entry>
</Row>
<Row>
<Entry>XmNmappedWhenManaged</Entry>
<Entry>XmCMappedWhenManaged</Entry>
<Entry>Boolean</Entry>
<Entry>True</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNscreen</Entry>
<Entry>XmCScreen</Entry>
<Entry>Screen *</Entry>
<Entry>dynamic</Entry>
<Entry>CG</Entry>
</Row>
<Row>
<Entry>XmNsensitive</Entry>
<Entry>XmCSensitive</Entry>
<Entry>Boolean</Entry>
<Entry>True</Entry>
<Entry>CSG</Entry>
</Row>
<Row>
<Entry>XmNtranslations</Entry>
<Entry>XmCTranslations</Entry>
<Entry>XtTranslations</Entry>
<Entry>dynamic</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>
</RefSect2>
<RefSect2>
<Title>Callback Information</Title>
<Para>A pointer to the following structure is passed to each callback.
The callback structure is defined as follows:
</Para>
<Synopsis>typedef struct
{
        int <Symbol Role="Variable">reason</Symbol>;
        XEvent *<Symbol Role="Variable">event</Symbol>;
        XmString <Symbol Role="Variable">item_or_text</Symbol>;
        int <Symbol Role="Variable">item_position</Symbol>;
} XmComboBoxCallbackStruct;</Synopsis>
<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. It can be NULL.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">item_or_text</Symbol></Term>
<ListItem>
<Para>The contents of the text field at the time the event caused the
callback. The <Symbol Role="Variable">item_or_text</Symbol> parameter points to a temporary
storage space that is
reused after the callback is finished. If an application needs to save
the item, it should copy <Symbol Role="Variable">item_or_text</Symbol> into its own data space.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">item_position</Symbol></Term>
<ListItem>
<Para>The position of item in the list's <SystemItem Class="Resource">XmNitems</SystemItem> 1-based array. If this
is 0, it means that the <Symbol Role="Variable">item_or_text</Symbol> was not selected from the
List.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect2>
<RefSect2>
<Title>Translations</Title>
<Para>The ComboBox translations are listed below.
</Para>
<Para>The following key names are listed in the
X standard key event translation table syntax.
This format is the one used by Motif to
specify the widget actions corresponding to a given key.
A brief overview of the format is provided under
&cdeman.VirtualBindings;.
For a complete description of the format, please refer to the
X Toolkit Instrinsics Documentation.
</Para>
<note>
<para>
The KPageUp and KPageDown translations do not take effect unless the
<classname>List</className> child widget is posted.
</para>
</note>
<VariableList>
<VarListEntry>
<Term><KeySym>Btn1Down</KeySym>:</Term>
<ListItem>
<Para><Action>CBArmAndDropDownList()</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><KeySym>Btn1Up</KeySym>:</Term>
<ListItem>
<Para><Action>CBDisarm()</Action>
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<!--.VL 2i 0 1
.LI "&bsol;*LBSelect Press:&bsol;*O"
&bsol;*LCBArmAndDropDownList()&bsol;*O
.LI "&bsol;*LBSelect Release:&bsol;*O"
&bsol;*LCBDisarm()&bsol;*O
.LE
-->
<Para>The following lists the List translations in the drop-down list. When
ComboBox <SystemItem Class="Resource">XmNcomboBoxType</SystemItem> is
<SystemItem Class="Constant">XmDROP_DOWN_LIST</SystemItem>,
<KeySym>osfActivate</KeySym>, <KeySym>osfCancel</KeySym>, and
<Literal>Return</Literal> are overriden by ComboBox actions.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>:c</Literal> &lt;Key><KeySym>osfDown</KeySym>:</Term>
<ListItem>
<Para><Action>CBDropDownList()</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:c</Literal> &lt;Key><KeySym>osfUp</KeySym>:</Term>
<ListItem>
<Para><Action>CBDropDownList()</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:</Literal>&lt;Key><KeySym>osfCancel</KeySym>:</Term>
<ListItem>
<Para><Action>CBCancel()</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:</Literal>&lt;Key><KeySym>osfActivate</KeySym>:</Term>
<ListItem>
<Para><Action>CBActivate()</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>&ap;s &ap;m &ap;a</Literal>&lt;Key><Literal>Return</Literal>:</Term>
<ListItem>
<Para><Action>CBActivate()</Action>
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<!--.VL 2i 0 1
.LI "&bsol;*LMCtrl KUp:&bsol;*O"
&bsol;*LCBDropDownList()&bsol;*O
.LI "&bsol;*LMCtrl KDown:&bsol;*O"
&bsol;*LCBDropDownList()&bsol;*O
.LI "&bsol;*LosfCancel:&bsol;*O"
&bsol;*LCBCancel()&bsol;*O
.LI "&bsol;*LosfActivate:&bsol;*O"
&bsol;*LCBActivate()&bsol;*O
.LI "&bsol;*LReturn:&bsol;*O"
&bsol;*LCBActivate()&bsol;*O
.LE
-->
</RefSect2>
<RefSect2>
<Title>Accelerators</Title>
<Para>The following accelerators are added to ComboBox and its children.
The accelerators may not directly correspond to a translation table.
If the translation is not listed below, it may depend on the context
of the event.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>:c</Literal> &lt;Key><KeySym>osfUp</KeySym>:</Term>
<ListItem>
<Para><Action>CBDropDownList()</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:</Literal>&lt;Key><KeySym>osfUp</KeySym>:</Term>
<ListItem>
<Para><Action>CBListAction(<Symbol Role="Define">Up</Symbol>)</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:c</Literal> &lt;Key><KeySym>osfDown</KeySym>:</Term>
<ListItem>
<Para><Action>CBDropDownList()</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:</Literal>&lt;Key><KeySym>osfDown</KeySym>:</Term>
<ListItem>
<Para><Action>CBListAction(<Symbol Role="Define">Down</Symbol>)</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:c</Literal> &lt;Key><KeySym>osfBeginLine</KeySym>:</Term>
<ListItem>
<Para><Action>CBListAction(<Symbol Role="Define">ListBeginData</Symbol>)</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:c</Literal> &lt;Key><KeySym>osfEndLine</KeySym>:</Term>
<ListItem>
<Para><Action>CBListAction(<Symbol Role="Define">ListEndData</Symbol>)</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:</Literal>&lt;Key><KeySym>osfPageUp</KeySym>:</Term>
<ListItem>
<Para><Action>CBListAction(<Symbol Role="Define">ListPrevPage</Symbol>)</Action>
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>:</Literal>&lt;Key><KeySym>osfPageDown</KeySym>:</Term>
<ListItem>
<Para><Action>CBListAction(<Symbol Role="Define">ListNextPage</Symbol>)</Action>
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<!--.VL 2i 0 1
.LI "&bsol;*LMCtrl KUp:&bsol;*O"
&bsol;*LCBDropDownList()&bsol;*O
.LI "&bsol;*LMCtrl KDown:&bsol;*O"
&bsol;*LCBDropDownList()&bsol;*O
.LI "&bsol;*LKBeginData:&bsol;*O"
&bsol;*LCBListAction(ListBeginData)&bsol;*O
.LI "&bsol;*LKEndData&bsol;*O"
&bsol;*LCBListAction(ListEndData)&bsol;*O
.LI "&bsol;*LKPageup&bsol;*O"
&bsol;*LCBListAction(ListPrevPage)&bsol;*O
.LI "&bsol;*LKPageDown&bsol;*O"
&bsol;*LCBListAction(ListNextPage)&bsol;*O
.LI "&bsol;*LKUp:&bsol;*O"
&bsol;*LCBListAction(Up)&bsol;*O
.LI "&bsol;*LKDown&bsol;*O"
&bsol;*LCBListAction(Down)&bsol;*O
.LE
-->
<Para>A drop-down ComboBox also adds accelerators to its List child.
Aside from the accelerators that are already listed in this section,
those accelerators are the default TextField key translations.
</Para>
</RefSect2>
<RefSect2>
<Title>Action Routines</Title>
<Para>The <Classname>XmComboBox</Classname> action routines are as follows:
</Para>
<VariableList>
<VarListEntry>
<Term><Action>CBActivate():</Action></Term>
<ListItem>
<Para>Calls the <SystemItem Class="Resource">XmNselectionCallback</SystemItem> callbacks. If the
<SystemItem Class="Resource">XmNcomboBoxType</SystemItem> is
<SystemItem Class="Constant">XmDROP_DOWN_COMBO_BOX</SystemItem> or <SystemItem Class="Constant">XmDROP_DOWN_LIST</SystemItem>, it unposts the
list. If the
parent is a manager, passes the event to the parent.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBArmAndDropDownList():</Action></Term>
<ListItem>
<Para>If the pointer is within the down arrow, draws the shadow of the arrow
in the selected state, and then posts the list.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBCancel():</Action></Term>
<ListItem>
<Para>If the <SystemItem Class="Resource">XmNcomboBoxType</SystemItem> is <SystemItem Class="Constant">XmDROP_DOWN_COMBO_BOX</SystemItem> or
<SystemItem Class="Constant">XmDROP_DOWN_LIST</SystemItem>, pops down
the list. If the parent is a manager, passes the event to the parent.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBDisarm():</Action></Term>
<ListItem>
<Para>Redraws the arrow in an unselected state.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBDropDownList():</Action></Term>
<ListItem>
<Para>If <SystemItem Class="Resource">XmNcomboBoxType</SystemItem> is <SystemItem Class="Constant">XmDROP_DOWN</SystemItem> or <SystemItem Class="Constant">XmDROP_DOWN_LIST</SystemItem>, and
list is not
displayed, posts the list. If list is displayed, it unposts the list.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBListAction(<Symbol Role="Define">ListBeginData</Symbol>):</Action></Term>
<ListItem>
<Para>Moves the location cursor to the first item in the list.
In Normal Mode, this also deselects any current selection,
selects the first item in the list, and calls the
<SystemItem Class="Resource">XmNbrowseSelectionCallback</SystemItem> selection callback.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBListAction(<Symbol Role="Define">ListEndData</Symbol>):</Action></Term>
<ListItem>
<Para>Moves the location cursor to the last item in the list.
In Normal Mode, this also deselects any current selection,
selects the last item in the list, and calls the
<SystemItem Class="Resource">XmNbrowseSelectionCallback</SystemItem> selection callback.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBListAction(<Symbol Role="Define">ListPrevPage</Symbol>):</Action></Term>
<ListItem>
<Para>Scrolls the list to the previous page, moving the location cursor to a
new item.
This action also selects the new item, deselects any current
selection, and calls the <SystemItem Class="Resource">XmNbrowseSelectionCallback</SystemItem> callbacks.
If the ComboBox is not a drop-down type, then this action does
nothing.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBListAction(<Symbol Role="Define">ListNextPage</Symbol>):</Action></Term>
<ListItem>
<Para>Scrolls the list to the next page, moving the location cursor to a new
item.
This action also selects the new item, deselects any current
selection, and calls the <SystemItem Class="Resource">XmNbrowseSelectionCallback</SystemItem> callbacks.
If the ComboBox is not a drop-down type, then this action does
nothing.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBListAction(<Symbol Role="Define">Up</Symbol>):</Action></Term>
<ListItem>
<Para>Moves the location cursor to the previous item in the list.
This action also selects the previous item, deselects any current
selection, and calls the <SystemItem Class="Resource">XmNbrowseSelectionCallback</SystemItem> callbacks.
Note that, unlike the List <Literal>ListPrevItem</Literal> action, this action wraps
around.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Action>CBListAction(<Symbol Role="Define">Down</Symbol>):</Action></Term>
<ListItem>
<Para>Moves the location cursor to the next item in the list.
This action also selects the next item, deselects any current
selection, and calls the <SystemItem Class="Resource">XmNbrowseSelectionCallback</SystemItem> callbacks.
Note that, unlike the List <Literal>ListNextItem</Literal> action, this action wraps
around.
</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>ERRORS/WARNINGS</Title>
<Para>The toolkit will display a warning if the application tries to
set the value of <SystemItem Class="Resource">XmNlist</SystemItem>
or the <SystemItem Class="Resource">XmNtextField</SystemItem> resource, which are read-only (marked G in the resource
table).
</Para>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.Composite;,
&cdeman.Core;,
&cdeman.XmCreateComboBox;,
&cdeman.XmList;,
&cdeman.XmManager;, and
&cdeman.XmTextField;.
</Para>
</RefSect1>
</RefEntry>

