TABULATING SYSTEM

Abstract: The described embodiment provides listing control on a cathode ray tube (CRT) display for simultaneously drawing horizontal and vertical grid lines within a rectangular box displayed on the CRT screen by moving a cursor to the in­ tersection point of these grid lines and by pressing an ENTER key. The embodiment uses a current position counter (9), a starting point counter (7) and an ending point counter (8) to selectively set flag bits (H, V) for horizontal and vertical grid lines stored in a logical page buffer (11) so that the horizontal and vertical grid lines passing through the intersection point can be simultaneously displayed on the CRT screen. The em­ bodiment uses the counters to define two end points on a diagonal line of the rectangular box and to define the inter­ section point within the rectangular box, whereby the flag bits are selectively set in accordance with the contents of these coutners.

Description: The present invention relates to a tabulating system in a word processor or the like having a display, and more particularly to a tabulating system that enables to draw vertical and horizontal grid lines with less movements of a cursor than in a tabulating system known from the prior art. From US-A-4 302 755 there is known a visual display unit for a programmable computer. This display unit provides for the distinguishing of the points of particular interest on the screen using a clearly visible marker consisting of two orthogonal cartesian axes. The marker can be positioned using a program or suitable keys. No character boxes are foreseen for display of characters. Moreover the marker cannot be used to create a grid of lines. There is a prior tabulating system described in JP-A-58 4432 of Fujitsu wherein two points are specified on a diagonal line of a rectangular box as a start and an end point by a cursor to draw the rectangular box surrounding a table on a screen of a display. Although this tabulating system enables to draw the rectangular box only by specifying two points with the cursor, it is required to specify respective start and end points of vertical and horizontal grid lines with the cursor when they are successively drawn in the rectangular box. Therefore, there is inconvenience to the operator in operation because it is required to move the cursor from the top end to the bottom end of the box, or the left end to the right end again and again. It is therefore an object of the present invention to provide an improved tabulating system that is designed to draw a vertical and a horizontal grid lines simultaneously by specifying a single point with the cursor in a rectangular box drawn on a screen of a display to eliminate such disadvantage of the conventional tabulating system. To this end, the tabulating system according to the invention comprises a key entry means, a display having a plurality of character boxes on a display screen, a memory means having a plurality of adressable memory locations at least corresponding to said character boxes, each of the locations storing flag bits for vertical and horizontal grid lines as part of attribute codes indicating display conditions of a corresponding character box, a current location counter for storing both of current horizontal and vertical locations of a cursor, a start point counter for storing both of horizontal and vertical locations of the cursor at a start point when one of two end points on a diagonal line of a rectangular box to be displayed on said display screen is specified as the start points by said key entry means, an end point counter for storing horizontal and vertical locations of the cursor at an end point when another point of said end points is specified as the end point by said key entry means, and a control means for selectively setting said flag bits according to contents of said current location counter, said start point counter and said end point counter so that, when a point in said rectangular box is specified as an intersection point by said key entry means, vertical and horizontal grid lines passing through said intersection point are displayed on said display screen within said rectangular box. In advantageous manner the present invention solves the above mentioned object and enables to draw a vertical and a horizontal line simultaneously only by specifying a single point, the intersection of both lines, in a rectangular box with the cursor, and allows to efficiently create a table in a word processor or the like. Now a preferred embodiment of the invention is described as example and referring to the attached drawing, in which Fig. 1 shows a block diagram illustrating a configuration of an embodiment of the invention; Fig. 2 shows a vertical and a horizontal line displayed at the left and the upper side of a character box, respectively, according to two attribute bits; Fig. 3 shows a pattern of a graphic cursor; Figs. 4A through 4G show the creation processes on the display screen; Fig. 5 shows a correlation of contents of the start point counter, the end point counter and the current location counter; Fig. 6 shows correspondence of the content of the line counter and the displayed pattern; Figs. 7A through 7D show flowcharts illustrating the tabulating procedures of the preferred embodiment of the invention. Fig. 1 shows schematically major components of a word processor suitable for embodying the invention. As shown, the word processor comprises a keyboard 1, a controller 2, a main memory 3, a refresh buffer 4 and a display 5 of a cathode ray tube (CRT). The keyboard 1 has a conventional configuration, and has a number of character entry keys and function keys. The function keys include a grid line mode key specifying grid line mode, a cursor movement key specifying the direction of cursor movement, an enter key used for specifying the start point, the end point and the intersection point of grid lines, description of which is omitted because they are well known in the art. The controller 2 processes data supplied from the keyboard 1 according to a program that is stored in a program area 10 of the main memory 3, and includes a processor 6 and counters 7 - 9 for storing information on the locations of the cursor. The location information of the cursor stored in the counters 7 - 9 is updated by the processor 6 according to keying of the cursor movement key on the keyboard 1. Operation relating to these counters 7 - 9 is described later in detail. A logical page buffer 11 provided in part of the main memory 3 has a plurality of memory locations at least corresponding to the number of character boxes on the screen of the display 5, and stores character information and control information supplied from the keyboard 1 in a predetermined format under control of the controller 2. In other words, each memory location in the logical page buffer 11 stores a character code representing a character or a symbol to be displayed on the screen of the display 5, and an attribute byte representing an attribute (reverse, highintensity, cursor, etc.) of said character or symbol in a pair. However, it is assumed for convenience of the description that a vertical grid line (V) bit and a horizontal grid line (H) bit that are part of the attribute byte are stored on separate line counters 12. The refresh buffer 4 has a plurality of memory locations corresponding to the number of character boxes on the screen of the display 5. Each of these memory locations stores a character code representing a character or a symbol to be displayed in each character box, and an attribute byte for the character code in a pair. In this embodiment, it is assumed that a vertical line and a horizontal line can be independently displayed at the left side and the upper end of a character box, respectively, by using the vertical grid line (V) bit and the horizontal grid line (H) bit in the attribute byte (see Fig. 2). However, the character boxes indicated by dotted lines in Fig. 2 are not usually displayed. Now referring to Figs. 3 and 4A through 4G, it is described what display is performed on the screen of the display 5, and then the details of each component shown in Fig. 1 are described. When the operator presses the grid line mode key on the keyboard 1, a grid line specifying menu is displayed on the screen of the display 5. Then, when a tabulating mode is selected on the menu, the word processor enters into the tabulating mode. In this case, a graphic cursor as shown in Fig. 3 is displayed on the screen of the display 5. The operator moves the graphic cursor to a desired location on the screen by pressing the cursor movement key, and specifies the start point and then the end point of a grid line, respectively, by pressing the enter key on the keyboard 1. When it is intended to draw a rectangular box, the start point of the grid line may be any one of the upper left, the lower left, the upper right or the lower right corners of the box. A point on a diagonal line opposing to the start point becomes the end point. In other words, one of two end points of a grid line to be displayed that is first specified is the start point, while the end point that is specified later is the end point. In the following, it is assumed for convenience of the description that the upper left corner of the rectangular box is specified as the start point. In that case, the end point is specified by moving the graphic cursor to the right or the bottom of the rectangular box. The function up to now is same as that in the conventional tabulating system. Then, the operator presses the cursor movement key to move the graphic cursor to a point within the previously specified rectangular box, and presses the enter key to specify it as an intersection point of a vertical and a horizontal grid line to be drawn in the box. This operation is continued until the operator stops (for example, by pressing a cancel key on the keyboard 1). To understand the above operation more clearly, it is described in more detail by referring to an example shown in Figs. 4A through 4F. This example is to finally display a table as shown in Fig. 4G. First, the operator moves the graphic cursor to the location of the upper left corner of a rectangular box not yet displayed on the screen, and presses the enter key to specify that location as the start point (see Fig. 4A). It is noted that dotted lines in the figure indicate the character boxes. Then the graphic cursor is moved to the lower right corner of the rectangular box, which is specified as the end point by pressing the enter key in the same manner as in the above (see Fig. 4B). Thus, the rectangular box is immediately displayed on the screen (see Fig. 4C). The graphic cursor is then moved to a point within the box, which is specified as an intersection point by pressing the enter key (see Fig. 4D). This causes a vertical line and a horizontal line passing through the intersection point to be immediately displayed in the rectangular box (see Fig. 4E). The desired table as shown in Fig. 4G is formed on the screen by successively moving the graphic cursor as in Fig. 4F, and correspondingly specifying intersection points. To display the grid lines as above, the controller 2 in Fig. 1 uses the following counters: Start point counter (Sx, Sy) 7 End point counter (Ex, Ey) 8 Current location counter (Cx, Cy) 9 Line counters (H, V) 12 The script "x" in the first three counters indicates the number of column from the left end of a logical page stored in the logical page buffer 11, while "y" indicates the number of row or line from the start line of the logical page (see Fig. 5). A pair of line counters 12 are used for each of displayed lines, and one of the paired counters 12 contains the horizontal grid line bit H = 1 if it is required to display a horizontal line at the upper end in each character box for corresponding displayed lines, or the other of the paired counters 12 contains the vertical grid line bit V = 1 if it is required to display a vertical line at the left end (see Fig. 6). Now the tabulating procedure according to the invention is described in more detail by referring to Figs. 7A through 7D. First when the operator presses the grid line mode key on the keyboard 1, it causes the processor 6 in the controller 2 to start the program stored in the program area 10 of the main memory 3 to display the grid line specifying menu on the screen of the display 5 (Step 20). When the operator selects the tabulating mode on the menu, the word processor enters the tabulating mode. Then pressing the cursor movement key on the keyboard 1 updates content of the current location counter 9 according to the moving direction of the graphic cursor under control of the processor 6. In this case, when the operator specifies the start point by pressing the enter key at a desired location, content of the current location counter 9 indicating the cursor location at that moment is set in the start point counter 7 (Step 23). Then when the end point is specified, content of the current location counter 9 indicating the cursor location at that moment is set in the end point counter 8 (Step 26). Succeedingly by calling S1 routine of Fig. 7C (Step 28), contents of the line counters 12, corresponding to each of line Sy to line Ey in the logical page buffer 11, are separately set. That is, all H bits for columns Sx to Ex - 1 are set to be on in the line counters 12 corresponding to two lines of Sy and Ey (Steps 38 and 42), and two V bits for columns Sx and Ex are set to be on in the line counters 12 corresponding to all lines from Sy to Ey - 1 (Steps 43 and 44). It is noted that "N" and "M" in Steps 37 and 39 of Fig. 7C indicate work areas in the main memory 3 that are used for S1 routine. The processor 6 in the controller 2 takes out the H and the V bits set in each of the line counters 12 by a grid line creating program, and selectively sets the attribute bits representing the left vertical line and the upper horizontal line of each character box at the corresponding attribute byte locations in the refresh buffer 4 (Step 29). Thus, the rectangular box as shown in Fig. 4C is displayed on the screen. Up to this stage, the procedure is the same as that of the conventional tabulating system. Then, when an intersection point is specified as shown in Fig. 7B, if the content (Cx, Cy) of the current location counter 9 indicating the cursor location at that moment satisfies Sx ≦ Cx ≦ Ex and Sy ≦ Cy ≦ Ey (Step 33), or if the graphic cursor indicates the rectangular box or the inside thereof, the contents of the line counters 12 corresponding to each of lines Sy to Ey in the logical page buffer 11 are updated by calling S2 routine of Fig. 7D (Step 34). The S2 routine sets all H bit for columns Sx to Ex - 1 to be on in the line counter 12 corresponding to line Cy (Steps 48 through 52), and sets V bits for column Cx to be on in the line counters 12 corresponding to all lines from Sy to Ey - 1 (Steps 53 and 54). Then, the processor 6 in the controller 2 takes out the content of each line counter 12 set as described above, and selectively sets the attribute bits representing the left vertical line and the upper horizontal line of each character box to be on at the corresponding attribute location in the refresh buffer 4 (Step 35). By repeating Steps 31 to 35, the table as shown in Fig. 4G is ultimately displayed on the screen. If an intersection point is specified to be Sx = Cx or Ex = Cx, only a vertical line is drawn in the rectangular box, while, if it is specified to be Sy = Cy or Ey = Cy, only a horizontal line is drawn in the rectangular box. As described, the invention enables to draw a vertical and a horizontal line simultaneously only by specifying a single point, the intersection of both lines, in a rectangular box with the cursor, and allows to efficiently create a table in a word processor or the like.

