10. CUSTOMIZATION

Contents Previous Next Index
This section describes several options for customizing Robochart to suit your specific needs, preferences, and system configuration. You can also learn about custom object shapes in Section 4, custom interactive commands in Section 9, and printer header file customization in Section 8.

Configuration Files

You can change the initial default values of several Robochart parameters, and define custom capabilities, by creating a configuration file. If you place this file in your home directory with the name .rchart, Robochart will automatically load it when starting up. Or, you can give the full pathname of a specific configuration file on the command line with the "-c" option when starting Robochart, in which case ~/.rchart is ignored.

Robochart automatically saves your current configuration when you exit the program (unless it's been modified externally). You can also update it by choosing Save Config from the Options menu. Most settings are adjusted when you use the Options and Print windows. However, a few configuration commands can only be entered manually into your configuration file. If Robochart is running when you edit the configuration file, choose Reload Config from the Options menu for the changes to take effect. If you want to restore all configuration settings to built-in defaults, delete your ~/.rchart file before starting Robochart.

Configuration files are text files, and can be created or changed with any text editor. Empty lines, and lines starting with a "#" (comments), are ignored. Commands appear one per line, and consist of one or more keywords and parameters, separated by white space (spaces and/or tabs). Keywords must appear exactly as listed below. Commands can appear in any order; if a command is duplicated, only the last one to appear will have an effect.

The following commands are recognized (and updated by the indicated window):

autolink {off | zoomin | on}
Sets the default auto-link mode (Program Options).
border line-type [line-type]
Sets the initial object border line type, where line-type is {off | solid | dashed | thin | thick} (Selection Options).
color {text | line | fill} index value [plotter-pen]
Sets a color palette entry, where index is 0 through 7; value is a color name or code (see Section 9), and plotter-pen is the HPGL pen number to select for this color code.
command number scope: command line
Defines a user command, where number is 1 through 9, and scope is "c" (current), "s" (selected), "l" (level), or "p" (page) (Program Options).
date format-string
Defines the format used to convert the date and time when printing a label containing the symbol .DATE.. Refer to the system man page for strftime() for format-string options.
defaults {off | pershape | global}
Sets the dynamic defaults option (Program Options).
direction {landscape | portrait | auto}
Sets the default print orientation (Print window).
flow source line-type [line-type] dest form
Sets the initial flow type, where source and dest are end types 0-29, line-type is {solid | dashed | thin | thick}, and form is {straight | curved}. The last four flow type commands in your configuration file also define (in reverse order) the quick flow button settings (Selection Options).
flow {center | ljust}
Sets the initial flow label justification (Selection Options).
flow color line-color [text-color]
Sets the default flow colors (0-7) (Selection Options).
font family style size
Sets the default label font. This overrides the default indication in the font definition file (described below). Family, style, and size options are as for font files (Font Options).
grid {off | size}
Sets the initial snap grid size in pixels (Program Options).
loadlist {on | off}
Enables or disables the scrolling directory list in the Open window.
margin top bottom left right
Sets the default printer page margins, in the current units (set by the paper command; default is inches) (Print window).
numbering {off | specified | all}
Sets the object/level numbering display option (Program Options).
numbering family style size
Sets the numbering font. This overrides the numbering font indication in the font definition file (described below). Family, style, and size options are as for font files (Font Options).
object {center | ljust}
Sets the initial object label justification (Selection Options).
object color border-color [text-color [fill-color]]
Sets the default object colors (0-7, or N for no fill) (Selection Options).
object type width height
Sets the initial object size, where type is 0-255, and width and height are in pixels (Selection Options).
paper size
Sets the default printing paper size, where size is one of {A | B | C | D | E | A0 | A1 | A2 | A3 | A4 | auto}, or is in the form widthxheight {in | mm} (Print window).
print {postscript | epsf | hpgl | ascii | mif | image | autohtml | html} [corner]
Sets the default printing/exporting output format. The corner option applies to HPGL outputs and sets the coordinate system origin at a corner of the page instead of the center, as needed by many small-format HPGL plotters. Use this option if your HPGL diagrams are plotting mostly off-page (Print window).
print color
Selects color output (Print window).
printer name
printer | command line
Sets the default printer device name, or a command to which printed output is to be piped. (Print window).
scale {auto | percent}
Sets the default printer scaling to automatic, or fixed at a specified percent of normal (75 dpi) (Print window).
shadows {none | opaque | objects | flows}
Sets the default object shadow printing option (for PostScript/EPSF/MIF formats) (Print window).
shape ID type atm [width height options]
Defines a custom object shape (see shapedef.txt).
lmap offset id [id ...]
Sets the mapping of object shape ID's for the Shape Library window, where offset is the starting position in the library window (0-255) and id is an object type 0-255.
pmap id [id ...]
Sets the mapping of object shape ID's for the control window palette, where id is an object type 0-255.
link delimiters
Sets the delimiters for manual link tags, where delimiters is a 2-character string containing start and end delimiter characters.
undo limit
Sets the maximum number of edit operations saved for undoing, where limit is 1 to 100.

Font Definition File

The file named in environment variable RCHT_FONTS (the default name is rcfonts) defines the selection of fonts available to Robochart. You can modify a copy of this file (and change RCHT_FONTS to point to the copy) to make additional fonts on your system available to Robochart, or to restrict or change the font selections. The font file is a text file that can be modified with any text editor; empty lines and comments (lines starting with a "#") are ignored. Each font entry consists of two consecutive lines in the following format:

family style size PSname
X name

where:

family
is the font family name (e.g. Times), used for the Font Options window. It can be up to 15 characters, with no embedded spaces.
style
is one of P (plain), B (bold), I (italic), or BI (bold-italic).
size
is a point size, 6 to 60.
PSname
is the PostScript font name (e.g. Times-Bold). Refer to your printer manual for the available font names. The character "~" can be used to indicate no corresponding PostScript font (if you try to print this font, Robochart will use Courier). PostScript printers typically list their available fonts on a test page printed out at power-up. The basic PostScript fonts are listed in Appendix A of the PostScript Language Reference Manual, a.k.a the Red Book.
X name
is the X server font name. The UNIX command xlsfonts lists the available font names, while the command xfd displays an X font's characters. The printer and screen fonts must match if your printed diagram is to match the screen image.

If * precedes a font entry's family name, that entry is used as the default label font. If + precedes the name, that entry is used as the default numbering font. These defaults can be overridden from the configuration file. Both * and + can precede the same entry.

Font File Checker

The utility program rcfntck should be run after editing a font file to check its syntax before starting Robochart. Rcfntck does not check that the named fonts are actually available on your system.

Resources

The Robochart user interface can be customized using X resources. There are many ways to define resources, including adding them to ~/.Xdefaults, or putting them in a file Rchart in either /usr/lib/X11/app-defaults or the directory named in environment variable XAPPLRESDIR.


Motif Resources

Standard Motif widgets are used, so you can set many resources by class name. The main Robochart window is an XmMainWindow; the drawing area is an XmDrawingArea; the command windows are XmForm dialogs. For example:

Rchart*fontList: variable
Rchart*XmForm*background: azure
Rchart*XmFileSelectionBox.pattern: *.cht

Refer to your X and Motif manuals for additional information on setting Motif widget resources.

The following application-specific resources, and default values, are provided:

! sound bell when popping up alert box?
Rchart.alertBell: True

! number of edits between checkpoint saves (0=disable)
Rchart.checkpoint: 0

! min pixels pointer must move to start a drag
Rchart.minDrag: 3

! max pixels pointer can move for a double-click
Rchart.multiclickSpace: 6

! max time in milliseconds between clicks for a double-click
Rchart.multiClickTime: 200

! enable menu accelerator keys in main window menu bar?
Rchart.menuAccel: False

! popup alert boxes at the pointer position?
Rchart.popupAtPtr: True

! set width and height of drawing area in pixels
Rchart.region: 4096

! ascii code for prefix key used to enter special characters 
Rchart.specialKey: 11

In addition, editing keys can be defined or altered using the mainTranslations resource. The actions available for translation are defined in action.txt.


OPEN LOOK Resources

Some OPEN LOOK resources can be adjusted directly from the OpenWindows Workspace Properties window (activated from the root window).
! number of edits between checkpoint saves (0=disable)
Rchart.CheckpointFrequency: 0

! translation of Function keys F2-F10 into Meta keys
Rchart.FKeys: sfliorjzd

! initial filename pattern for Open Diagram window
Rchart.LoadPat: ""

! set width and height of drawing area in pixels
Rchart.Region: 4096

! ascii code for prefix key used to enter special characters 
Rchart.SpecialKey: 11

! max pixels pointer can move for a double-click
Mouse.Multiclick.Space: 6

! max time in 1/10 secs between clicks for a double-click
OpenWindows.MultiClickTimeout: 4

! min pixels to activate a submenu
OpenWindows.DragRightDistance: 100

! min pixels pointer must move to start a drag
OpenWindows.DragThreshold: 5

! scrollbar position relative to window
OpenWindows.ScrollbarPlacement: Right

Environment Variables

Robochart uses several environment variables to customize its operation. The scripts configured by the Install program initialize these variables based on your responses to installation prompts. Individual users can override these settings by predefining appropriate variables (typically from their ~/.login files) before starting Robochart. To set a variable from the C-shell (or a csh script), use the setenv command, e.g.: setenv RCHT_SERVER jupiter. The equivalent Bourne shell (or sh script) command is: RCHT_SERVER=jupiter; export RCHT_SERVER.

Robochart programs use the following variables (default shown in brackets):

DLM_LICENSE
the filename to be searched for a manager license (by dlmgr) [/etc/licenses].
DLM_SERVER
the hostname (uname -n) of the floating license manager (for dlactive).
HELPPATH
the directory search path for help files. The directory containing rchart.info (default = install_dir) should be in this path.
MANPATH
the directory search path for on-line manual pages. The directory containing Robochart manuals (default = install_dir/man) should be in this path.
RC_EPS_HDR
the EPSF header filename [install_dir/rchart.eps].
RC_HPGL_HDR
the HPGL header filename [install_dir/rchart.plt].
RC_MIF_HDR
the MIF header filename [install_dir/rchart.mif].
RC_PS_HDR
the PostScript header filename [install_dir/rchart.ps].
RCHT_CVT
the program used to convert old Robochart files to the current format
[install_dir/arch.os_ver/rc_cvt].
RCHT_DIR
the Robochart installation directory [install_dir].
RCHT_FONTS
the font definition filename [install_dir/rcfonts].
RCHT_HOME
the working directory for diagram files, if no filename or directory is given on the command line [current directory].
RCHT_ICONED
the object icon editor program [install_dir/arch.os_ver/rcicon].
RCHT_IMAGE
the default image export file format (extension) [gif].
RCHT_LICENSE
the filename to be searched for a node license (by rchart) [/etc/licenses].
RCHT_OLDSPACE
if defined, Robochart uses narrower spacing between lines of text. This is primarily provided for backward compatibility, so that older diagrams will appear exactly as they used to. In some fonts, underscores may disappear with this enabled.
RCHT_PRINT
the command string used for printing (up to the device name) ["lpr -P" for SunOS 4.x, and "lp -d " for SunOS 5.x].
RCHT_RASCVT
the name of a filter program to convert color Sun raster files (given in the Shape Definition window) to monochrome [install_dir/arch.os_ver/ras8to1].
RCHT_SERVER
the hostname (uname -n) of the floating license manager (for Robochart).
RCHT_SHAPES
the object and arrow shape definition file [install_dir/shapedef].
RCHT_VER
the subdirectory containing the specific version of Robochart you want to run. The default is determined according to the current machine type and operating system version. You can set this variable to override the automatic determination. Make sure the appropriate executable is installed in the indicated directory. The version directory names are of the form architecture.os_version/environment. For example, Robochart for sun4 (Sparc), SunOS 5.x (Solaris 2), and CDE is in sun4.5/cde.

Command Line Options

Robochart accepts the following options on the command line, in addition to window system options:
-iflicense
only start if able to acquire a license
-mono
force monochrome display
-stcolor
force static colormap allocation. This may reduce color flashing on your display (or warnings from this or other programs about color allocation) if you don't need to change the color settings.
-color
force dynamic colormap allocation
-c config_file
load specified configuration file
-tooltalk
enable the tooltalk interface (Solaris only)
-keepmask
preserve signal mask (normally, the signal mask is reset at startup, to workaround a problem when running Robochart as a hypertext command from FrameMaker).
-noredirect
don't redirect stdout and stderr to /dev/console (normally these outputs are redirected in case you don't start Robochart from a shell).

Contents Next Index