Provided by: libmotif-dev_2.3.8-3_amd64
NAME
XmSelectionBox — The SelectionBox widget class "XmSelectionBox" "widget class" "SelectionBox"
SYNOPSIS
#include <Xm/SelectioB.h>
DESCRIPTION
SelectionBox is a general dialog widget that allows the user to select one item from a list. By default, a SelectionBox includes the following: • A scrolling list of alternatives • An editable text field for the selected alternative • Labels for the list and text field • Three or four buttons The default button labels are OK, Cancel, and Help. By default an Apply button is also created; if the parent of the SelectionBox is a DialogShell, it is managed; otherwise it is unmanaged. Additional children may be added to the SelectionBox after creation. The first child is used as a work area. The value of XmNchildPlacement determines if the work area is placed above or below the Text area, or above or below the List area. Additional children are laid out in the following manner: Menubar The first menu bar child is placed at the top of the window. The XmQTmenuSystem trait is used to check that it is the first MenuBar child. Buttons All XmPushButton widgets or gadgets, and their subclasses are placed after the OK button in the order of their creation (this order is checked using the XmQTactivatable trait). The layout direction of the buttons depends on the XmNlayoutDirection resource. The layout of additional children that are not in the above categories is undefined. The user can select an item in two ways: by scrolling through the list and selecting the desired item or by entering the item name directly into the text edit area. Selecting an item from the list causes that item name to appear in the selection text edit area. The user may select a new item as many times as desired. The item is not actually selected until the user presses the OK PushButton. The default value for the XmBulletinBoard resource XmNcancelButton is the Cancel button, unless XmNdialogType is XmDIALOG_COMMAND, when the default is NULL. The default value for the XmBulletinBoard XmNdefaultButton resource is the OK button, unless XmNdialogType is XmDIALOG_COMMAND, when the default is NULL. For SelectionBox and its subclasses, the default value for XmNinitialFocus is the text edit area. The user can specify resources in a resource file for the automatically created widgets and gadgets of SelectionBox. The following list identifies the names of these widgets (or gadgets) and the associated SelectionBox areas: List Items Label Items List Items ItemsList Selection Label Selection Selection Text Text or TextField Selection Separator Separator SelectionBox uses the XmQTaccessTextual, XmQTactivatable, and XmQTmenuSystem traits. Descendants SelectionBox automatically creates the descendants shown in the following table. An application can use XtNameToWidget to gain access to the named descendant. In addition, a user or an application can use the named descendant when specifying resource values. ┌─────────────────┬────────────────────┬────────────────────────────────────┐ │Named Descendant │ Class │ Identity │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ ├─────────────────┼────────────────────┼────────────────────────────────────┤ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │Apply │ XmPushButtonGadget │ Apply button │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │Cancel │ XmPushButtonGadget │ Cancel button │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │Help │ XmPushButtonGadget │ Help button │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │Items │ XmLabelGadget │ title above the list of items │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │ItemsList │ XmList │ list of items from which the user │ │ │ │ will select │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │ItemsListSW │ XmScrolledWindow │ ScrolledWindow parent of ItemsList │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │OK │ XmPushButtonGadget │ OK button │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │Selection │ XmLabelGadget │ title above the selection box │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │Separator │ XmSeparatorGadget │ dividing line between selection │ │ │ │ box and buttons │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ │Text │ XmTextField │ selection box containing text of │ │ │ │ selected item │ ├─────────────────┼────────────────────┼────────────────────────────────────┤ └─────────────────┴────────────────────┴────────────────────────────────────┘ Classes SelectionBox inherits behavior, resources, and traits from Core, Composite, Constraint, XmManager, and XmBulletinBoard. The class pointer is xmSelectionBoxWidgetClass. The class name is XmSelectionBox. New Resources 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 .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm 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 XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A). ┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐ --
RELATED
Composite(3), Constraint(3), Core(3), XmBulletinBoard(3), XmCreateSelectionBox(3), XmCreateSelectionDialog(3), XmCreatePromptDialog(3), XmManager(3), and XmSelectionBoxGetChild(3). XmSelectionBox(3)