Claims: A tabulating system comprising: an entry means (1); a display (5); a memory means (3) having a plurality of addressable memory locations, characterized in that said display (5) has a plurality of character boxes on a display screen, said plurality of memory locations corresponds to said character boxes and each of said memory locations stores flag bits (H, V) for vertical and horizontal grid lines as part of attribute codes indicating display conditions of a corresponding character box; a current location counter (9) stores both of current horizontal (Cx) and vertical (Cy) locations of a cursor; a start point counter (7) stores both of horizontal (Sx) and vertical (Sy) locations of the cursor at a start point when one of two end points on a diagonal line of a rectangular box to be displayed on said display screen is specified as the start point by said entry means (1); an end point counter (8) stores horizontal (Ex) and vertical (Ey) locations of the cursor at an end point when another point of said end points is specified as the end point by said entry means (1); and a control means (2) selectively sets said flag bits (H, V) according to contents of said current location counter (9), said start point counter (7) and said end point counter (8) so that, when a point in said rectangular box is specified as an intersection point by said entry means (1), vertical and horizontal grid lines passing through said intersection point are displayed on said display screen within said rectangular box. A tabulating system according to claim 1, characterized in that said control means (2) limits the extent of said horizontal and vertical grid lines to the confines of said box. A tabulating system according to claim 1 or 2, wherein said box is displayed on said display screen. A tabulating system according to any one of claims 1 to 3, wherein said control means (2) is set in to operation when said intersection point coincides with the upper or lower edges of said square box to display a vertical grid line, and when said intersection point coincides with left or right edges of said square box to display a horizontal grid line, and when said intersection point is located interiorally of said box to display both vertical and horizontal grid lines. A tabulating system according to any one of claims 1 to 4, wherein memory means (3) is operative to retain said flag bits so as to build up a succession of said grid lines on said display screen by iterative operation of said control means (2). Method for creating and displaying horizontal and vertical lines on a display unit of a word processing system or the like, especially as defined in any one of the preceding claims 1 to 5, characterized in that within a displayed rectangular box said box being of variable size, the intersection point of said horizontal and said vertical line is pointed to by a cursor, marked by pressing an entry key and both lines are thus simultaneously created and displayed within said box.

Inventors: KOJIMA, MASAKO
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1985
Main classification: G09G1
IPC codes: G09G1, G06F17, G06F3, G06T11, G09G5