Coordinate Systems
We now consider the question of a coordinate system within which to describe picture position. The actual display generation hardware in a terminal has a fixed coordinate system (commonly 1024 by 1024 units on a fixed size screen with the origin 0,0 in the left hand corner or center on the screen). Ultimately, the user wants to work on a virtual screen much larger than the hardware screen and wants to consider the hardware screen as a window that he can move around to view this virtual screen. Further, pictures are to be capable of being constructed out of subpictures as in the example of Figures 1 and 2. To be able to accomplish the latter and allow future expansion to allow the former, the following coordinate system conventions are used.
Each node has its own coordinate system. When a node A is created, the picture-drawing CRT beam is assumed by the programmer to be at the origin of the node's coordinate system. When a node is used within a node B by use of a branch, the positioning of node A is relative to the beam position in the coordinate system of node B. All nodes are positioned relative to each other by x, y positioners in the corresponding branches. When a picture is actually to be displayed, one node is indicated to the system as the initial or Universe Node. This initial node is positioned absolutely on the screen and all other nodes appear relative to this one as specified in the branches pointing to them. This scheme is required to give the flexibility and generality required in the picture-subpicture tree.
Logical Completeness of Operation Set
Throughout the system design one should try to follow the philosophy of incorporating a logically complete and consistent set of operations. In particular, for each call that sets a value there should be another call to fetch the value. That is, for each operation there is an inverse operation whenever it is meaningful to have one. We see a need for a basic system with the calls as primarily primitives. One can incorporate calls that could be created by the programmer from other calls, when it is felt that usage would warrant the expansion. We would expect a library of higher level routines in the language.
It is beyond the scope of these notes to go into all the calls required except to indicate a few basic ones. For structure creation, one needs to be able to create a node or branch, delete a branch, add a new branch to a node at run time.
One needs to be able to specify beam movements in nodes and place text in nodes with the normal write-format statements of the host programming language. This latter point is very important for easy programming.
One needs to be able to set and test parameters and convert one form of name into others.
We discuss Attention handling in more detail because of its importance in making interactive programming easy.
Attention Handling
The user sitting at the console is operating in real time while the application program is operating in timesharing time. At any point where the user may perform some operation at the console, the application program may not be running. A mechanism must be created to communicate between the user and the application program. The design of this mechanism is very important and must be carefully considered. There are many different operations that one might want to provide the user at the console. A basic mechanism is discussed which will allow others to be added in the future. When the application program gets to a point where it is expecting input from the terminal, it issues a call and passes an array as an argument. The Attention handling mechanism dismisses the program until an event is reported from the console. The information passed back to the application is the type of event which occurred and other relevant information for that event.
On refreshed displays a common input device is the light pen. The light pen has a physical field of view of about a 1/8-1/4 inch circle. The most common use of the light pen is to point at an object to be hit or picked. The logical field of view seen by the user is a branch in the node-branch structure. The picture drawn by the structure below the branch is blinked to give feedback to the user about what object he is going to hit or operate upon. The level in the structure at which the logical view is given can be set under program control or adjusted by the user from the keyboard. When the user obtains feedback indicating the correct object is in view, he then presses a button on the light pen to generate an Attention. He is said to obtain a "structural bit" at a branch at the level in the node-branch structure set by the application program or by himself. When the hit occurs, appropriate information is then entered into the Attention queue as described below.
The other type of graphical input device commonly in use on both refreshed and non-refreshed displays, such as electronic pen-tablets, Joy Sticks, SRI Mouse, etc., produce x, y position information which is fedback to the screen as some sort of cursor, such as a dot or a cross. It is difficult, if not impossible, without special hardware to provide the kind of feedback possible with the light pen, but structural hits can be generated by the use of special hardware or software. These devices require the application programmer to set the appropriate level for an expected hit.
The level of a structural hit is counted up from the bottom of the node-branch structure. A hit at level 1 is the lowest branch presently in view. A hit at level 0 is a hit on an individual vector or group of characters. Only special programs, such as a picture editor, are likely to obtain hits at level 0.
The Attention type obtained when one gets a structural hit on a branch returns the following information: The information returned in the array is that required by the application program, the Display Pointer, the Light Button Code, and x, y, information. The x, y, information returned is not the absolute x,y pen position because this would not be of use on this type of hit. The x, y information returned is the physical beam position just before execution of the branch which was hit. If one wants the physical location of the node origin to which the hit branch is connected, one executes another call to obtain the branch positioner and adds these values to the corresponding values obtained from the hit. Given the Display Pointer, one can obtain the Back Pointer or other parameter values associated with the given branch call.
The attention type obtained when a hit is generated, but no object is in view, is now discussed. This type of attention is called a null attention. It is used frequently to position objects on the screen. The only information returned in the array is the absolute screen coordinates of the position on the screen of the graphic input device or cursor. This information can be converted into relative information for placement in a branch positioner or for incrementing a branch position when an object is being moved.
Other calls are required to obtain information about other branches which are related to the one hit, and to perform other functions.