The most dominant part of the circuit editor window is the workarea which is located under the pull-down menu. The workarea is the region where the interactive layout and placement of various circuit components and elements takes place. The workarea currently provides support for the placement of components, wires, wire points, solder points, wire point labels and glue boxes. Examples of each of these elements are provided in Figure 2.2. All these elements are created and modified with the help of the toolbar, which is described later. The workarea also displays a grid which can be used by the user as an aid for aligning gates and wires. The grid lines may be turned off using the configuration dialog box mentioned in Section 2.4. Along the right and bottom of the workarea are two scrollbars which can be used to scroll the workarea region vertically or horizontally in case the circuit design is too large to be viewed all at once.
Figure 2.2: Circuit Elements
The workarea is implemented using the Tk canvas widget which is used to display 2-D structured graphics. Primitives such as lines, ovals, and text can be created and configured in several versatile ways. Like other widgets, keyboard and mouse bindings may be applied to the canvas as a whole or to items on the canvas itself. This feature of Tk can be exploited to provide more feedback for the user, thereby making the user interface easier to use. For example, when a toolbar operation is selected, the bindings on the workarea canvas are changed so that whenever the mouse pointer enters a circuit element that will be affected by the operation, the circuit element will be displayed in a different colour. This makes it easier for the user to identify the target circuit element. If the user, for instance, presses the SOLDER toolbar button, and moves the mouse pointer over the port of a component, the port will be highlighted indicating that a soldering attempt will be made when the user presses the leftmost mouse button. If the user moves the mouse pointer over a component body, however, the component body will not change colour.
During the implementation of the GUI, an attempt was made to make mouse and keyboard actions on the workarea consistent. To this end, whenever the user presses the leftmost mouse button on the workarea, the operation selected from the toolbar would be performed; pressing the rightmost mouse button or the Esc key would terminate the operation. The actions performed whenever the middle mouse button is pressed depends upon the current context and the operation selected.