Next: xmdestroy, Previous: xmcolumns, Up: Internal Routines [Contents][Index]
xmcommand( parent, callback, nvisible [,
nmax, prompt, font, color])
[motif package]
Creates a command line widget in the parent
and returns its widget id. A command line widget has a recessed command
line area at the bottom and a recessed command line history area at the
top, with the prompt
label in between. The user can enter
text in the command line area, or select a line from the history area.
When the user accepts the input (by pressing the Enter key, or by
double-clicking on a line in the history area), then it is displayed
below the lines (if any) that were already present in the history area,
shifting the older lines up by one if necessary. In addition, the last
line is also stored in $COMMAND_line
.
The callback
string is executed whenever the user accepts
some newly entered text. The widget uses the indicated
font
and color
. At most nvisible
lines of history are visible at once, and at most nmax
lines of history are available – with scroll bars giving access to
those lines or those parts of lines that are available but not currently
shown.