XCircuit Reference Manual


(Page under construction)

Table of Contents

XCircuit Keyboard and Menu Commands

XCircuit internal structure
XCircuit files
Python Embedded Interpreter Reference
XCircuit PostScript Reference

XCircuit Menu and Keyboard Commands

Comments about notation: Keyboard single-key macros for commands, if available, are listed in parentheses after the command name. Menu buttons, if available, follow in italics. The menu button is given as a list of submenu names to traverse separated by arrows ("->"); multiple choices are denoted by separating the choices by a vertical bar ("|").

Element construction

Creating new objects

Creating and Editing text

Element editing

Unless otherwise stated, all of the commands below have the following behavior which depends on the way they are called:
Menu button: The user is prompted to click mouse button 1 or 2 on the object upon which to perform the command. If an element or elements are already selected, they will also be acted upon by the command. Mouse button 3 will cancel the command.
Keyboard macro: If an element or elements are already selected, the macro will act upon them. Otherwise, the program will look for any elements close to or underneath the cursor, select them, and perform the function upon them. If no appropriate element is found near the cursor, then the command is ignored.

Editing arcs, polygons, and curves

Library creation and editing

XCircuit Viewing Options

XCircuit Options

Loading and Saving files

The following commands are available from the menu for loading and saving files: The following are properties of each xcircuit page. Note that all page properties are independent of the xcircuit window view, which is why they are all listed in this popup window. Properties for each page are set independently of all other pages.

The XCircuit Command Line ("%")

XCircuit has a (partially implemented) command-line feature intended to duplicate the menu and keyboard functions in xcircuit. A command line can be executed in three different ways:
  1. Read as part of the .xcircuitrc file on program startup
  2. Read as part of an executable script run from the menu selection File->Execute script
  3. Entered directly into the message window as a result of typing the "%" key macro.
The command line functions are written in Python, if Python has been compiled into xcircuit. Whether this is true is indicated by the command-line prompt when the '%' macro is chosen, which is a question mark ('?') if the interpreter is the old-style xcircuit interpreter, and the usual Python prompt ('>>>') if the interpreter is Python. The old xcircuit command line syntax is as follows: The Python command line syntax accepts any valid Python code. Special functions in the embedded interpreter, imported as a module, link the Python interpreter to internal xcircuit variables. These special commands are summarized in The Python Interpreter page.

Note on Key Bindings: The new key bindings scheme includes a difference from the original behavior. Originally, the BackSpace and Delete keys were both interpreted as "Delete". In the new key bindings scheme, only Delete deletes the previous character, while BackSpace acts like the left arrow cursor (moves one space to the left). If you prefer the original behavior, it can be emulated with the following commands (Python version) (to be put, for instance, in your home .xcircuitrc file):

unbind("BackSpace", "Text Left")
bind("BackSpace", "Text Delete")

Exiting XCircuit

Beginning with XCircuit version 2.3.4 rev. 4, the method to prevent accidental exit (the use of the sub-menu selection "Quit->No Kidding") has been replaced with a check for unsaved changes. If any changes have not been saved, XCircuit will prompt the user for confirmation to exit.

XCircuit Structure

Types of elements

A summary of the syntax for all element types in the PostScript output file can be found here: XCircuit PostScript reference.

Selection of elements


Color Allocation and Color Inheritance


Memory buffers and their use


The Message Windows


XCircuit-Related Files

Xcircuit X-Defaults

Xcircuit configuration file (.xcircuitrc)

If a configuration file named ".xcircuitrc" exists in the current working directory (first place searched) or the user's home directory (second place searched) or the xcircuit library directory (last place searched), it will be loaded on startup. The syntax of the .xcircuitrc file is the same as an executable xcircuit script or command-line entry, and is described in the section "The XCircuit Command Line".

In addition to the configuration and X-defaults, some XCircuit behavior can be modified through shell environment variables. The environment variables which xcircuit makes use of are listed below:

TMPDIR
Directory for temporary (e.g., backup) files (defaults to TEMP_DIR).
XCIRCUIT_LIB_DIR
Directory where xcircuit libraries and startup files can be found (defaults to BUILTINS_DIR).
XAPPLRESDIR
Directory where the xcircuit application defaults can be found (defaults to RESOURCES_DIR)
HOME
Directory where xcircuit will look for startup files, after searching the current directory.
HOST, HOSTNAME, USER
Environment variables which xcircuit uses to fill in header information in the PostScript output (HOST and HOSTNAME are equivalent).

PostScript prologue:

System startup files:

The difference between ".xcircuitrc" and "startup.script" in the library is that ".xcircuitrc" will be overridden if a file of the same name exists in a user's current working directory or home directory. "startup.script" always runs, although default libraries and fonts listed therein can be forcibly ignored by the user with the "override" command. Thus, it is recommended that "startup.script" restrict itself to loading fonts and libraries, and that ".xcircuitrc" be used for all other commands, unless the administrator has totalitarian tendencies and wishes to force a consistent interface among users, such as for an instructional course.

Standard xcircuit library files

The following files are loaded by default. The remaining files are put in the system library for access if warranted; they may be added, for instance, to the system "startup.script" file.

Standard xcircuit font vector files

As listed for automatic loading in the default startup script.

Standard xcircuit font encoding files

As listed for automatic loading in the default startup script.

Extended xcircuit font encoding files

Extends the fonts for ISO-Latin2 (Eastern Europe) and ISO-Latin5 (Turkey). I can generate new encodings for the remainder of the ISO-Latin set, but will not do so until I receive a request. These files are made available in the xcircuit system library, but are commented out of the default startup script.
PostScript is a registered trademark of Adobe, Inc.

Back to the xcircuit home page. . .

email: tim@bach.ece.jhu.edu