|
NAMEXmtMsgLineSetInput(), XmtMsgLineGetInput() - set or query the editable text in an XmtMsgLine widget.SYNOPSIS#include <Xmt/MsgLine.h>
void XmtMsgLineSetInput(Widget w, String s) String XmtMsgLineGetInput(Widget w) ARGUMENTSINPUTS
RETURNS XmtMsgLineGetInput() returns the current editable text displayed in the message line. This text must be freed with XtFree() when no longer needed. DESCRIPTIONXmtMsgLineSetInput() appends to the text displayed in the XmtMsgLine widget w. This function differs from XmtMsgLineAppend(), however, in that the appended text may be edited by the user in a subsequent call to one of the synchronous input functions XmtMsgLineGetString(), XmtMsgLineGetInt(), XmtMsgLineGetUnsigned(), or XmtMsgLineGetDouble().Text inserted into the message line with XmtMsgLineSet(), XmtMsgLineAppend(), or XmtMsgLinePrintf() is never editable by the user. Text inserted with XmtMsgLineSetInput() is editable, and becomes the default value for a subsequent call to a synchronous input function. Note that multiple calls to XmtMsgLineSetInput() do not append more editable text to previously editable text; each call sets the entire editable text, replacing any editable text previously displayed in the widget. XmtMsgLineGetInput() returns any currently editable text in an XmtMsgLine widget. It returns a copy of the editable text in allocated memory which must be freed by the application, by calling XtFree() when it is no longer needed. The only time there is editable text in an XmtMsgLine widget is while one of the synchronous input functions is in progress. At this point, the application is in an internal event loop, and so you must always call XmtMsgLineGetInput() from an action procedure or callback invoked by the XmtMsgLine widget. Note that XmtMsgLineGetInput() does not return complete user input, as XmtMsgLineGetString() does, but only a snapshot of the current state of the message line. An application might use this partial input to implement ``filename completion'' with the Tab key, for example, but should not treat input as valid until the user has entered it by striking the Return key. SEE ALSOChapter 22, The Message Line,XmtMsgLine, XmtMsgLineAppend(), XmtMsgLineClear(), XmtMsgLineGetChar(), XmtMsgLineGetDouble(), XmtMsgLineGetInt(), XmtMsgLineGetString(), XmtMsgLineGetUnsigned(), XmtMsgLinePop(), XmtMsgLinePrintf(), XmtMsgLinePush(), XmtMsgLineSet().
Visit the GSP FreeBSD Man Page Interface. |