Using Electric 6-8: Text

Chapter VI: ADVANCED EDITING

| ## 8: Text |

### Understanding Text

There are a number of ways to place text in a circuit.

- Each unexpanded instance of a facet has text that describes it, and its ports.
- Each export has a text label.
- Nodes and arcs can be named (with Get Info) so that they have text on them.
- Certain primitive nodes (such as the Flip-Flop component of the Schematic technology) have text as an integral part of their image.
- It is even possible to create a special node that is only text (with the Text (nonlayout) subcommand of the New Special Object command of the Edit menu, or the Add Verilog Code/Declaration subcommands of the Simulation Interface command of the Tools menu).

Essentially, then, every piece of text on the display is tied to some node or arc. By understanding the relationships between text and the attached objects, it becomes easy to manipulate that text.

### Selecting Text

The only category of text in the above list that is not selectable is the text that is integral to a node's graphics (i.e. the Flip-Flop). For the rest, you can select and manipulate the text just as you would the object on which the text resides. (Note that port names on facet instances are not selectable: instead, select their export name inside of the facet definition.)

Certain types of text are not easily selectable. This is a feature that prevents accidental selection of unwanted text. For such pieces of text, the only way to select them is to use the special select button. By default, the name of an unexpanded facet instance requires this button. However, you can also request that names on nodes and arcs (annotation text) also be difficult to select by unchecking "Easy selection of annotation text" in the Selection Options... subcommand of the Selection command of the Edit menu.

All text is attached to its node or arc at a grab-point. This is the one point on the text that never moves, regardless of the size of the text. The highlighting of selected text varies according to the grab-point. Typically, the highlighting consists of an "X" through the text. This indicates that the grab-point is in the center. If a "U" is drawn in any of four orientations, it indicates that the grab-point is on the side and that the text grows out of the opened end. If an "L" is drawn in any of four orientations, it indicates that the grab-point is in a corner. Finally, the text may be drawn with an "X" but also have four lines that indicate a box at the object edge. This is centered text that clips to the size of its attached object (it is boxed). |

### Modifying Text

Like nodes and arcs, text can be moved simply by clicking and dragging. It can be erased with the Erase command of the Edit menu.

There are two ways to change the actual text: in-place editing or with a dialog. In-place editing is done by double-clicking on the text. After the double-click, all of the text is selected. Portions of the text can be selected by clicking over it. To insert or replace text, simply type. When done editing, click away from the text to end the editing mode.

Dialog control of text is done by using the Get Info command of the Info menu. This dialog allows modification of the text, size, grab-point, and even the offset of the grab-point from the attached node or arc. Note that the offset is always relative to the center of the attached object. The size of text can be absolute (given in "points") or one of three relative sizes (which scale with the display). The little arrows next to the grab-point options show where the point of attachment lies on the text. If the text contains more than 1 line, then the only way to change it is to click on the "Edit Text" button, which closes the dialog and enters in-place editing mode. |

The checkbox "Only visible inside facet" requests that the text not be drawn when an instance of the facet is examined. In addition, for text objects (those created with the Text (nonlayout) subcommand of the New Special Object command of the Edit menu) the location of the text will not affect the bounding box of the facet. This means that the text can be placed arbitrarily far outside of the actual layout, and it will not affect the hierarchy.

| For special pieces of text that the system understands, you may get a customized dialog when you double-click. For example, if you double-click over the resistance value of a resistor, a special dialog will appear to set the resistance. To change other information, use the "More..." button to see the general dialog.

### Text Defaults

To change the default size and grab-point of all new text, use the Text Options... command of the Windows menu. This lets you set the default size and grab-point of subsequently created text. In addition, it lets you set "smart placement" of text, which adjusts the grab point according to the environment of the text. This currently only applies to export names, which are placed relative to the arc connecting to the exported node. For example, if a node on the left end of a wire is has an export, and the "Smart Horizontal Placement" is set to "Inside", then the export text will attach on the left side, causing the label to appear inside of the wire. Also, this dialog allows you to make text objects (those created with the Text (nonlayout) subcommand of the New Special Object command of the Edit menu) be visible only inside of the facet, and not when instances of the facet are expanded. |

At the bottom of the dialog is a field labeled "Text editor" which allows you to choose which style of text editing to use when working with large amounts of text (see Section 4-10 for more on text windows).

### Text Attributes

You can place arbitrary text attributes on nearly any part of the circuit by using the Define... subcommand of the Attributes command of the Info menu.

Attributes can be placed on these objects (selected in the upper-left):

- The current facet.
- The currently selected node.
- Any of the exports in the current facet (select the particular export from the list in the upper-right).
- Any of the ports on the current selected node (select the particular port from the list in the upper-right).
- The currently selected arc.

The list of attributes is shown on the left. You can create a new attribute by typing its name in the "Attribute name:" field and its value in the "Value:" field and then clicking the "Create Attribute" button. You can delete an attribute with the "Delete Attribute" button. A selected attribute can have its value changed by typing a new value and clicking the "Change" button. An attribute's name can be changed with the "Rename" button.

An attribute can be displayed in the circuit by selecting the appropriate entry in the "Show:" popup. You can request that the attribute's name and/or value be displayed. When shown, the grab-point of the text is relevant, and can be chosen from the list in the lower-right.

For attributes on facets or exports, you can request that they be inheritable with the "Instances inherit" checkbox. When instances of the facet are created, all attributes on the facet or its exports will appear on the instance and its ports. If the value of an inherited attribute has "++" in it, then the number before it will be incremented after inheritance. Similarly, a "--" indicates that the number be decremented after inheritance. This allows an inherited attribute to be unique with each inheritance. Once instances have been created, if additional inheritable attributes are added you can instantiate them with the Update Inheritance subcommand of the Attributes command of the Info menu.

Special buttons exist in the upper-right for applying changes to many ports or exports. By using the "Add", "Remove", "Add All", or "Remove All" buttons, you can select a subset of names (those with a ">" are selected). Then, by using the "Make Array" button, the currently selected attribute is copied to all selected locations.

The "Done" button terminates this dialog. Note that there is no "Cancel" button: this dialog makes changes as they are entered. The "More" button brings up a "Variables" dialog that is beyond the scope of this manual.

| Previous |  |  | Table of Contents |  | Next |