Top Up Prev Next Bottom Contents Index Search

2.9 Editing Icons

Pigi automatically generates icons for stars and galaxies, respectively, when you invoke the make-star or make-schem-icon command from the Extend menu. Pigi puts the new icon in a user-specified palette, which by default is user.pal in the directory in which you started pigi. More or less any vem manipulations can be performed on this icon, but some guidelines should be followed. These icons have a generic symbol, shown in figure 2-2 on page 16. To change it, place the cursor over the icon and execute the edit-icon ("I") command in the pigi menu.1 A new window containing the icon facet will appear.

Recall from section 2.6 on page 33 that icons are stored in interface facets and that the icons that appear in contents facets are really instances of icons. These instances merely refer to the actual icon facet. The edit-icon command opens a window into the actual icon. Any changes made in this window will affect the appearance of all instances referring to the icon.

Recall also that icon facets store a different kind of data from other facets. Icon facets contain information that tells vem how to draw objects. Hence, a different set of commands must be used to edit icons. Whenever you edit an icon, vem switches to a different mode called "physical editing style." In this mode, we create objects such as lines, boxes, and polygons. This is in contrast to "schematic editing style" which we used before to create instances and connect them together with wires. Physical editing style shares many commands with schematic editing style. For example, select-objects is active in both modes. A list of useful physical editing style commands and their key bindings is given in table


The commands that create geometry expect a layer argument. The layer of an object determines its color and its fill pattern. To specify a layer, place the cursor over an object attached to the desired layer before executing a command. You can open a palette of layers with the palette ("P") command. The palette is shown in figure


The layer palette contains several columns of solid and outline colors, with the name of the color at the top of the column. Colors at the top of each icon will be layered on top of colors below them in the columns. A set of special layers are arranged at the bottom of the palette. The layers for icon stems are explained below. The layers for icon bodies define the icon background and optional icon shadow.

A few simple notes will help greatlyFirst note that when the icon window is opened, the snap is automatically set to 5 "oct units". This is because the default snap for schematic windows, normally 25 units, is far too coarse for most icon editing functions. A reasonable compromise is 5 units, unless you are going to try to create a very elaborate icon, in which case 1 unit is probably what you want. The vem Options:window-options command allows you to change the snap.

When editing an icon, the vem menu is slightly different than when you are editing a schematic. In vem terminology, this is because you are working with the physical view of a facet. The commands are shown in table 2-7. Most icons can be created by experimenting with the following operations:

ANYTYPE: red FLOAT: blue INT: brown FIX: purple COMPLEX: white PACKET: green FILE: yellow STRING: black The color is currently set automatically by the icon generator by using layers defined specifically for this purpose, called anytypeColor, floatColor, intColor, fixColor, complexColor, packetColor, stringColor and fileColor. These colors are shown at the bottom of the color palette in figure 2-10.

You can change the color of an object manually, if you wish. To do this, select the object, type ""xxxx"", where xxxx is replaced by the color name (the quotation marks are necessary), and then type the single character "l" (an el - or Edit:change-layer in the menu). Be sure not to change the color of a terminal! Again, be sure to save the window.

One final editing operation is a little trickier: moving terminals. Pigi places terminals rather arbitrarily, since it knows nothing of their function. You may wish to have a smaller icon than the default, in which case you have to move the input terminals closer to the output terminals. Or may wish to change the order of the terminals, or you may want to have terminals on the top or bottom of the icon rather than right or left. All of these can be done, but the following cautions must be observed:

Changing the number of terminals in galaxy icons

Whenever the contents of a galaxy are changed so that the new definition has different I/O ports, the icon must be updated as well. You can do this by calling make-schem-icon again to replace the old icon with a new one. Vem will not allow you to overwrite the old icon if you have instances of the old icon in any open window (regardless of whether the window is iconified). Hence, you must either close those windows with "control-d" or delete the offending icon before replacing it with a new icon. Note that changing number of terminals will also change their layout, so that connections in existing schematics may no longer be valid.

Top Up Prev Next Bottom Contents Index Search

1 You must have write permission on the facet to change the icon.

Copyright © 1990-1997, University of California. All rights reserved.