![]() |
8: Text |
![]() |
There are a number of ways to place text in a circuit.
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). | ![]() |
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
relative (given in lambda units).
The "Language" option allows the text to be code in an interpretive language,
in which case, the evaluation of that code is displayed.
(see Section 11-1 for more on languages).
You can choose to show the text value, the name of the piece of text, or both.
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. | ![]() |
![]() | 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. |
The Change Text Size... subcommand of the Special Function command of the Edit menu allows you to change the size of any text object. You can choose which of the 5 classes of text you wish to change, and you can choose whether to make the changes only on selected objects, in the current facet, or everywhere. | ![]() |
To change the default size and grab-point of all new text, use
the Text Options... command of the Windows menu.
The top part of the dialog lets you set the default size of text that will appear in
different locations (on facet instances, on nonlayout text, on exports, on nodes, and on arcs).
Nonlayout text is the freestanding text that is created with the Text (nonlayout) subcommand of the
New Special Object command of the Edit menu.
The center section of the dialog has two unrelated controls. The field labeled "Text editor" 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). The "New text only visible inside facet" checkbox requests that nonlayout text objects only be drawn when inside of the facet, and not when instances of the facet are expanded. | ![]() |
The lower-left part of the dialog lets you set the grab-point of subsequently created text. The lower-right part of the dialog controls "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.
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.
Just below the attribute's value is a field that reads "Not Code". This can be changed to one of the interpretive languages in Electric. When this happens, the attribute value is treated as code that is sent to that interpreter. Then, the true value of the attribute is the evaluation of that code. For example, if the value of an attribute is "(+ 3 5)" and the attribute is set to be LISP code, then the LISP interpreter will be invoked, and the attribute will actually be "8". For more on interpretive languages, see Section 11-1.
You can control the way that an attribute is 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, additional information is relevant. The grab-point of the text can be chosen from the list in the lower-right. The X and Y offset of the text from the attached object can be specified. The size of the text can be specified in relative or absolute units.
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 (which is beyond the scope of this manual).
![]() |
Previous | ![]() |
Table of Contents | Next | ![]() |