StageTools - Documentation (Customize) [Up][Skip][Next]

Customization using X Resources:

There are a number of features of the StageTools programs that can be customized using X resources. The most usual ones to change are the ones controlling fonts and font sizes, and the commands used to view the various types of files. The .Xdefaults file in your home directory can be used to control these settings.

For example, to set the fonts and sizes for CenterStage, add lines like the following to your .Xdefaults file:

     *CenterStage.font(plain):       "Helvetica"
     *CenterStage.font(fixed):       "Courier"
     *CenterStage.font(size):        12
     *CenterStage.font(big):         14
     *CenterStage.font(small):       10

For the other StageTools commands, you must specify the fonts using names like those that appear in xlsfonts. The StageTools/lib/fonts.tcl file contains the definitions used by these modules for obtaining the fonts. It is more complicated than it should be and needs rewriting (CenterStage has been rewritten, but not the other ones). Fortunately, there is an easier means of handling this that is implemented in the StageTools/lib/config.tcl file. It will construct the appropriate font names from more simple X resources like the ones below:

     *StageManager.font(label):   "helvetica-bold"
     *StageManager.font(text):    "courier-medium"
     *StageManager.font(info):    "helvetica-medium"
     *StageManager.font(size):    14
     *StageManager.font(big):     18
     *StageManager.font(small):   12


Another important use of X resources is to customize the commands used to create and view the different animation files. Equivalents of the following default settings are part of the StageTools/lib/commands.tcl file:

      *viewer(image):   "display %s" 
      *viewer(mpeg):    "mpeg_play -quiet %s" 
      *viewer(animGIF): "netscape -geometry 400x400 file:%s" 
      *viewer(web):     "netscape %s" 

      *mpeg(encode):    "mpeg_encode -no_frame_summary %s 2>&1" 
      *mpeg(convert):   "convert * pnm:- 2>/dev/null" 

      *rib(render):     "render %s" 
The first four of these specify the commands to use to view an image file, to view an mpeg file, to view an animated GIF file, and to view a web page (the HELP files are in HTML format, so this command is used to view them).

The next two tell BackStage (part of StageManager) how to create an mpeg file from its parameter file, and how to convert the individual frames to PNM format (from whatever format they were stored in).

The final definition tells BackStage how to render a RIB file when you are using Pixar's Renderman software to generate the frames for the animation.

In each case, the "%s" represents where an appropriate filename will be inserted in the command before it is executed. More sophisticated control over these commands can be obtained by modifying the TCL procedures that are part of the StageTools/lib/commands.tcl file; see the documentation for customizing StageTools using config files for more details.


[HOME] StageTools Documentation web pages
Created: 20 Aug 1997
Last modified: Aug 17, 2006 9:44:46 AM
Comments to: dpvc@union.edu
[Next] Customization using Initialization Files
[Skip] Getting Started with StageTools
[Up] Customization Instructions