Figure editing apparatus

Abstract: A figure editing apparatus for editing figure sets each comprising a set of a plurality of basic figures includes a first memory for storing, in correlated form, each figure set and the plurality of basic figures constituting the figure set, a second memory for storing, in correlated form, each figure set and an area corresponding to the figure set, a third memory for storing, in correlated form, the basic figures and areas corresponding to the basic figures, and an adding/deleting unit for designating an area corresponding to a figure set or basic figure, thereby adding a basic figure to or deleting the basic figure from the first memory. The editing of figure sets, each of which comprises a set of a plurality of basic figures, and particularly the editing of a graphical program, is simplified.

Description: This invention relates to a figure editing apparatus and, more particularly, to a figure editing apparatus capable of editing a graphical program by using a two-dimensional display. A conventional figure editing apparatus is available in which figures such as rectangles and circles and character sequences are edited and displayed on a two-dimensional display unit. By using such an apparatus, it is possible to designate editing of individual basic figures. In addition, basic figures can be divided into groups and then editing can be designated for each group. The operation involved in editing groups is especially effective in moving and copying, and the editing designation itself is simpler than an operation in which the individual basic figures are manipulated one at a time. Another advantage is that the two-dimensional relationship of the individual basic figures can be maintained. In manipulating groups, it is necessary to designate grouping, cancel the designation, etc., before performing such figure editing operations as the moving, deleting and copying of the figures that have been grouped. In particular, if a designation cannot be made in a rectangular area, it is required that the basic figures be designated one by one. In a case where a graphical program is edited by the above-described figure editing apparatus, the following problems arises: In general, many programming languages having a structure dictated by the character of the particular language. For example, a program is composed of a collection of statements, and each statement comprises a number of structural elements. Accordingly, in a program to be edited by the editing apparatus, some of the node symbols have a plurality of variable attributes. When a plurality of variable attributes are attached to a node as a character string, it becomes difficult to understand the structure of the program at the display stage and, at the same time, the operations for deleting, moving and copying parts of the program structure entail editing of the character strings. Consequently, operation is troublesome and complicated. On the other hand, if the variable attribute portions are registered as new node symbols, the operation for editing individual attributes is simplified. However, when editing is applied to the entirety of a node having attributes attached thereto, this entails a grouping operation, which is a troublesome task. An article in IBM Technical Disclosure Bulletin, Vol. 29, No. 4 September 1986, pages 1739 to 1741 discloses a figure editing apparatus in accordance with the preamble of the claims wherein a figure displayed can comprise a group formed of sub groups and/or basic objects. In order to select a basic object in a group, it is necessary to select the group and step through the hierarchical structure by repeated selection. US-A-4831580 discloses a technique for automatically generating a program based on a flow chart of a series of sequence control processes. There is no grouping of basic objects disclosed in this patent. Accordingly, an object of the present invention is to provide a figure editing apparatus adapted to simplify the editing of a figure set, which comprises a set of a plurality of basic figures, and preferably the editing of a graphic program. According to one aspect the present invention provides a figure editing apparatus for editing displayed figure sets, each figure set comprising a set of a plurality of basic figures, the apparatus comprising: designating means for designating a display position; editing means for editing a figure set or basic figure in response to the designation of a display position by said designating means; characterised in that a display area corresponding to each figure set and a display area corresponding to each of the plurality of basic figures constituting the figure set are distinct, and said editing means is adapted to edit an entire figure set or each basic figure corresponding to an area which includes the designated display position. According to a second aspect the present invention provides a method of editing displayed figure sets, each figure set comprising a set of a plurality of basic figures, the method comprising the steps of: designating a display position; and editing a figure set or basic figure in response to the designation of a display position; characterised in that the display area corresponding to each figure set and a display area corresponding to each of the plurality of basic figures constituting the figure set are distinct, and an entire figure set or each basic figure corresponding to an area which includes the designated display position is edited in response to the designation of the display position. In a preferred arrangement, basic figures can be added to or deleted from a set of figures very easily, and attributes also can be added and deleted easily, all without grouping. In particular, in the editing of a graphical program, a node generated from a node symbol having subnodes can be edited, as by node movement, deletion or addition, and the editing operation for the overall node inclusive of subnodes can be performed easily without grouping. Thus, in accordance with the present invention, there is provided a figure editing apparatus and method adapted to simplify the editing of figure sets, each of which comprises a set of a plurality of basic figures. Embodiments of the present invention will now be described with reference to the accompanying drawings, in which: Fig. 1 is a block diagram illustrating the construction of a graphics editing apparatus according to an embodiment of the present invention; Fig. 2 is a diagram showing the structure of a node-symbol storage area within a memory; Fig. 3 is a diagram illustrating an example of a display on the screen of a display unit; Fig. 4 is a diagram showing, in greater detail, nodes to be edited, the nodes being located in a program editing area shown in Fig. 3; Fig. 5 is a flowchart showing a processing procedure whereby attributes are assigned to node symbols; and Figs. 6 and 7 are flowcharts showing processing procedures for editing nodes. Fig. 1 is a block diagram showing the construction of a figure editing apparatus according to an embodiment of the present invention. As shown in Fig. 1, the apparatus includes a processing control unit 1 for controlling the figure editing operation of the apparatus, a display unit 2 for displaying edited figures and menus, a memory 3 capable of being referred to, and in which data can be stored, by the processing control unit 1, an input unit 4 such as a keyboard for entering character information or control information, and a two-dimensional position designating unit 5, such as a mouse, for designating specific positions on the display screen of the display unit 2. The memory 3 has a work area 3a, a control-procedure storage area 3b for storing the control procedure shown in Fig. 3, a node-symbol storage area 3c for storing node-symbol attribute information shown in detail in Fig. 4, and a program-information storage area 3d for storing structural information relating to a program to be edited. Input signals from the input unit 4 and two-dimensional position designating unit 5 are stored in the memory 3 through the processing controller 1. Fig. 2 is a diagram showing the structure of the node-symbol storage area 3c. As shown in Fig. 2, the node-symbol storage area 3c stores a node-symbol name 21, a minimum number 22 of subnodes contained in a main node, a maximum number 23 of subnodes contained in the main node, main-node size 24, subnode position 25, subnode size 26, and graphics information 27 relating to the node symbol. Fig. 3 is a diagram showing an example of a display on the display screen of the display unit 2 in a case where figure editing is performed by the figure editing apparatus of this embodiment. Numeral 7 denotes an area capable of displaying a full screen. The area 7 contains an editing display area 8, which is for editing a program, and an area 9 for displaying and selecting all node symbols. The area 9 contains individual node symbols 10. Numeral 11 denotes one node generated in the program editing area 8 on the basis of a node symbol. Numeral 12 denotes an editing selection menu displayed temporarily when an editing operation is performed. Numeral 13 denotes a display selection area for designating processing of a graphical program undergoing editing. Fig. 4 is a diagram showing the vicinity of node 11 (Fig. 3) in greater detail. Illustrated in Fig. 4 are a node-occupied area 41 for a node not having subnodes, and node-occupied areas 42, 46 occupied by nodes capable of possessing subnodes. Also shown are a main-node-occupied area 43 contained in the area 42 and occupied by a main node, a subnode-occupied area 44 contained in the area 42 and occupied by all subnodes of the corresponding main node, and individual subnode areas 45 contained in the subnode-occupied area 44. In Fig. 4, a simple branch node is illustrated as the node not having subnodes. Illustrated as nodes having subnodes are a multiple-branch node and a function-calling node, which is capable of assigning an argument. With regard to the multiple-branch node, the main-node portion thereof is an area in which a variable for discriminating the branch condition is written, and each subnode portion is an area in which a condition value is written. In the example of Fig. 4, a = a+1 is executed if the value of the variable "switch" is "1"; b = b-1 is executed if the value of this variable is "2"; and so on. Thus, two or more branching operations are performed depending upon the value of "switch". The function-calling node has the function name written in the main-node portion, and has zero or more arguments written in the subnode portions. Thus, the node is for calling a function. The operation of the graphics editing apparatus of this embodiment will now be described in accordance with the flowcharts of Figs. 5 through 7. First, prior to a graphics editing operation, the information shown in Fig. 2 is inputted to and preserved in the node-symbol storage area 3C of memory 3 in accordance with the procedure shown in Fig. 5. The above information is entered for each node symbol. At step S51 of the flowchart, a message appears on the display unit 2 and inquires as to how many subnodes a node symbol is capable of possessing besides a main node. In response, the operator uses the keyboard 4 to enter the minimum and maximum numbers of subnodes. Next, the size of the area occupied by the main node on the display unit 2 is entered at step S52. It is determined at step S53 whether the maximum number of subnodes is zero or not. If the number of subnodes is not zero, the program proceeds to step S54, at which the coordinates of the upper left corners and sizes of areas of the subnodes are entered. Each of these items of data is preserved in memory in the form shown in Fig. 2. When graphics editing processing starts, the screen for program editing shown in Fig. 3 is displayed and then the system waits for the operator to enter a command designating the editing operation. In order to generate a new node in area 8 (Fig. 3), one of the node symbols in area 9 is selected by the two-dimensional position designating unit 5, and a position for this node is designated that will not overlap the other nodes in area 8. The function for generating a new node utilizes the information in the program-information storage area 3d as well as the node symbol information shown in Fig. 2. This function is implemented through the control procedure shown in the flowchart of Fig. 6. Though this procedure has no direct bearing upon the problem which the present invention attempts to solve, it will be described in brief. First, at step S61 of the flowchart, the designated position is detected to obtain coordinates (x,y). Next, at step S62, it is determined in which rectangular area on the screen the position at coordinates (x,y) resides. If the area is found to be an area occupied by an already existing node in the graphical program area 8, the program proceeds from step S63 to step S67, at which various types of editing processing are executed. If the area in which the position is found is the node-symbol area, the program proceeds from step S64 to step S68, at which a node is added. Thus, depending upon the area in which the designated position is found, the processing steps S65 → S69 are executed. In a case where the area designated is that for end of editing, the program proceeds from step S66 to step S70, at which processing is terminated. Next, the flowcharts of Figs. 4 and 7 will be referred to in order to describe a case in which such node-editing operations as move, delete and copy are applied to an already existing node present in area 8 of Fig. 3. Fig. 7 shows a processing procedure executed when an editing operation is applied to an already existing node. Step 71 calls for a determination as to whether an area designated for editing is a subnode area. If the area is not a subnode area, then it is determined at step S77 whether the node to be edited is one capable of having subnodes. In case of the example shown in Fig. 4, the program would branch to step S78 if area 41 were selected; to step S87 if area 43 or 46 were selected; and to step S72 if n is 1 and m is 4 when area 45 is selected. In processing executed at steps S72 - S76, the operation menu can be reduced to the two items of subnode addition and deletion, as at step S72, since it is known from step S71 that the editing operation is to be applied to a subnode. If addition is selected, the program proceeds from step S73 to step S74, at which the second through fourth subnodes are shifted downward by one space, and at step S75, a blank subnode is added as the first subnode. If subnode deletion is selected from the menu, the program proceeds from step S73 to step S76, at which the second through fourth subnodes are shifted upward by one space and the portion at which the fourth subnode was located is deleted. Similarly, since it is known from step S77 that the designated node is not a subnode, steps S78 through S86 are executed. Specifically, the operating menu is made three items at step S78, and the entire node is subjected to move, delete or copy processing. At step S87, an item for subnode addition is added to the menu to join the editing items for the entirety of the node. When this subnode-addition item is selected, the program jumps to step S74 when both n and m are 0 so that one blank subnode is added as the first subnode. When any of items 1 through 3 in the menu is selected, this means that the editing operation is to be applied to the whole node. Therefore, the editing processing of steps S81 through S83, the editing processing of step S84 or the editing processing of steps S85 and S86 is applied to the area containing the entirety of the main node and its subnodes. In accordance with this embodiment, when a graphical program is edited in the graphics editing apparatus, the number of subnodes capable of being attached besides the main node, the size of the node area and the display position thereof are added to the attributes of a node symbol which serves as a basis for generating a node that is a structural element of the program. In a case where an area selected for editing in the program area is a subnode or main node, it is determined whether the node is one capable of having subnodes attached thereto. Thus, in addition to an editing operation performed in subnode units, it is possible for the editing of an entire node inclusive of its subnodes to be performed without an operation for grouping nodes and subnodes. This makes it easy and simple to edit a graphical program possessing a structure. The present embodiment has been described in accordance with editing of a graphical program, in which particularly outstanding results are obtained. However, the invention can be applied to figures in general and is useful for editing one unified figure, which is composed of a combination of a plurality of basic figures, in units of the individual basic figures or in a unit consisting of the figure as a whole. As many apparently widely different embodiments of the present invention can be made without departing from the scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

