9. ADVANCED FEATURES

Contents Previous Next Index
This section describes advanced features and shortcuts.

Custom Commands

Robochart lets you define up to nine custom commands to perform virtually any task from within your diagram. For example:

Custom commands can invoke system commands, shell scripts, or user-written programs. (For more complex custom interaction, including control of the Robochart window and modification of the active diagram by external software, use the Tooltalk interface. Refer to Sun's Tooltalk documentation, the tooltalk.txt Robochart interface summary, and the sample software in the Tooltalk subdirectory.)

Defining Commands

Custom commands are defined in your configuration file, and stored in diagram files. You can view and change custom commands from the Program Options window (displayed from the Options menu).

Each command has a scope of current, selected, level, or page, and a command string. Current commands apply to the object or flow at the pointer; selected commands apply to all selected objects and flows; level commands apply to all objects and flows on the current diagram level; page commands apply to all objects and flows on all levels of the page. Click Apply to apply window settings, or Reset to restore the Options window with current settings.

Executing Commands

To perform a custom command, move the pointer over the desired object or flow, or select the desired objects and flows. Hold down the Meta (or Alt) key and press the command number (1 to 9). As a shortcut, you can invoke command 1 by holding down the Meta key and clicking the left mouse button.

If the command string includes the symbol $FILE, Robochart creates a temporary ASCII export file (see Section 8) for the appropriate objects and flows (based on the command scope), and replaces $FILE in the command with the name of the temporary file.

If the command has current scope and includes the symbol $LABELn, where n is 1-9, the symbol is replaced by the nth label line of the object or flow at the pointer, in double quotes.

If the command has current scope and includes the symbol $TYPE, the symbol is replaced by the ASCII export shape ID for the type of object or flow at the pointer.

The command string is then echoed in the message area, unless it's prefixed with @ to indicate silent execution. A Bourne shell is invoked to execute the command. The first line of standard output from the command, if any, is displayed in the main window. Redirecting standard output to standard error (using the shell syntax 1>&2 in the command string) causes command output to appear in the terminal window from which Robochart was started (or the console window). You can discard command output by redirecting to the null device using the shell syntax >/dev/null.

Normally, Robochart waits for the command to complete. If the command string ends in &, the command is executed in background, allowing Robochart to continue immediately. Standard output should be redirected for commands run in background. Note that the temporary export file is deleted after the shell returns from starting the command. Thus, for example, a command like

  xterm -e vi $FILE >/dev/null &

won't work. Instead, use something like

  cp $FILE foo; xterm -e vi foo >/dev/null &

Command Examples

Adding up object values (selected scope):

  @awk -f sum.awk $FILE

where sum.awk contains

  /AMOUNT:/ { sum += $2 }
  END { print "Total = ", sum }

and object labels include lines in the form "AMOUNT: nnn".

Browsing text files (current scope):


    xterm -e vi $LABEL2 1>&2 &
or  dtpad $LABEL2 >/dev/null &
or  textedit $LABEL2 >/dev/null &

where the second label line of objects and flows is the corresponding filename.

Playing audio recordings (current scope):

  @cp $INTROS/$LABEL2 /dev/audio 

where the second label line of objects is the audio filename relative to the path defined in environment variable $INTROS.

Checking diagram spelling (page scope), output displayed in terminal window Robochart was started from:

  @(echo "==SPELL=="; spell <$FILE; echo "====") 1>&2

Color Selection

Robochart uses color codes from zero through seven to assign colors to text, object borders, object fill, and flow lines. On a monochrome screen or printer, these codes are represented as gray patterns ranging from 0=white to 7=black. On a color screen or printer, they are mapped through three palettes into RGB (red/ green/blue) colors - one palette for text, one for flow lines and object borders, and one for object fill. The color palettes, and a mapping of color codes to HPGL plotter pens, are stored in your configuration file, and in diagram documents.

To change the set of colors available for your diagram, display the Color window using the Options menu. Choose a color entry, then change the color value for this entry by adjusting the sliders (using either Red/Green/Blue or Hue/Saturation/Luminance parameters) or by typing in a color database name (names are usually found in /usr/lib/X11/rgb.txt or $OPENWINHOME/lib/rgb.txt). You must use the condensed form for multi-word names; e.g. NavyBlue rather than navy blue. On a gray-scale screen, you may wish to assign gray "colors" (e.g. gray50) to the color palette.

You can also type in a hexadecimal color value in place of a name, using the format #RRGGBB, where RR, GG, and BB are two-digit hex values for the red, green, and blue color components. For example, #000000 is black, #FFFFFF is white, and #008000 is dark green.

Click on Apply to update the current palette, or Reset to restore the window to the current settings. If your screen is using a static colormap, the color samples in the window won't update until you click on Apply.

When defining a color palette, you'll generally want color 0 to be white, color 7 to be black, and colors 1 to 6 go from lighter to darker shades.

Changes to the color selections are not automatically applied to MIF format output. You should make a corresponding custom version of the MIF header file (rchart.mif), and set environment variable RC_MIF_HDR to point to this version.

The default palette colors (from zero to seven) are:

FILL: white, yellow, pale green, light blue, gray, red, blue, and black
LINES: gray, cyan, violet, green, red, blue, slate gray, and black
TEXT: white, light gray, yellow, orange, red, slate gray, medium blue, and black
HPGL pens: 1=black, 2=red, 3=blue, 4=green, 5=yellow, 6=violet

Keyboard Shortcuts

Some of Robochart's menu functions can be activated directly from the keyboard, by holding down the Meta (or Alt) key and pressing the appropriate letter. Reminders for these keyboard shortcuts are shown on the menus. For example, "Delete +D" indicates that Meta/D is equivalent to the Delete menu choice. (See the README file for suggestions if you have problems with Meta or Alt keys.)


Motif Keys

If you have enabled menu accelerator keys (using the menuAccel application resource, described in Section 10), some of these keys display pulldown menus instead; if you have both Alt and Meta keys on your keyboard, you may be able to use one modifier for menus and the other for shortcuts.

Many keyboard functions can be customized by specifying translation resources - see Section 10 for details.

Meta/C  Copy selected objects or text to the clipboard
          (or Copy or Control/Insert) 
Meta/D  Delete the object or flow at the pointer
Meta/F  Find the selected text forward (or Find key; Shift
          for reverse find, Control to display Find/Replace window)
Meta/I  Zoom In on the object at the pointer 
Meta/J  Toggle label Justification of the object or flow at the pointer 
Meta/L  Find Link for tag in object or flow at the pointer 
Meta/O  Zoom Out to the parent diagram level
Meta/R  Redraw the diagram window 
Meta/S  Save the diagram to the current filename
Meta/U  Undo the last edit operation (or Undo or Alt/Backspace) 
Meta/V  Paste objects or text from the clipboard (or Paste or
          Shift/Insert) 
Meta/X  Cut the selected objects or text to the clipboard (or 
          Cut or Shift/Delete) 
Meta/Z  Delete the flow vertex near the pointer
Meta/1 through Meta/9  Invoke user command 1 through 9

F1 or Help Display help on control item at pointer PageDown, PageUp Change diagram page Home, End Move caret to start or end of label Control/Left Move caret back one word Control/Right Move caret forward one word Control/Home Move to start of label line Control/End Move to end of label line Backspace Delete previous character Delete Delete next character Control/Delete Delete following label text Control/W Delete previous (Shift for next) label word Control/U Delete all preceding (Shift for following) label text


OPEN LOOK Keys

Function key equivalents for some Meta keys are provided. The default mappings are shown below; these can be changed using the FKey resource (see Section 10).
Meta/C  Copy selected objects or text to the clipboard
          (or Copy)
Meta/D  Delete the object or flow at the pointer (or F10)
Meta/F  Find the selected text forward (or Find or F3;
	  Shift for reverse find, Control to display Find/Replace window)
Meta/I  Zoom In on the object at the pointer (or F5)
Meta/J  Toggle label Justification of the object or flow at
          the pointer (or F8)
Meta/L  Find Link for tag in object or flow at the pointer (or F4) 
Meta/O  Zoom Out to the parent diagram level (or F6)
Meta/R  Redraw the diagram window (or F7)
Meta/S  Save the diagram to the current filename (or F2)
Meta/U  Undo the last edit operation (or Undo) 
Meta/V  Paste objects or text from the clipboard (or Paste) 
Meta/X  Cut the selected objects or text to the clipboard (or Cut) 
Meta/Z  Delete the flow vertex near the pointer (or F9)
Meta/1 through Meta/9  Invoke user command 1 through 9

F1 or Help Display help on control item at pointer PageDown, PageUp Change diagram page Home, End Move caret to start or end of label Control/comma Move caret back one word Control/dot Move caret forward one word Control/A Move to start of label line Control/E Move to end of label line Delete, Backspace Delete previous (Shift for next) character Control/W Delete previous (Shift for next) label word Control/U Delete all preceding (Shift for following) label text (Under Solaris 2.2 and later, Meta/Q = quit window, Meta/W = close window.)


Mouse Shortcuts

Double-clicking the left mouse button provides the following shortcuts:

Triple-clicking over a label selects the entire label.

See Section 10 for resources to adjust multiclick and dragging interpretation.

Left-clicking with Meta key down invokes user command 1. (The window manager may take over mouse input with Alt or Meta modifiers active. See the README file if this is a problem.)


Contents Next Index