Commands

The readCommand resource and the equivalent -read_command command-line option allow xdatplot to be controlled by another process. When readCommand is True, xdatplot reads commands from its standard input until it detects an endfile, then exits. It will still respond to user mouse and keyboard actions.

Commands all have the general format:

[command_id] command arguments

After executing a command, xdatplot sends a reply to stdout of the form:

[command_id] OK | ERR [information]

command_id is an optional decimal integer. If a command_id was given on stdin, that same command_id is echoed in the reply. "OK" means that the command was executed correctly; "ERR" means that an error occurred. Depending on the command and the result, more information may be appended.

To continue a command onto the next line, end it with '\'.

The following commands are currently defined: they mainly cover scrolling and zooming on the horizontal axis, since the current purpose of this feature is synchronization of parent and child xdatplots. Eventually I hope to expand the set of commands to allow all the functions that can be done by a user, thus allowing xdatplot macros to be implemented as programs that control subsidiary xdatplots.

Quit
Exit xdatplot.

Dissociate
xdatplot closes stdin and stdout, then continues to operate under direction from the keyboard and mouse.

NewFile filename
Open the file as if it had been specified in a File Open dialog.

Resource resource line
The argument following the command specifies a single resource in the usual Xresource format.

ScrollT t-left
Scroll the plot so that the specified point is the left edge. t-left is in the time units defined in the Analyze Units dialog.

SizeT size
Resize the plot window to the given horizontal dimension. size is in pixels.

ZoomT zoom
Set the horizontal zoom. This is equivalent to typing the indicated zoom in the t Zoom text field.

SizeZoomScrollT size zoom t-left
A convenience command, equivalent to SizeT followed by ZoomT followed by ScrollT.

SetCursor time
Equivalent to typing the indicated time in the time field of the cursor control panel.

ClearCursor
Eliminates the cursor.

Region time
Assuming the cursor is set, the other end of the region is set at the indicated time.

Leon Avery (leon@eatworms.swmed.edu)