next up previous contents index
Next: Scripts Up: Main Functions 1 Previous: Mode   Contents   Index

Prompt Line

(int) StuffText(string)
The StuffText function stores the string in a buffer, which will be retrieved into the edit line on the next call to an editing function. The edit will terminate immediately, as if the user has typed string. Multiple lines can be stuffed, and will be retrieved in order. This function must be issued before the function which invokes the editor. Once a ``stuffed'' line is used, it is discarded.

(int) TextCmd(string)
This executes the command in string as if it were one of the keyboard ``!'' commands in Xic. The leading ``!'' is optional. Examples:
TextCmd("!") brings up an xterm
TextCmd("set ho deedo") sets variable `ho'
TextCmd("!select c") selects all subcells

(int) GetLastPrompt()
This function returns the most recent message that was shown on the prompt line, or would normally have been shown if Xic is not in graphics mode. Although the prompt line may have been erased, the last message is available until the next message is sent to the prompt line. The text on the prompt line while in edit mode is not saved and is not accessible with this function. An empty string is returned if there is no current message. This function never fails.


next up previous contents index
Next: Scripts Up: Main Functions 1 Previous: Mode   Contents   Index
Stephen R. Whiteley 2022-05-28