Welcome to the xtpanel page

The current version is a patch to 3.21b.

The most important recent change is the integration of the SciPlot widget. Many thanks to Glenn Golden for contributing this work.

xtpanel is a simple scripting language for creating shell like X-window applications.

xtpanel provides a quick and easy way of producing a panel containing interactive objects such as buttons, sliders, and text fields, either from an xtpanel script file or from the command line. When an object is modified by the user, it can perform actions, such as printing to the screen or calling a system command. Here is a one-line xtpanel script that builds the standard "Hello world" example:

button={ label="Hello world" action="PRINT $(val)\n" }

When this script is read by xtpanel, a panel is produced, containing a single object, a button with "Hello world" written on it. When the button is pressed, the button's value (which by default is the same as its label) is printed.

In addition to printing, objects can run system commands or modify other panel objects. Here is a simple digital clock, using a timer object that runs the UNIX "date" command once each second, then uses an ASSIGN action to display the result in a text field:

field={ name=disp background=black foreground=yellow }

timer={ interval=1 action="ASSIGN disp `date`" }

Object attributes such as the foreground and background colors used in this example allow you to customize a panel's appearance.

xtpanel actions can perform a variety of tasks, in addition to the examples of printing to screen and changing an object's value shown above. Actions can modify the attributes of an object (such as color, size, visibility, or sensitivity), or dynamically create or destroy objects. Actions can also be performed only when a certain condition is true.

The result is an interactive X Window program, using a scripting language that we believe to be much easier to learn and use than conventional X programming.

This program is not intended as a replacement for a full featured interface programming toolkit like Tcl/Tk or Dirt or as a replacement for a simple menu builder like xmenu, it falls somewhere in the gap between the two. It is intended as an easy to use tool that can be used to add an interactive wrapper to all those old programs and shells that you have lying around.

Four utilities are provided with xtpanel. All are written as xtpanel scripts.

The first is an interactive tutorial with a hypercard-like interface. It presents an overview of xtpanel, with several small examples that the user can run. It is invoked using the command xtpanel-tutor.

The second is a script generator. This is a collection of xtpanel scripts that can be used to build, examine and test xtpanel script files. It is invoked using the command "xtpanel-generator".

The third utility is a collection of example scripts and a master script that can be use to view and run the examples. It is invoked using the command "xtpanel-examples". A particularly powerful demo is the "lister" script example, which is a tool for maneuvering through a Unix filesystem and viewing files at any level.

The fourth is a set of xtpanel scripts that present information about xtpanel, mostly taken from this manual page, in an interactive, menu-driven form. This is invoked by doing "xtpanel -help".

Some example shell/xtpanel combinations are shown in the "applications" directory. They do things like show printer queues, multi-machine load average, an X-Windows pager etc.

This program uses the X toolkit and the MIT Athena widget set.

COPYRIGHT Here is the official xtpanel copyright notice:

Copyright 1992, 1993, 1994 The Board of Trustees of the Leland Stanford Junior University. Copyright 1994, 1995 Dave Nichols and Steve Cole. Permission is hereby given to use, copy, modify, and distribute this software, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. STANFORD AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THIS SOFTWARE.


  • Steve Cole (steve@sep.stanford.edu) (*)
  • Dave Nichols (dave@sep.stanford.edu) (**)

    Stanford Exploration Project, Geophysics Department, Stanford University Stanford, CA 94305-2215

    (*) now at: Chevron Petroleum Technology Company, P.O. Box 446, La Habra, CA 90633

    (**) now at: Geco-Prakla, Schlumberger House, Buckingham Gate, Gatwick Airport, RH6 0NZ, United Kingdom