Provided by: libmotif-dev_2.3.4-5ubuntu0.1_amd64
NAME
XmCommand — The Command widget class "XmCommand" "widget class" "Command"
SYNOPSIS
#include <Xm/Command.h>
DESCRIPTION
Command is a special-purpose composite widget for command entry that provides a built-in command-history mechanism. Command includes a command-line text-input field, a command- line prompt, and a command-history list region. One additional WorkArea child may be added to the Command after creation. Whenever a command is entered, it is automatically added to the end of the command-history list and made visible. This does not change the selected item in the list, if there is one. Many of the new resources specified for Command are actually SelectionBox resources that have been renamed for clarity and ease of use. Descendants Command 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 │ ├─────────────────┼──────────────────┼───────────────────────────────┤ ├─────────────────┼──────────────────┼───────────────────────────────┤ ├─────────────────┼──────────────────┼───────────────────────────────┤ │ItemsList │ XmList │ command-history list region │ ├─────────────────┼──────────────────┼───────────────────────────────┤ │ItemsListSW │ XmScrolledWindow │ the ScrolledWindow parent of │ │ │ │ ItemsList │ ├─────────────────┼──────────────────┼───────────────────────────────┤ │Selection │ XmLabelGadget │ command-line prompt │ ├─────────────────┼──────────────────┼───────────────────────────────┤ │Text │ XmTextField │ command-line text-input field │ ├─────────────────┼──────────────────┼───────────────────────────────┤ └─────────────────┴──────────────────┴───────────────────────────────┘ Classes Command inherits behavior, resources, and traits from Core, Composite, Constraint, XmManager, XmBulletinBoard, and XmSelectionBox. The class pointer is xmCommandWidgetClass. The class name is XmCommand. 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). ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ XmCommand Resource│Set │ │ │ │Name │ Class │ Type │ Default │ Access │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ │XmNcommand │ XmCTextString │ XmString │ "" │ CSG │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ │XmNcommandChangedCallback │ XmCCallback │ XtCallbackList │ NULL │ C │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ │XmNcommandEnteredCallback │ XmCCallback │ XtCallbackList │ NULL │ C │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ │XmNhistoryItems │ XmCItems │ XmStringTable │ NULL │ CSG │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ │XmNhistoryItemCount │ XmCItemCount │ int │ 0 │ CSG │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ │XmNhistoryMaxItems │ XmCMaxItems │ int │ 100 │ CSG │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ │XmNhistoryVisibleItemCount │ XmCVisibleItemCount │ int │ dynamic │ CSG │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ │XmNpromptString │ XmCPromptString │ XmString │ dynamic │ CSG │ ├───────────────────────────┼─────────────────────┼────────────────┼─────────┼────────┤ └───────────────────────────┴─────────────────────┴────────────────┴─────────┴────────┘ XmNcommand Contains the current command-line text. This is the XmNtextString resource in SelectionBox, renamed for Command. This resource can also be modified with XmCommandSetValue and XmCommandAppendValue functions. The command area is a Text widget. XmNcommandChangedCallback Specifies the list of callbacks that is called after each time the value of the command changes. The callback reason is XmCR_COMMAND_CHANGED. This is equivalent to the XmNvalueChangedCallback of the Text widget, except that a pointer to an XmCommandCallbackStructure is passed, and the structure's value member contains the XmString. XmNcommandEnteredCallback Specifies the list of callbacks that is called when a command is entered in the Command. The callback reason is XmCR_COMMAND_ENTERED. A pointer to an XmCommandCallback structure is passed. XmNhistoryItems Lists XmString items that make up the contents of the history list. This is the XmNlistItems resource in SelectionBox, renamed for Command. XtGetValues for this resource returns the list items themselves, not a copy of the list items. The application must not free the returned items. XmNhistoryItemCount Specifies the number of XmStrings in XmNhistoryItems. This is the XmNlistItemCount resource in SelectionBox, renamed for Command. The value must not be negative. XmNhistoryMaxItems Specifies the maximum number of items allowed in the history list. Once this number is reached, an existing list item must be removed before a new item can be added to the list. For each command entered, the first list item is removed from the list, so the new command can be added to the list. The value must be greater than 0 (zero). XmNhistoryVisibleItemCount Specifies the number of items in the history list that should be visible at one time. In effect, it sets the height (in lines) of the history list window. This is the XmNlistVisibleItemCount resource in SelectionBox, renamed for Command. The value must be greater than 0 (zero). The default is dynamic based on the height of the list. XmNpromptString Specifies a prompt for the command line. This is the XmNselectionLabelString resource in SelectionBox, renamed for Command. The default may vary depending on the value of the XmNlayoutDirection resource and the locale. In the C locale the default is > (right angle bracket). Now that some default localized label strings are provided through message catalogs for the children of composite widgets, the labelString resources cannot be set on the child through default resource files. Instead, the resource provided at the parent level must be used. Inherited Resources Command inherits behavior and resources from the superclasses described in the following tables. For a complete description of each resource, refer to the reference page for that superclass. ┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐ --
RELATED
Composite(3), Constraint(3), Core(3), XmBulletinBoard(3), XmCommandAppendValue(3), XmCommandError(3), XmCommandGetChild(3), XmCommandSetValue(3), XmCreateCommand(3), XmManager(3), XmSelectionBox(3), XmVaCreateCommand(3), and XmVaCreateManagedCommand(3). XmCommand(3)