Background of the Invention
1. Field of the Invention
The present invention relates to a graphic editing apparatus which displays a menu of graphic editing commands, and a method therefor. In a CAD system, a menu of graphic editing commands is displayed and a user chooses an item displayed in the menu so that an edit command of the selected item is carried out. Thus, it is possible to use a number of CAD system functions in an easy manner.
2. Description of the Prior Art
Since a conventional graphic editing apparatus is equipped with a number of edit commands and a display area on a screen for the commands is limited, the menus of these commands are organized in a hierarchical structure. A user moves a mouse cursor to a menu display area and selects one of the menu items with the mouse so that a desired command is selected. Having selected the desired command, the user specifies a target graphic element to be edited and calls for execution of the selected command on the edit target graphic element by using the mouse, whereby graphics editing such as move, rotate and deform is performed.
Since the hierarchical structure of the command menus becomes more complex and the number of the menu items increases as the functions of a CAD system are expanded, it is necessary to repeatedly confirm an item to be selected from a display menu, move the mouse cursor to the location of the item and select the item from the menu. Thus, selection from the menus is a burden on the user and causes deterioration of the operability of the system.
Summary of the Invention
The present invention solves the above-mentioned problem. Therefore, it is an object of the present invention to offer a graphic editing apparatus in which selection of a graphic command from a menu is easy.
To achieve the above object, an apparatus according to the present invention has a structure as shown in FIG. 4. In FIG. 4, a graphic editing apparatus includes: cursor moving means for moving a cursor in accordance with an input operation; graphic presence decision means for deciding whether a graphic element is present at a moved cursor position; command menu memory means for storing a menu of graphic editing commands for each graphic element; menu reading means for reading a command menu which corresponds to a graphic element when it is decided that a graphic element is present; command menu display means for displaying a command menu which is read; menu item selecting means for selecting a menu item which is displayed at the moved cursor position in accordance with an input operation; and command executing means for executing a graphic editing command of the selected menu item.
Another graphic edit apparatus which achieves this object includes: cursor moving means for moving a cursor in accordance with an input operation; graphic presence decision means for deciding whether a graphic element is present at a moved cursor position; command menu memory means for storing a menu of graphic editing commands for each graphic element; menu reading means for reading a command menu which corresponds to a graphic element when it is decided that a graphic element is present; command menu display means for displaying a command menu which is read at the moved cursor position; menu item selecting means for selecting a menu item which is displayed at the moved cursor position in accordance with an input operation; and command executing means for executing a graphic editing command of the selected menu item.
According to the first apparatus, when a user moves the cursor, a command menu which corresponds to a graphic element which is located at the cursor position is displayed. The display menu items are prepared in advance. Hence, it is possible to limit the commands corresponding to these items to only those which are necessary in relation to the graphic element which is located at the cursor position.
According to the second apparatus, since the menu is displayed at the cursor position, the amount of cursor movement is held to a minimum.
Brief Description of the Drawings
FIG. 1 is a schematic view showing an example of a menu in a conventional apparatus;
FIGS. 2(A) and 2(B) are views of examples 1 and 2 respectively in the conventional apparatus of FIG. 1, FIG. 2(A) showing an example of a Top Menu and a Basic Graphic Drawing and FIG. 2(B) schematically showing a Top Menu and a Dimension Line.Symbol as a symbol menu;
FIGS. 3(A) and 3(B) are views of examples 3 and 4, respectively in the conventional apparatus of FIG. 1, FIG. 3(A) showing the details of a Top Menu and a File and FIG. 3(B) schematically showing a Top Menu and a Document Processing;
FIG. 4 is a view showing a basic structure of the present invention;
FIG. 5 is an explanatory diagram showing a structure according to a first embodiment of the present invention;
FIG. 6 is an explanatory diagram of tables each showing contents of a hard disk device of FIG. 5;
FIG. 7 is an explanatory diagram of a menu display screen;
FIG. 8 is a flowchart for explaining the steps performed the first embodiment;
FIG. 9 is an explanatory diagram showing a structure according to a second embodiment of the present invention; and
FIGS. 10(A), 10(B) and 10(C) are flowcharts for explaining the steps performed by principal parts of the second embodiment of FIG. 9.
Description of the Preferred Embodiments
The present invention will be described in comparison to a conventional technique, with reference to the attached drawings.
FIG. 1 is a view showing an example of a conventional menu. In FIG. 1, reference numeral 31 indicates a top menu and reference numeral 32 indicates a command menu. As shown in FIG. 2(A), for instance, the top menu is constructed as a symbol menu and includes symbols icons (1) Graphic Draw, (2) Dimension Line, (3) File, (4) Character, (5) Analysis, (6) Changeable and (7) Tool.
The command menu 32, for example, a Basic Graphic Drawing menu, includes the commands of Line Create (546), Offset (596), Character (572), Outer Shape Edit (622) . . . outer shape line create, Detailed View (262), Cutting (740), Window-to-Window Copy (220), Rounding (622) . . . outer shape line create, Line Type Change (58), Delete (434), Circle Create (144), Free Curved Line (812), Hatching (476), Projected Line (694), Assembly Develop (37) . . . graphic operation, Cut and Paste (408) . . . partial graphic edit, graphic magnify and reduce, Bevelling (622) . . . outer shape line create, multi-window (separate volume service command) . . . overlapped screen, and Move (864).
In the conventional technique, due to the number of editing commands and limited display area on the screen, the command menus tend to be organized in a hierarchical structure.
In a conventional graphic edit method, (1) to find a desired page from the command menus, one has to refer to a section in the user's manual called "How to use this manual", and (2) to find a desired page based on what one wants to do, one has to refer to an appendix "Appendix D Function index" of the manual.
Next, to find whether a command can be selected from the command menus, one has to refer to a reference "Commands classified by modules" of the manual and select the type of function one desires from a top menu. When a function is selected from the menu, a command menu which corresponds to the function is displayed. For each top menu, corresponding command menus are displayed.
Examples 1 and 2 of the menus are shown in FIGS. 2(A) and 2(B), respectively. In FIG. 2(A), following the top menu 31, the respective Basic Graphic Drawing items are displayed as the command menu 32. Index numbers are also displayed and explanations of some items are added. The multi-windows are overlapping screens on which separate volume service commands, which form an on-line optional manual (or handbook) regarding the service command which can be manipulated by means of a multi-window and form a separate volume type such as a magazine, are referred to. In FIG. 2(B), the top menu and the command menu Dimension Line.Symbol are shown (only the title is displayed).
The details of the file command menu are shown in FIG. 3(A). The contents of the document processing command menu are shown in FIG. 3(B). That is, the file menu includes:
At the bottom of the document processing menu, document processing is divided into alphanumeric processing, Japanese processing and the like in FIG. 3(B).
On the screen display described above, a user moves the mouse cursor to a menu display area and clicks the mouse at one of the menu items and selects the menu items until a desired command is selected. Having selected the desired command, the user specifies an edit target graphic element to be edited and instructs execution of the selected command using the mouse, whereby graphics editing, such as move, rotate and deform, is performed.
However, since the hierarchical structure of the command menu becomes more complex and the number of the menu items increases as the functions of a CAD system are expanded, it is necessary to repeatedly confirm an item to be selected from the display menu, move the mouse cursor to the location of the item and select the item from the menu. Hence, repeated selection from the menu is a burden on the user which causes deterioration of the operability of the system.
The present invention solves such a problem of the conventional technique. An object of the present invention is therefore to offer a graphic edit apparatus in which selection of a graphic command from a menu is easy.
FIG. 5 is a view showing a structure according to the first embodiment of the present invention.
FIG. 5 explains the structure of the embodiment in which a mouse 200 and a keyboard 202 are operated by a user. Outputs of the mouse 200 and the keyboard 202 are given to an input control unit 206 of a processing device 204. The input control unit 206 transmits the outputs to a main control unit 208.
At the main control unit 208, various processes are performed using a memory unit 210. When calculation, in the main control unit 208, of the current position of the mouse cursor is performed based on the output of the input control unit 206, an output control unit 212 controls a display 214 and the mouse cursor displayed on the screen of the display 214 is moved in accordance with an operation of the mouse 200.
Meanwhile, a graphic element decision unit 216 decides whether a graphic element such as a straight line or a circular arc, is present in an area which is indicated by the current position of the mouse cursor. A menu table control unit 218 is informed of a processing result (decision result) which is yielded by the graphic element decision unit 216.
When informed of the existence of a graphic element from the graphic element decision unit 216, the menu table control unit 218 accesses a hard disk 220 and refers to a graphic element decision table 300, a menu control table 302 and a display order control table 304 of FIG. 6, in this order.
Of the tables, the graphic element decision table 300 of the hard disk 220 stores a list of basic graphic elements (i.e., line segments, circular arcs, dimension lines, curved lines, etc.). The number of a graphic element which is present in an area indicated by the current position of the mouse cursor is read.
The menu control table 302 stores a plurality of graphic editing commands in correspondence to the numbers of the respective graphic elements stored in the graphic element decision table 300 (stored therein are only candidate commands which will be executed following movement of the mouse cursor to a graphic element which corresponds to the number). All commands which correspond to graphic element numbers read in reference to the graphic element decision table 300 are read.
The display order control table 304 stores data regarding the order of display of the respective commands which correspond to the graphic element numbers. From the display order control table 304, control data are read which indicate a display order of the commands corresponding to the graphic element numbers found in reference to the graphic element decision table 300.
The menu table control unit 218 sorts the commands read from the menu control table 302 in accordance with the data read from the display order control table 304. The main control unit 208 is informed of the result of the processing.
The main control unit 208 sends a control instruction calling for the content received from the menu table control unit 218 to the output control unit 212. As a result, commands which correspond to a graphic element present in an area indicated by the current position of the mouse cursor are displayed as a menu on the display 214 in the order which is instructed by the display order control table 304 (FIG. 7).
At this stage, if a user operates the mouse and selects any menu item from the display menu, the corresponding content of the display order control table 304 are updated (the display order of the commands selected by the user is advanced) and the command of the selected item is carried out.
FIG. 7 shows an editing work area 101, a menu area 102, a graphic element 103, a cursor 104 and a command menu 105 which is temporarily displayed as a pop up menu on the display screen in response to an instruction from an operator.
In FIG. 8, the flowchart explains the steps performed in this embodiment. First, a process is performed for checking whether a mode for automatically displaying a command menu at the position of the mouse cursor is set (Step 500).
If setting of the mode is confirmed (YES at Step 500), whether the mouse cursor has been moved is checked (Step 502). If movement of the mouse cursor is confirmed (MOVEMENT at Step 502), a decision is made whether a graphic element is present in an area indicated by the current position of the mouse cursor (Step 504).
If it is decided that a graphic element is present at this step (PRESENT at Step 504), the graphic element decision table 300 is referenced and the number which is assigned to the graphic element is read (Step 506).
Following this, the menu control table 302 is referenced and all the commands which correspond to the graphic element having the same number as was found in reference to the graphic element decision table 300, are read (Step 508).
Further, the display order control table 304 is referenced and corresponding data are read. Using the data thus read, the commands (which were read from the menu control table 302) are sorted (Step 510).
Next, these commands are displayed on the display 214 in the form of a menu in the sorted order at the current position of the mouse cursor (Step 512, FIG. 7) and operation of the menu selection is supervised (Step 514).
At this stage, if selection from the menu using the mouse is confirmed (YES at Step 514), the display order control table 304 is updated (i.e., the display order of the commands selected by the user is advanced) (Step 516), followed by the command of the selected item specified (Step 518) and the command is executed (Step 520).
As described above, if a user moves the mouse cursor onto any graphic element, only candidate commands which could be subsequently selected by the user to process the graphic element are automatically displayed in the form of a menu at the position of the mouse cursor.
Hence, according to the present invention, confirmation and selection of a command to be executed are easy and the amount of movement of the mouse cursor is held to a minimum necessary amount. This makes graphics editing efficient and greatly reduces the burden on a user.
FIG. 9 shows a second embodiment of the present invention. FIG. 9 is different from FIG. 5 in that a common table is provided in the memory unit 210, the graphic element decision unit 216 and the menu table control unit 218 are arranged in an opposite positional relationship and a control bus 220 is linked between a common table 211 of the memory unit 210, the main control unit 208, the graphic element decision unit 216 and the menu table control unit 218.
FIGS. 10(A), 10(B) and 10(C) are flowcharts showing the operations between the principal parts of FIG. 9.
In FIGS. 10(A) and 10(B), when the input control unit 206 starts operating (S0), an output of the menu display process (S16) performed by the output control unit 212 or in the alternative, a NO output of the main control unit 208 to determine whether a graphic element is present at specific coordinates X, Y, (Step 8) is given to the input control unit 206 (Step 1). At Step 2, a decision is made whether the automatic display menu mode has been invoked or not. If NO at Step 2, regular CAD processing is carried out (Step 21) while if YES at Step 2, it is checked whether the menu is displayed or not. If the result of the decision is YES, selection from the automatic display menu is performed (Step 22). This corresponds to the steps which are performed by the parts 10 to 20 of FIG. 4. If the result of the decision is NO, indicating that the menu is not displayed, input by means of the mouse or the keyboard is selected (Step 4). Input using the keyboard is performed if keyboard input is selected (Step 23) while if the mouse input has been selected, a determination is made whether the mouse button is pushed (Step 5). If the mouse button has been pushed, regular mouse processing such as display of a menu and instruction of coordinates is performed (Step 24). If the mouse button has not been pushed, the mouse cursor position (X, Y coordinates) is withdrawn and temporarily stored (Step 6).
In the main control unit 208, shown in FIG. 10(C), the data withdrawn at Step 6 is addressed and the X, Y coordinates are retrieved (Step 7), followed by a decision whether a graphic element is present at the specific coordinates X, Y. If NO, the sequence returns to (Step 1) of the input control unit 206. If YES, the graphic element is given to the graphic element decision unit 216, as shown in FIG. 10(C), and management of the number of the graphic element is performed (Step 9). For such management, the numbers are preliminarily designated as a line segment (1), a circular arc (2), a character (3), a dimension line (4), a curved line (5) and a point (6), and used in the menu control table and the display order control table in a manner as shown in FIG. 6.
The number management data used at Step 9 are addressed and sent to the menu table control unit 218 so that the graphic element number is retrieved first (Step 10) and a display menu character stream is retrieved next (Step 11). Following this, display menus are counted (Step 12) and the display menu information is withdrawn to the main control unit 208 once it is saved (Step 13). The main control unit 208 retrieves the display menu information in accordance with an address (Step 14), and the menu display order is created (Step 15). The created data are then sent to the output control unit 212 so that the menu is formally displayed (Step 16). The output of this menu display processing returns to Step 1 of the input control unit 206 again and the subsequent steps are again repeated.
As heretofore described, according to the present invention, selection of a command is performed in an easy manner due to automatic display of a command menu which corresponds to a graphic element which is displayed at the current cursor position, and the current menu is displayed at the cursor position so that the cursor needs be moved by a minimum necessary amount to perform selection from the menu. Hence, a burden on a user is largely reduced and the drawing efficiency is dramatically enhanced.