This is an old revision of the document!


Xtpanel

Downloading

  • xtpanel-3.24(tar.gz, 323K) is freely available on our ftp site. (You may have to press the shift key to download the tar file to your system).

Description

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.

  • Tutorial: 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.
  • Script Generator: 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”.
  • Examples: 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. 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.
  • Menu-driven documentation: The fourth is a set of xtpanel scripts that present information about xtpanel, mostly taken from its manual page, in an interactive, menu-driven form. This is invoked by doing “xtpanel -help”.

Installation

The description below assumes that you have a working version of imake (the X11 make program). Should you not have imake, the INSTALL file describes an alternative installation.

  • Download the file. Unzip it and untar it. Check the file INSTALL for details.
  • Edit the Imake.config file to reflect where you wish to install xtpanel (Default: X11 library directory).
  • Create the makefile by typing “xmkmf -a” or “imake; make Makefiles”
  • Type “make” to build the package.
  • Type “make install” to install the software.
  • Type “make install.man” to install the man pages.

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, 1996 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.

Acknowledgements

  • The most important recent change is the integration of the SciPlot widget. Many thanks to Glenn Golden for contributing this work.
  • Steve Cole and Dave Nichols developed xtpanel.
  • This program uses the X toolkit and the MIT Athena widget set.

Bibliography

/web/html/data/attic/sep/software/xtpanel.1216753456.txt.gz · Last modified: 2015/05/26 22:41 (external edit)
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0