1 Tcl command summary (ASCII text version)
2 -------------------------------------------------
3 This list can be found in HTML format at URL:
4 http://opencircuitdesign.com/xcircuit/tcl.html
5 -------------------------------------------------
7 I. Built-in commands (C source)
8 --------------------------------
9 A. Elements: Main command to create and manipulate objects. "element" is
10 partly a superset of the individual elements, when the command is
11 given a <handle> value and the element type is unknown. A <handle>
12 is an integer pointer to the element's location in memory. The
13 notation <handle...> represents a list of handles to elements.
14 <handle> can also be the keyword "selected", in which case it
15 implies all selected elements. The <handle> is represented as a
16 new Tcl type called "handle", and has an "H" followed by an 8-digit
17 hexidecimal number. This distinguishes it from integers and
18 allows the command line to be parsed correctly. It also discourages
19 the practice of manipulating handles, as arithmetic cannot be
20 performed directly on handle types.
22 One option, "type", does not apply to individual elements.
23 When no <handle> is supplied, the option operates on all currently
24 selected elements in the drawing. If no <handle> is supplied and
25 no elements are currently selected, then the program goes into an
26 interactive mode, prompting for an element to select and apply the
27 option to. Option "deselect" behaves differently in that
29 1. element [<handle...>] type
30 Returns the type of the element, which may be one of "label",
31 "polygon", "instance", "spline", "path", or "arc".
33 2. <element> [<handle...>] <option>
34 Where <element> may be any of "element", "label", "polygon",
35 "instance", "spline", "path", or "arc".
38 <element> [<handle...>] deselect
39 deselect the indicated element(s).
40 <element> [<handle...>] parameter <option...>
41 Option may be one of the following:
43 List the parameter types which are allowed for the
44 indicated element type.
45 b) make <type> [<key>]
46 Generate a parameter of the indicated type for
47 the indicated element. <type> may be one of:
48 "position", "substring", "x position", "y position",
49 "style", "justification", "start angle", "end angle",
50 "radius", "minor axis", "rotation", "scale", "linewidth",
51 or "color". Items with more than one word must be
52 quoted. The initial value given to the parameter is
53 the default. <key> is a unique name given to the
54 parameter. It is necessary for substring parameters but
55 may be omitted for other parameter types.
56 c) set <key> <value> [-forward]
57 Change the value of the parameter with key <key>. This
58 assumes that the parameter exists; if not, option "make"
60 c) get [<type|key>] [-forward]
61 List the parameters of the indicated element(s). If
62 <type> is given, get the instance value of the parameter(s)
63 of type <type>. If <key> is given, then get the instance
64 value of the parameter with key <key>. If the parameter
65 takes the default value, a null list is returned. If the
66 parameter type does not exist for the element, an error is
68 e) default <type|key> [-forward]
69 Get the default value of the indicated parameter, if <key>
70 specified, or all parameters of the indicated type, if
72 f) forget <type|key> [-forward]
73 Delete the indicated parameter, if <key> is specified, or
74 delete all parameters of the indicated type, if <type> is
75 specified. The parameter is removed entirely from the
78 Note that several commands take the optional argument "-forward".
79 The "-forward" argument applied only to selected object
80 instances, and indicates a forward-referenced parameter, that is,
81 a parameter belonging to the object of the selected instance,
82 and not the top-level object.
83 <element> [<handle...>] delete
84 Deletes the indicated element(s).
85 <element> [<handle...>] copy [relative] <position>
86 Makes a copy of the indicated element(s). <position> is a list of
87 2 elements representing absolute X and Y positions, unless the
88 keyword "relative" is present, in which case they represent positions
89 relative to the current element position. If more than one element
90 is specified, the position *must* be indicated as relative.
91 <element> [<handle...>] move [relative] <position>
92 Moves the indicated element(s). <position> is a list of
93 2 elements representing absolute X and Y positions, unless the
94 keyword "relative" is present, in which case they represent positions
95 relative to the current element position. If more than one element
96 is specified, the position *must* be indicated as relative.
97 <element> [<handle...>] flip horizontal|vertical [<position>]
98 Flips the indicated element(s) around the horizontal or vertical axis.
99 If <position> is specified, then element or element group will be
100 flipped around the indicated point. <position> may be a single
101 number, representing an X value for horizontal flips and a Y value
103 <element> [<handle...>] rotate <angle> [<position>]
104 Rotates the indicated element(s) by the specified angle (in degrees).
105 Positive angles are clockwise, negative angles are counterclockwise.
106 If <position> is specified, then element or element group will be
107 rotated around the indicated point.
108 <element> [<handle...>] edit
109 Puts the specified element(s) into interactive edit mode.
110 <element> [<handle...>] select
111 Selects the specified element(s).
112 <element> [<handle...>] snap [<direction>]
113 Snaps the indicated elements onto the snap grid. If <direction> is
114 specified (n, s, e, w, ne, nw, se, or sw), elements will be snapped
115 in that direction. Otherwise, elements will be snapped to the
117 <element> [<handle...>] raise [<number>]
118 Raise the position of the indicated element(s) toward the drawing
119 front (end of list; last to be drawn). If <number> is specified,
120 it is raised in front of the next <number> elements in the list.
121 If no <number> is specified, it is raised to the front of the drawing.
122 <element> [<handle...>] lower [<number>]
123 Lower the position of the indicated element(s) toward the drawing
124 back (beginning of list; first to be drawn). If <number> is specified,
125 it is lowered behind the next <number> elements in the list. If no
126 <number> is specified, it is lowered to the back of the drawing.
127 <element> [<handle1> [<handle2>]] exchange
128 Exchanges the positions of the two elements in the list. If no
129 handles are specified, then exactly one or two objects must be
130 previously selected. If only one handle is specified or only
131 one object previously selected, the behavior is to raise it to the
132 front of the drawing, unless it is already at the front of the
133 drawing, in which case it is moved to the back.
134 <element> [<handle...>] color [<idx>]
135 Sets the color of the specified element(s) to value <idx>, an index
136 into xcircuit's color table. With no arguments, returns the color
137 of the indicated element.
139 3. <path_element> [<handle...>] <option>
140 Where <path_element> may be any of "polygon", "spline", "arc", or "path".
142 <path_element> [<handle...>] border [<value>]
143 Set the border linewidth scaling to floating-point value <value>,
144 or return the current scale if <value> is not given.
145 <path_element> [<handle...>] border [<type>]
146 Set the border style of the indicated element(s) to <type>, or return
147 the type (or list of types) if <type> is not given. <type> may be one
148 of "solid", "dashed", "dotted", or "closed"
149 <path_element> [<handle...>] fill [<type>]
150 Set the fill style of the indicated element(s) to <type>, or return
151 the type (or list of types) if <type> is not given. <type> may be
152 a fill percentage (representing a stipple pattern) or the keyword
155 4. <segmented_element> [<handle...>] point <option>
156 Where <segmented_element> may be any of "polygon", "spline", or "path".
158 <segmented_element> [<handle...>] point [<number>] insert [after|before]
159 [relative] [<position>]
160 Insert a new point before or after point <number> or the current
161 point if editing interactively. If non-interactive, the point must
162 be given a position as a list of size 2, which is either an absolute
163 position, or a relative position if the keyword "relative" is given.
164 <segmented_element> [<handle...>] point [<number>] delete [<number>]
165 Delete point <number>, or the current point if editing interactively.
166 <segmented_element> [<handle...>] point [<number>] parameter
167 Parameterize the position of point <number>, or the current point
168 if editing interactively.
169 <segmented_element> [<handle...>] point [<number>] break
170 Break the element at point <number>, or at the current point if
171 editing interactively. Returns a handle to the new element
172 generated by the break.
173 <segmented_element> [<handle...>] point [<number>] next
174 Return the point following point <number>, if specified, or move
175 to the next point if editing interactively.
176 <segmented_element> [<handle...>] point [<number>] snap [<direction>]
177 Snap the indicated point <number> to the snap-to grid. Snapping
178 is in the indicated direction, if supplied, or the closest point,
179 if not. <direction> may be one of "n", "s", "e", "w", "ne", "nw",
182 4. instance [<handle...>] <option>
183 instance make <object_name> [<position>]
184 instance [<handle>] push
185 Edit the indicated instance by "pushing" down in the hierarchy.
186 Exactly one handle must be specified or one object instance
187 selected prior to executing the command. This command operates
188 like "object push" except that if any values in the object are
189 parameterized, the instance values will be changed, not the default
191 instance [<handle...>] scale [<value>]
192 Change the scale of the indicated instance to <value>. If no value
193 is specified, return the current scale of the instance.
194 5. label [<handle...>] <option>
196 Interactively create a new label element.
197 label make [pin|global|info] <string_list> <position>
198 Create a new label element with the text specified by <string_list>
199 and origin at <position>. Optional keywords "pin", "global", or
200 "info" make the label a schematic pin type. <string_list> is a
201 list of string parts or a single string. String parts
202 label [<handle...>] append <string_list>
203 Add <string_list> to the end of the indicated label.
204 label [<handle...>] insert <position> <string_list>
205 Insert <string_list> into the indicated label at the indicated position.
206 label [<handle...>] delete <start> <end>
207 Delete a substring of the indicated label beginning at position <start>
208 and ending before position <end>.
209 label [<handle...>] get <start> <end>
210 Return the substring (list) between beginning at position <start> and
211 ending before position <end>
212 label [<handle...>] scale [<value>]
213 Change the scale of the indicated label. Return the scale if <value>
215 label [<handle...>] justify [<hjust>] [<vjust>]
216 Change the justification of the indicated label, where <hjust> may be
217 one of "left", "center", "right", and <vjust> may be one of "top",
218 "middle", or "bottom". If neither <hjust> nor <vjust> is specified,
219 command returns a list of size 2 containing the horizontal and
220 vertical justifications.
221 label [<handle...>] flipinvariant [true|false]
222 Set the flip-invariance of the indicated label. If no value is
223 supplied, return the state of the flip-invariance on the label.
224 label [<handle...>] style [<font_style>]
225 Set the label style to <font_style>, which may be one of "normal",
226 "bold", "italic", or "bolditalic". If no style is specified,
227 return the current font style.
228 label [<handle...>] family [<font_family>]
229 Set the label font family to <font_family>. If no font family
230 is specified, return the current font family.
231 label [<handle...>] encoding [<font_encoding>]
232 Set the label encoding to <font_encoding>, which may be one of
233 "standard", "special", or "ISO-Latin1" through "ISO-Latin6".
234 If no font encoding is specified, return the current font encoding.
235 6. polygon [<handle...>] <option>
237 Interactively create a new polygon element. A rectangle is
238 created if "box" is specified. Otherwise, the polygon is
239 generated point by point, in wire-drawing mode.
240 polygon make <N> <position1> <position2> ... <positionN>
241 Create a new polygon element with <N> points. Each <position>
242 is a list of size 2 with X, Y coordinates.
243 polygon make box <position1> <position2> <position3> <position4>
244 Create a new polygon element with 4 points and with border style
245 "closed". Each <position> is a list of size 2 with X, Y
247 7. spline [<handle...>] <option>
249 Interactively create a new spline element.
250 spline make [<position1> <position2> <position3> <position4>]
251 Create a new spline object with endpoints <position1> and
252 <position4> and control points <position2> and <position3>.
253 8. arc [<handle...>] <option>
255 Interactively create a new arc element.
256 arc make [<position> <radius> [<minor>] [<angle1> <angle2>]]
257 Create a new arc element with the indicated values.
258 By default, <minor> is set to the value of <radius>, <angle1>
259 is zero, and <angle2> is 360. Angle values are in degrees.
260 arc [<handle...>] radius|minor [<value>]
261 Specify the major or minor axis radius for the indicated arc.
262 arc [<handle...>] angle start|end [<value>]
263 Specify the start and end angles for the indicated arc.
264 9. path [<handle...>] <option>
265 path make [<handles...>]
266 Generate a path element from the indicated components.
267 10. object [<handle...>|<name...>] <option>
268 object make [<handle...>] [<library>] [<name>]
269 Creates a new object out of the elements specified by <handle...>,
270 or from the selected elements if <handle...> is not specified.
271 The new object is placed into library <library>, or the User
272 Library, if not specified. The object is given the name <name>,
273 if specified; otherwise the user is prompted for a name
274 object [<handle|name>] push
275 Edit the indicated object. This is like an instance edit except
276 that it is the library object itself, with default values for
277 parameters, that is edited. If the object takes no parameters,
278 then there is no difference between editing an object and editing
279 any of its instances.
280 object [<handle|name>] center [<position>]
281 Set the object's origin to <position> (a list of X, Y values).
282 If <position> is not specified, then return the coordinates of
283 the center of the object's bounding box.
284 object [<handle|name>] copy [<library>] [<name>]
285 A copy of the object is made and placed in the named <library>, or
286 in the User Library if not specified. The new copy is given the
287 name <name>, or the original name prepended with an underscore if
288 the name is not specified. If the originating and destination
289 libraries are the same, the copy will be a "virtual" copy.
290 object [<handle>] move [<library>]
291 Move the object to the indicated library, or the User Library if
292 <library> is not specified.
293 object [<handle>] hide
294 Hide the object from view in its library, unless hiding the object
295 would render the object unaccessible.
299 Returns the current page
301 Go to the page directory listing (interactive command)
302 3. page [<number>|<name>]
303 Same as " page [<number>|<name>] goto" (see below)
304 4. page make [<name>]
305 Make a new page, giving it the optional name <name> if supplied,
306 or "Page X" where X is the page number. Generate a new menu button
307 entry for the indicated page. Go to the indicated page.
308 4. page [<number>|<name>] <option>
309 Where the page may be specfied either by page number or by page
310 name (page label). If neither number or name is supplied, then
311 the current page is assumed. Options are:
314 Load the xcircuit file named <filename> into the indicated page.
316 Import the xcircuit file named <filename> into the indicated page.
317 background <filename>
318 Read the PostScript file named <filename> into the indicated page
319 as a background image.
321 Save the indicated page as <filename>. Normally, <filename> is
322 not specified and the filename given to the page by the "filename"
325 Go to the page directory listing (interactive command)
327 Resets (clears) the indicated page, or the current page if no
328 arguements are given.
330 Returns the page labels of all pages which have the same filename
331 as the current or indicated page.
333 If "true" or "false" is given, sets or clears the auto-fit
334 function for the current page. If no value is given, then
335 it rescales the drawing to fit the output page. Only valid
338 Sets the filename of the current page to <name>. With no argument,
339 returns the filename of the current page.
341 Sets the name (page label) of the current page to <name>. With no
342 argument, returns the page label of the current page.
344 Sets the scale of the current page to <value>. With no argument,
345 returns the scale of the current page.
347 Sets the scale of the current page such that the width is <value>.
348 With no argument, returns the width of the object in the current
351 Sets the scale of the current page such that the height is <value>
352 With no argument, returns the height of the object in the current
355 Sets the size of the output page for full-page mode to the given
356 dimension, which can be a list of size 2 containing the page
357 width and height, or a string in the format "width x height".
358 With no argument, returns the size of the current page as a
359 string in the format "width x height".
363 Returns the current library, or "none" if none is being viewed.
365 Go to the library directory (interactive command).
366 3. library make [<name>]
367 Make a new library, giving it the optional name <name> if supplied,
368 or "Library: X" where X is the library number. Generate a new
369 menu button entry for the indicated library.
370 4. library [<number>|<name>] <option>
371 Where the library is specified by number or by name. If no
372 library is specified, then the current library is assumed if
373 a library page is currently in the xcircuit drawing window,
374 or the User Library is assumed if not. Options are:
376 Load the library from file <filename> into the indicated library.
378 Save the indicated library to the file <filename>.
380 Go to the indicated library (interactive command).
381 5. library <filename> [<number>]
382 Backward compatibility; same as "library [<number>] load <filename>"
384 D. Actions: Actions are described under the "element" command. These
385 commands are exactly like the "element" subcommands except that the
386 arguments are rearranged: "element [<handle...>] <command> <options...>"
387 becomes "<command> [<handle...>] <options...>". In addition, these
388 commands can take a position list <position> (list of size 2 containing X
389 and Y values) in place of the handle, in which case the command attempts
390 to select an element at the indicated position and apply the command to
393 1. delete [<handle...>|here] <options>
394 2. undelete [<handle...>|here] <options>
395 3. select [<handle...>|here|get] <options>
396 The additional subcommand "get" returns a handle or list of handles
397 of all currently selected elements.
398 4. deselect [<handle...>|here] <options>
399 5. copy [<handle...>|here] <options>
400 6. edit [<handle...>|here] <options>
401 7. parameter [<handle...>|here] <options>
402 8. push [<handle...>|here] <options>
403 9. pop [<handle...>|here] <options>
404 10. rotate [<handle...>|here] <options>
405 11. flip [<handle...>|here] <options>
408 1. config <option> [value...]
409 Main option setting. Options are:
410 config axis|axes [on|off]
411 Turn axis drawing on or off. If no argument supplied,
412 toggle the state of axis drawing.
414 Turn grid drawing on or off. If no argument supplied,
415 toggle the state of grid drawing.
416 config grid spacing <value>
417 Set the grid spacing to <value>. <value> is a number
418 representing distance in the current coordinate system.
419 Currently, coordinate system specifiers like "in" and "cm"
420 may be included but are ignored.
422 Turn snap point drawing on or off. If no argument supplied,
423 toggle the state of snap point drawing.
424 config snap spacing <value>
425 Set the snap spacing to <value>. <value> is a number
426 representing distance in the current coordinate system.
427 Currently, coordinate system specifiers like "in" and "cm"
428 may be included but are ignored.
430 Turn bounding box drawing on or off. If no argument supplied,
431 toggle the state of bounding box drawing.
432 config editinplace [on|off]
433 Turn edit-in-place on or off. If no argument supplied,
434 toggle the state of edit-in-place. If "on", when the
435 drawing hierarchy is descended, the entire drawing is drawn
436 from the top level, but everything above the current edit
437 level is drawn in gray.
438 config pinpositions [on|off]
439 Turn pin position drawing on or off. If no argument supplied,
440 toggle the state of pin position drawing. If "on", pin
441 positions inside an object instance appear in levels of the
442 drawing hierarchy outside of the object.
443 config linewidth <value>
444 Set global line scaling. All linewidths in the drawing are
445 determined relative to this overall scaling value (default
447 config colorscheme normal|inverse
448 Set the overall colorscheme. "normal" is black-on-white.
449 "inverse" is white-on-dark gray.
450 config drawingscale <scale>
451 Set the drawing scale. <scale> is represented as
452 <divisor>:<multiplier>. Positions reported in the message
453 bars are scaled by <multiplier>/<divisor> with respect to
454 the scale of the actual output.
455 config manhattan [on|off]
456 Sets the style of polygon drawing. When "on", lines can
457 only be drawn vertical and horizontal. If no argument is
458 supplied, the current polygon drawing mode is toggled.
459 config boxedit manhattan|rhomboidx|rhomboidy|rhomboida|normal
460 Sets the style of polygon editing. "manhattan" forces
461 lines to remain vertical or horizontal, but does not
462 affect lines which are already diagonal. "normal"
463 places no restrictions on line position. The "rhomboid"
464 styles place manhattan restrictions on horizontal or vertical
465 lines, but not both, and are of limited practicality.
466 config coordstyle "decimal inches"|"fractional inches"|centimeters
467 Sets the coordinate measurement system to metric or standard.
468 "fractional inches" reports values in whole number fractions
471 Where option is one of:
473 Sets color to the indicated color index (from xcircuit's
474 color table). "inherit" is the same as <idx>=-1, and
475 represents a color which is inherited from the parent
476 element in the drawing hierarchy.
478 Returns the color of the currently selected element,
479 or the default color if nothing is selected.
481 Adds a new color to the color index table (including
482 adding an entry to the GUI color selection menu).
483 Color may be specified by name (a la rgb.txt) or by
486 3. fill [<option>|<fillfactor>]
487 Given an integer between 0 and 100 inclusive, sets the fill style
488 to the given fillfactor. Values are rounded to the nearest known
489 fillfactor value. Know values are 0, 12, 25, 37, 50, 62, 75, 87,
490 and 100. Other options include "solid" (equivalent to "100"),
491 "opaque", and "transparent". With no arguments, returns a list
492 of all the fill styles of the currently selected element, or the
493 default fill style if nothing is selected.
496 Sets the border style to the given option, which is one of "solid",
497 "dashed", "dotted", "unbordered", "bounding box", "closed", and
498 "unclosed". The two-word "bounding box" must be quoted or in
499 braces ({}). "bounding box" takes an additional argument, "true"
500 or "false". With no option, returns a list of all border styles
501 of the currently selected element, or the default border style
502 if nothing is selected.
506 Perform various netlist functions. Options are:
508 Generate a netlist output file in one of the following
509 formats: "spice", "spiceflat", "sim", or "pcb".
511 Highlight connectivity of any selected network element
512 (wire or pin), or start an interactive method for
513 selecting a network to highlight.
515 Generates and returns a Tcl list element representing
516 the netlist for the current circuit schematic. The
517 list is heavily nested. The outermost list contains
518 four elements: The string "globals", a list of
519 global networks, the string "circuit", and a list of
520 circuit netlists. These are further subdivided into
521 hierarchical lists, a description of which is not
524 Automatically substitues indices for unnumbered
526 2. schematic <option>
527 Perform various netlist functions. Options are:
528 a) associate [<name>]
529 Associate the schematic with the symbol named <name>.
530 If <name> is not specified, xcircuit starts an interactive
531 method for selecting a symbol for association.
533 Disassociate any existing symbol from the schematic.
535 Generate a new symbol associated with the current
536 schematic. The new symbol will be named after the
537 page. If the current page has not been named, then
538 option <name> must be provided.
540 Change the current page to the associated symbol, if
543 Return the name of the associated symbol, or {}
544 (empty list) if no symbol is associated.
546 Return the type of the current page, which may be one
547 of "schematic", "symbol", "trivial", or "fundamental".
548 If "value" is specified, change the current type to
549 "value". It is only possible to change types between
550 "symbol", "trivial", and "fundamental", which are all
551 symbol classes. It is not possible to change symbols
552 to schematics and vice versa.
554 "symbol" is simply an alias for "schematic". Whether the command
555 operates on a symbol or a schematic is determined purely from
561 Redraws the current window.
562 Automatically substitues indices for unnumbered
564 2. zoom [in [<amount>]|out [<amount>]|box|view|factor [<amount>]]
565 With no option, same as "zoom view".
567 in [<amount>]: Zoom in by current zoom factor or by [<amount>].
568 out [<amount>]: Zoom out by current zoom factor or by [<amount>].
569 box: prompt for zoom box. Zoom occurs as soon as box is drawn and
570 the mouse button is released.
571 view: Fits the drawing to the xcircuit window.
572 factor: Returns the current zoom factor.
573 factor <amount>: Sets the current zoom factor to <amount>.
574 <amount> is a floating-point number representing a scale multiplier.
575 Values greater than 1.0 imply a zoom "in", while values less than one
576 imply a zoom "out". Zero or negative values not allowed.
577 3. pan [here|<position>]
578 Center the drawing window on the indicated position. If "here",
579 position is centered on the cursor. Otherwise, <position> is a
580 list of size 2 with X and Y values.
582 Quit xcircuit, with a prompt if any files with outstanding changes
584 5. promptsavepage [<page_number>]
585 Start the page output dialog. Currently, <page_number>, if present,
586 must be the current page number.
588 Returns a list size two with the X and Y position of the cursor
589 relative to the XCircuit coordinate system.
592 1. loadfont <fontname>
593 Loads an xcircuit font. Expects to see file <fontname>.xfe (Xcircuit
594 Font Encoding) in the default system library path.
597 Recovers files from a crash or Ctrl-C exit that are left in the /tmp
602 Immediate exit from xcircuit
604 XCircuit startup. Usually called internally from the wrapper
605 script. However, for purposes of debugging problems, it can
606 be called manually from the Tcl command after loading the
607 shared object file "xcircuit.so".
609 This is a Tk extension which generates a "simple" window, a blank
610 area into which a C-source application is supposed to draw.
611 4. image create xpm <name> -file <filename.xpm>
612 This is an extension to the Tk "image" command which allows images
613 to be generated from "xpm"-format files. Since xpm files contain
614 all color and size information, the options are fixed (although it
615 might be nice to add things like color substitutions).
616 5. tag <name> [<procedure>]
617 Attach a procedure to a command, such that the procedure is
618 executed after every call to the command "name". The procedure
619 may name a Tcl procedure or it may be entirely inline.
620 "procedure" may make use of several escape sequence substitutions,
622 %0 through %5: Substitute the argument passed to <name>.
623 %r: Substitute the Tcl result from <name>. The result
624 is transparent; any result produced by the tag
625 procedure will be ignored and the calling function
626 will get back the original result (%r).
627 %R: Substitute the Tcl result from <name>. The result
628 is absorbed, and the tag function generates a new
629 result which is passed back to the calling function.
630 %%: Substitute a single percent character.
631 All other uses of the percent character within the tag procedure
632 will be evaluated as-is.
633 With only one argument, <name>, the "tag" command will return
634 the procedure currently attached to that command.
635 Tagging a procedure to a command which is already tagged will
636 cause the new tag procedure to overwrite the old one.
637 Any tag procedure which calls the function to which it is tagged
638 should wrap the entire procedure inside
639 if {[info level] <= 1} {...}
640 to prevent infinite recursion.
643 II. Scripted commands (Tcl source)
644 ----------------------------------
646 A. Namespace (Toolscript)
647 1. pushnamespace <namespace>
648 Makes all commands in <namespace> available in the current namespace.
649 Conflicting commands names are not pushed.
650 2. popnamespace <namespace>
651 Revert command names back to original set.
655 Dialog to ask for object size
657 Dialog to ask for element border width
659 Dialog to ask for overall linewidth scaling
661 Dialog to ask for grid spacing
662 5. promptdrawingscale
663 Dialog to ask for drawing scale
665 Dialog to ask for snap spacing
667 Dialog to ask for object name before making new library entry
668 8. promptsavelib <library_number>|<library_name>
669 Dialog to ask for filename of library to save.
671 Dialog to ask for filename of library to load
673 Dialog to ask for filename of library to add to current library page
675 Dialog to ask for filename of xcircuit file to load
677 Dialog to ask for filename of xcircuit file to add to current page
678 13. promptimportbackground
679 Dialog to ask for filename of PostScript file to use as background
681 Dialog to ask for filename of Tcl file to execute
683 Dialog to ask for label scaling
685 Dialog to ask for name of font to load
687 Dialog to ask for X Y kerning values inside a label
689 Dialog to ask for a name for a page, if the page has not yet been
690 named, before generating a matching symbol of the same name.
692 C. Menu manipulation: These functions should only be called from inside
693 xcircuit, as they change only the menu appearance and callbacks
694 and not xcircuit's internal data structures.
696 1. newcolorbutton <r> <g> <b> <idx>
697 Adds a new button to the color menu
698 <r> <g> and <b> are color components, and <idx> is the position in
699 xcircuit's color table.
700 2. newencodingbutton <encodingname>
701 Adds a new button to the font encoding menu. Valid encoding names
702 are "special", "standard", and "ISO-Latin1" through "ISO-Latin6".
703 3. newfontbutton <familyname>
704 Adds a new button to the font family menu.
705 4. newlibrarybutton <libraryname>
706 Adds a new button to the library menu with a callback to switch to
707 the indicated library.
708 5. newpagebutton <pagename>
709 Adds a new button to the page menu with a callback to switch to the
711 6. renamelib <number> <libraryname>
712 Changes the name and callback function of the indicated library menu button.
713 <number> is the index position of the button in the library menu.
714 7. renamepage <number> <pagename>
715 Changes the name and callback function of the indicated page menu button
716 <number> is the index position of the button in the page menu.
717 8. xschema true|false
718 Turns the netlisting functions on or off.
719 9. toolbar true|false
720 Turns the toolbar functions on or off.
722 D. Command tag callbacks: These functions are attached to specific xcircuit
723 commands using the "tag" command, and execute after the tagged
724 command has executed. This keeps the GUI synchronized with commands
725 called from the command-line.
727 1. pageupdate [subcommand]
728 Updates the file output window to match the current page status.
730 Updates the schematic and symbol buttons, and the netlist menu
731 options, to match the current page.