Claims: A figure editing apparatus for editing displayed figure sets, each figure set comprising a set of a plurality of basic figures, the apparatus comprising: designating means (5) for designating a display position; editing means (1) for editing a figure set or basic figure in response to the designation of a display position by said designating means (5); characterised in that a display area corresponding to each figure set and a display area corresponding to each of the plurality of basic figures constituting the figure set are distinct, and said editing means is adapted to edit an entire figure set or each basic figure corresponding to an area which includes the designated display position. The apparatus according to claim 1 including first memory means (3c) for storing, in correlated form, each figure set and the plurality of basic figures constituting the figure set; second memory means (3c) for storing, in correlated form, each figure set and a display area corresponding to the figure set; and third memory means (3c) for storing, in correlated form, the basic figures and display areas corresponding to the basic figures. The apparatus according to claim 1 or claim 2, wherein the figure set is a node of a graphical program and the basic figure is a subnode. The apparatus according to claim 3, wherein said designating means (5) is adapted to enable a display area to which a newly added subnode can be assigned to be designated. The apparatus according to claim 3, wherein said designating means (5) is adapted to enable a maximum number of subnodes capable of being possessed by each node symbol to be designated as attributes of the node symbol. A method of editing displayed figure sets, each figure set comprising a set of a plurality of basic figures, the method comprising the steps of: designating a display position; and editing a figure set or basic figure in response to the designation of a display position; characterised in that the display area corresponding to each figure set and a display area corresponding to each of the plurality of basic figures constituting the figure set are distinct, and an entire figure set or each basic figure corresponding to an area which includes the designated display position is edited in response to the designation of the display position. A method according to claim 6 wherein each figure set and the plurality of basic figures constituting the figure set are stored in correlated form in first memory means (3c); each figure set and a display area corresponding to the figure set are stored in correlated form in second memory means (31); and the basic figures and display areas corresponding to the basic figures are stored in correlated form in third memory means (3c). A method according to claim 6 or claim 7 wherein the figure set is a node of a graphical program and the basic figure is a subnode. A method according to claim 8 wherein a display area to which a newly added subnode can be assigned can be designated. A method according to claim 8 wherein a maximum number of subnodes capable of being possessed by each symbol can be designated as attributes of the node symbol.

Inventors: KADOSAWA TSUNEAKI, KOGA EIJI, NAKAMURA TAKASHI, OZAWA KUNITAKA, WATANABE HITOSHI, KADOSAWA, TSUNEAKI, KOGA, EIJI, NAKAMURA, TAKASHI, OZAWA, KUNITAKA, WATANABE, HITOSHI
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: G06T11
IPC codes: G06F9, G06T11, G06F17