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 2-5. 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 2-21 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.
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. 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:
pigi
to create a new icon.
vem
color palette by typing "P" (or System:palette in the menu). You will get the window shown in figure
2-8.
pigi
automatically puts at the bottom of the icon. To change it, select it and type "E" (Edit:edit-label in the menu). The resulting dialog box is self explanatory. The standard Emacs-like editing commands apply.
vem
menu). You can close your window with control-d. Note that vem
buffers the data in the window. You can close it and reopen it without saving it, as long as the session has not been interrupted.
ANYTYPE: red
FLOAT: blue
INT: brown
FIX: purple
COMPLEX: white
PACKET: green
FILE: yellow
STRING: blackThe 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-8.
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.
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:
oct
internals may be useful if you explore the files that are created by these operations. For make-schem-icon, if the schematic is called xxx, then the icon itself is stored in "xxx/schematic/interface;". The semicolon is part of the filename (this creates some interesting challenges when manipulating this file in Unix, since the Unix shell interprets the semicolon as a command delimiter). The standard stars that are normally part of the Ptolemy distribution are stored in "$PTOLEMY/src/domains/
dom", where dom is the domain name such as sdf
or de
. The icons for the stars are stored in a subdirectory called icons
, the icons for demo systems in a subdirectory called demo
, and the source code for the stars are stored in a subdirectory called stars
. Feel free to explore these directories.
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.
Copyright © 1990-1997, University of California. All rights reserved.