📄 rfc192.txt
字号:
NAMING A number of different naming conventions are required to meet system and application programmer needs. The Display Pointer Nodes and branches in the system are named by assigning an integer or array location as an argument in the call used to create them. The system places in these variables a number which points to the physical location of the branch or node position in the picture-subpicture data structure. We call this name the DISPLAY POINTER. As long as the user does not change the contents of these variables he can refer to particular nodes or branches in various subroutines by use of these integer variables as arguments. In other words, to the user, the name of a picture or subpicture can be thought of as the variable used at the time of its creation. Such a naming scheme is clearly required if pictures or subpictures are to be manipulated by the programmer.Watson [Page 10]RFC 192 Some Factors which a Network Graphics 12 July 1971 The Light Button Code Additional identification is useful to the application programmer in order to simplify his programming task. A user has no control over the number assigned by the system to a Display Pointer. There are situations in which the user would like to associate a particular known number with a branch. One common example is in the use of "light buttons". A light button is a displayed object that the user wants to be able to point at in order to command the controlling application program to do something. A light button is commonly a string of characters forming an English word or words, but could be any picture. When the user picks or hits the light button, information identifying the object must be transmitted to the timesharing application program. The program must then branch to an appropriate statement or subroutine to perform the operations required to execute the command. The Display Pointer uniquely identifies the object hit, but because its value is not under the programmers control, writing the code necessary to test it against the various Display Pointers considered legitimate to be hit at this point in the program is tedious. If, however, the application programmer knew that at this point only objects with identification numbers 20-28 were legitimate to be hit, then testing to see that one was in this range and branching by use of a computed GOTO simplifies the programming of flow of control. Often one does not need unique identification of an object, but wants to perform a certain action if any object in a class of objects is hit. The above need for identification is satisfied by allowing the application programmer the ability to assign a number, not necessarily unique, to a branch. This number is called the Light Button Code. This code can be used in any way the programmer desires, but is most commonly used, as its name implies, as a code identifying light buttons. This number is sent to the application program along with the Display pointer of the object hit on the screen with a graphical input device. The Back Pointer We indicated earlier that it is required in interactive graphic programming to be able to associate application oriented data with picture and subpicture objects on the screen. The data may be stored in many kinds of data structures depending on the nature of the application, examples being arrays, lists, trees, etc. We meet the need by associating with each branch one word which could contain a pointer to the appropriate spot in the application data structure containing the data associated withWatson [Page 11]RFC 192 Some Factors which a Network Graphics 12 July 1971 the branch. We call this word the Back Pointer. The application programmer can in fact store any code he desires in this word and use it in any way desired, but its common use as a pointer back into a data base in the application program dictated its name. For example, consider an application which would allow a chemical engineer to draw a chemical flow sheet on the screen and then input this flow sheet into a process calculation system. There will be various symbol-pictures on the screen representing basic process units such as heat exchangers, mixers, columns, and so forth that can be copied and positioned on the screen. These units will have to be connected together by streams. The units and the streams will have names and data associated with them describing their contents and properties. Further, the node-branch structure. while visually indicating to the user what units are connected together and how, does not necessarily have the connecting information in a form easily handled by the application program. The continuity is best represented by a data structure using simple list processing in which each unit and stream has a block of cells associated with it containing data for it and pointers containing the connectivity information. When a branch is created to position and display a unit, it will contain in the Back Pointer a pointer to the block of data associated with it. The block of data will probably contain the Display Pointer for the associated branch so that one can go from the picture to the data block or from the data block to the picture. For example, one may point at a unit for the purpose of deleting it. Given the Back Pointer of the unit hit, one can find its associated block and return that block to free space. One can then follow the appropriate chain of pointers to the blocks for the streams connected to the unit. In these blocks one has the Display Pointers for the branches displaying the stream and can then delete it from the node- branch structure, thus making it disappear from the screen. An additional form of name is to allow the programmer to store an alphanumeric string with each branch or node. This form of name is not required for most applications, but can be useful with the picture editor. To review, each node and branch has associated with it a unique identifier named by the user and called the Display Pointer; its value is assigned by the system. Each branch has two additional pieces of information which can be assigned to it by the programmer, called the Light Button Code and Back Pointer.Watson [Page 12]RFC 192 Some Factors which a Network Graphics 12 July 1971 Given a Display Pointer for a branch, the programmer can obtain the Light Button Code or the Back Pointer for the branch. Given a Light Button Code or the Back Pointer, the programmer can obtain a Display Pointer for a branch with such a code. This display pointer may not be unique if several branches have the same Light Button Code or Back Pointer. The above naming and identification inventions have proven to be easy to understand and yet completely general and easy to use.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 isWatson [Page 13]RFC 192 Some Factors which a Network Graphics 12 July 1971 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 toWatson [Page 14]RFC 192 Some Factors which a Network Graphics 12 July 1971 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,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -