Text editing device

Abstract: In a text editing device having a function capable of representing the data variable in response to a movement of a cursor on a display screen, provided are means for moving the cousor on the screen and means for controlling the represented data so as not to be varied in case that the cursor is moved at a high speed larger than a predetermined value. Thus, the cursor is continuously moved at a high speed in respose to the data input operation.

Description: This present invention relates to a text editing device having a function for displaying text data under preparation and relational data corresponding to the position on a display, for example, a scale line corresponding to a print pitch when the text data are printed, or a numeral representation corresponding to a volume of data stored in memory or a volume of data capable of being stored, i.e. a memory space remaining for additional storing of data. As disclosed, for example, in U.S. Patent Application No. 73729 (filed on July 15, 1987), this kind of device displays a cursor indicating a position where data is input on text data displayed on a display and a scale cursor on a scale line indicating a character position in printing corresponding to this cursor position. With this text editing device, for example a wordprocessor, an operator can prepare a text while confirming a character position in printing for the effective preparation of the text. Since, however, a scale cursor is conventionally shifted each time a cursor is shifted, a longer period of time is necessary to shift the cursor, and thus when character data or a cursor shift instruction is inputted at a high speed by operating a keyboard at a high speed, a problem arises in that the cursor cannot be shifted corresponding to the input operations and sometimes the data cannot be inputted at a high speed. Further, in the wordprocessor it is required that a cursor displayed on a display screen is smoothly and quickly moved when a space repeat mode is selected, that is, the cursor must be quickly moved in response to successive input operations of a space code or a back-space code. More specifically, this text editing device is arranged such that data inputted through the keyboard is temporarily stored in a buffer and the buffered input data is sequentially read out to be subjected to a processing corresponding to the input data, and thus when the device takes a long time to effect a processing for shifting the cursor, the speed of reading out the input data from the buffer is lowered. Then, when data is stored in the buffer at a high speed by operating the keyboard at a high speed, a lot of the data is accumulated in the buffer and additional data cannot be inputted due to saturation of the buffer. Further, in the wordprocessor having a function for storing a plurality of character data and space data and the like and displaying a numeral representation corresponding to a volume of data being stored in a memory or capable of being stored in a memory, it is required that the numeral representation is varied in response to a variation of the volume of data caused by a successive input operations of data. Since the time for a calculation processing required for the varying of the numeral representation is wasted, the movement of the cursor on the display screen is ceased in each input operation of the data, therefore, the cursor movement operation is discontinuously executed and the space repeat operation is not smoothly and quickly executed. The above disadvantage occurs when a liquid crystal display unit of which the response time for represent operation is long is employed as a display unit, or a complicated calculation processing is employed for processing large volume of data. Further, it is impossible for an operator of the wordprocessor to separately discriminate each varying of the numeral representation even if the successive move operation of the cursor is able to be executed. IBM Technical Disclosure Bulletin Vol. 28 No. 11, April 1986, pp 4819-4820 discloses a word processing system in which update of an "audit window", a "scale line" and the "line number" is deferred when the user is typing faster than a predetermined rate. It is therefore an object of the invention to provide an improved text editing device having a function capable of representing relational data which has a predetermined relationship with an input position on a display screen. According to this invention, there is provided a text editing device comprising input means for inputting character data, represent means for representing characters in response to the input data, input position designation means for designating the position at which character data is to be input on said represent means, and move means for moving said input position designated by said input position designate means on said represent means, said text editing device further comprising: relational data represent means for representing relational data having a predetermined relationship with said input position designated by said input position designate means; first control means for controlling the relational data represented by said relational data represent means so as to be varied in response to movement of said input position executed by said move means; second control means for controlling the relational data represented by said relational data represent means so that it is not varied when said input position is successively moved by said move means at intervals of time less than a predetermined value; and print means for printing at least the contents of the data represented on said represent means; characterised in that: said relational data comprises a scale representation corresponding to horizontal positions of said represent means and a scale cursor movable in response to the movement of said input position designated by said input position designate means, and wherein a scale unit of said scale representation corresponds to a printing pitch of said print means. The invention will be better understood from the following description which is given by way of example only with reference to the accompanying drawings, in which: Fig. 1 is an illustrative view showing a key arrangement of a keyboard provided on a word processor as a text editing device embodying the present invention; Fig. 2 is a block diagram of an electronic control unit provided on the text editing device embodying the present invention; Fig. 3 is a flowchart of a data input processing executed by the electronic control unit Fig. 2; Fig. 4(A) and (B) are flowcharts of a text preparing processing executed by the electronic control unit of Fig. 2; Fig. 5(A) through 5(C) are explanatory views of a data movement on a display in case that the processing shown in Fig. 4 is executed; Fig. 6(A) through 6(B) are another explanatory views of a data movement on a display in case that the processing shown in Fig. 4 is executed; Fig. 7(A) through 7(B) are another flowcharts of a text preparing processing executed by the electronic control unit of Fig. 2; and Fig. 8(A) through 8(C) are explanatory views of a data movement on a display in case that the processing shown in Fig. 7 is executed. An embodiment of this invention will be described below with reference to drawings. Fig. 1 is an illustrative view showing an arrangement of a keyboard provided on a word processor as a text editing device embodying the present invention. The keyboard 1 is provided with character keys 31 for inputting the character data corresponding to the characters and symbols, various instruction keys 33 for inputting instruction codes for a text editing, printing and the like of a text, cursor movement keys 35 for moving a cursor 100 on a display 3, a space key 32 for inputting a space code having a function for automatically inputting a code corresponding to a space at predetermined intervals of time by being depressed continuously, a repeat key 37 for inputting proviously inputted data again and the like. Fig. 2 is a schematic diagram illustrative of an overall arrangement of a text editing device as an embodiment to which the present invention is applied. As shown in Fig. 2, the text editing device of this embodiment comprises the above described keyboard 1, a CRT (Cathode Ray Tube) display 3 for displaying text data 150, a scale line 250, described later, and the like, a flexible disk drive 5 as an external recording unit, a printer 7 for printing the text data, a buzzer 9 as an alarm unit for notifying an abnormal state to an operator, an electronic control unit 10 electrically connected to these units for controlling the preparation, display and print of a text and the like. The electronic control unit 10 is composed of a logical operation circuit including a known CPU (Central Processing Unit) 11, ROM (Read Only Memory) 12, RAM (Random Access Memory) 13 and the like as a main part, a video RAM 14 for recording data to be displayed on the CRT display 3, a keyboard input port 15 for effecting data input operation from the keyboard 1, a flexible disk drive controller 16 for reading/writing data by controlling the flexible disk drive 5, a printer output port 17 for outputting print data to the printer 7, a drive circuit 18 for actuating the buzzer 9 to notify the abnormal state to the operator and the like. The RAM 13 is provided with a key buffer 13a for temporarily storing data inputted from the keyboard 1, a text memory 13b for storing the text data, a "K" register 13c for storing the present position of the cursor 100, a "SK" register 13d for storing the present position of a scale cursor 200, and a work memory 13b for temporarily storing data for the edit of a text. The ROM 12 stores a control program for effecting the preparations, display, print and the like of the text and initial data. On the other hand, the video RAM 14 is composed of a dual port RAM and thus can be also accessed by a CRT controller 20 provided independently of the CPU 11. The CRT controller 20 repeatedly reads out the contents of the video RAM 14 in the cycle determined by the scanning frequency of the CRT display 3 and displays them thereon. Therefore, the character data written into the predetermined area of the video RAM 14 by the CPU 11 is displayed on the CRT display 3 at once. This arrangement enables the operator to prepare the text by depressing the character keys 31, to edit and print the text as necessary as well as to write the text data stored in the text memory 13b of the RAM 13 to the flexible disk set to the flexible disk drive 5 through the flexible disk drive controller 16. Note, the instruction keys 33 of the keyboard 1 include a print pitch change key 33a for changing the print pitch of the character data when the text data is printed thereby to enable a scale line 250 to be displayed in the CRT display 3 to be changed according to the print pitch. With this text editing device of the embodiment as arranged as described above, a data input processing is executed every predetermined period of time (e.g., 2 msec.), as shown in Fig. 3 and thus the data inputted from the keyboard 1 is stored in the key buffer 13a. More specifically, in this data input processing, a key scanning is carried out to determine whether the operator effects a key input or not (step S1). When the key input is effected, the input data is stored in the key buffer 13a in such a procedure that it is confirmed that the key buffer 13a is not saturated (step S2-YES), a counter "C" showing an amount of data stored in the key buffer 13a is incremented (step S3) and the input data is stored in the storing location corresponding to the value of the counter "C" (step S4). When it is determined at step S1 that the key input is not effected, the succeeding processings are not necessary to be executed, and then the flow is terminated. Further, when it is determined that the key buffer 13a is saturated at step S2, since the input data cannot be stored in the key buffer 13a, the buzzer 9 is actuated to notify this state to the operator (step S5) and the flow is terminated. Note that the process at step S1 to determine whether the input operation is effected or not is carried out in such a manner that when a repeat key 37 or a key having a self repeat function (the space key 32 and the cursor movement keys 35 in this embodiment) is continuously depressed, it is regarded that a repeat instruction is effected by a new input operation each time the key is depressed for a predetermined period of time (e.g., 0.1 sec.) and the flow goes to step S2, and when a key other than above is continuously depressed, it is regarded that an input operation is not effected and the flow is terminated. Next, Fig. 4(A) and 4(B) show a text preparing processing repeatedly executed when the device is in a text preparing mode. Note that this processing rewrites the contents of the video RAM 14 each time data are inputted through the keyboard 1 and, as shown in Fig. 5(A) through 5(C), displays on the CRT display 3 text data under preparation, the cursor 100 indicating a data input position on the text data, the scale line 250 corresponding to a print pitch set in advance by the print pitch change key 33a, and the scale cursor 200 corresponding to the cursor position on the scale line 250 as well as stores the text data edited in the text memory 13b and updates them when an input line, is shifted on the text data and the like. As shown in Fig. 4(A) and 4(B), when the text preparing processing starts, a processing at step S10 is primarily executed to determine whether the value of the counter "C" is zero or not, i.e., inputted data is stored in the key buffer 13a or not. When it is determined that the value of the counter "C" is not zero and the key buffer 13a stores the input data at step S10 , the flow goes to step S11 where the inputted data stored at the header data storing position in the key buffer 13a is read out, the value of the counter "C" is decremented at step S12, the inputted data in the key buffer 13a is shifted in the header direction to change the location where the data are stored at step S13, and then the flow goes to step S14. At step S14, it is determined whether the inputted data read out at step S11 is character data (including space data). When the inputted data are the character data, the flow goes to step S15 where a character data input processing is executed wherein the input character data is displayed at the cursor position on the display, the cursor is shifted to the next data input position and the "K" register 13c is incremented. Next, when it is determined that the input data is not the character data at step S14, the flow goes to step S16 where it is determined whether the inputted data is a cursor shift instruction given by the operation of one of the cursor movement keys 35 or not. When the inputted data is the cursor key shift instruction, the flow goes to step S17 where a cursor shift processing is executed wherein the cursor position on the display is shifted in the direction corresponding to the cursor shift instruction by one character and the "K" register 13c is incremented. When it is determined at step S16 that the inputted data is not the cursor shift instruction, the flow goes to step S18 where it is determined whether the inputted data is a repeat instruction or not given by the operation of the repeat key 37 or the continuous operation of the key having the self repeat function. When the input data is the repeat instruction, it is determined at step S19 whether data input just before the repeat instruction was a cursor shift instruction given one of the cursor movement keys 35. When the result of the determination is not affirmative, i.e., the data input just before was character data, the flow goes to step S20 where a character data re-input processing is executed wherein previously input character data is displayed at a present cursor position, the cursor position is shifted to the next data input position, and the "K" register 13c is incremented. When the result of the determination is affirmative at step S19, the cursor shift processing is executed again at step S21 wherein the cursor position on the display is shifted in the direction corresponding to the cursor shift instruction by one character and the "K" register 13c is incremented. Note that when it is necessary to further shift the cursor 100 in the same direction which already arrives at a margin position in the processing executed at step S15, S17, S20 or S21, the cursor 100 is shifted to the opposite margin position of the previous or next line. More specifically, for example, when the cursor 100 is arrives at the right margin, it is shifted to the left margin of the succeeding line. When the cursor 100 is shifted on the text data as described above at step S15, 17, 20 or 21, the flow goes to step 22 where it is determined whether the value of the counter "C" is zero or not, i.e., data still remains in the key buffer 13a or not. When the value of the counter "C" is zero and no data remains in the key buffer 13a, the flow goes to step 23 where a scale cursor shift processing is executed wherein the scale cursor 200 is shifted according to the cursor position on the text data so as to cause the value of the "SK" register 13d to coincide with the value of the "K" register 13c. Next, at succeding step S24 a flag "F" is reset to indicate that the scale cursor 200 corresponds to the cursor position, and then the flow goes to step S10 again. Conversely, when it is determined at step S22 that the value of the counter "C" is not zero, i.e., data remains in the key buffer 13a, the scale cursor shift processing is not executed at step S23, the flag "F" is set and the flow goes to step S10 again. More specifically, when the data remains in the key buffer 13a, data is continuously inputted from the key board 1 and the cursor 100 must be continuously shifted on the display 3, and thus the processing for shifting the scale cursor 200 is not executed and the next inputted data is read as it is. When it is determined at step S18 that the input data is not the repeat instruction, the input data is a kind of text edit instructions, and thus the flow goes to step S26 to execute a data processing corresponding to the input data and goes to step S10 again. In addition, when the cursor position is shifted to the succeeding line on the text data in the execution of the data processing at step S26 or by the proccessing at step S15, S17, S20 or S21, a text data update processing, is executed simultaneously to rewrite the text data in the text memory 13b. Next, when it is determined that the value of the counter "C" is zero at step S10, the flow goes to step S27 where it is determined whether the flag "F" is set or not, i.e., the scale cursor 200 corresponds to the cursor position or not (whether the value of the "K" register 13c coincides with the value of the "SK" register 13d). When the flag "F" is set and the scale cursor 200 does not correspond to the cursor position, the flow goes to step S23 where a scale cursor shift processing is executed to cause the scale cursor 200 to correspond to the cursor position, further goes to step S24 to reset the flag "F" and then goes to step S10 again. As described above, according to the text editing device of the embodiment, when input data is accumulated in the key buffer 13a, the scale cursor shift processing is not executed to cause the scale cursor 200 to correspond to the cursor position, and after all the input data in the key buffer 13a is processed, the scale cursor shift processing is executed. Therefore, in a state shown in Fig. 5(A), the repeat key 37, for example, is continuously depressed and input data indicating a repeat instruction is accumulated in the key buffer 13a, as shown in Fig. 5(B), the scale cursor 200 is held at its position until the re-input of the character data corresponding to the accumulated repeat instruction is finished and when the re-input of the character data effected in response to the repeat instruction is finished, the scale cursor 200 is shifted to a position corresponding to the cursor position, as shown in FIg. 5(C). Thus, according to the text editing device of the embodiment, when data are inputted from the keyboard 1 at a high speed, a period of time necessary to shift the cursor 100 can be shortened by a period of time during which the scale cursor 200 is shifted, whereby the cursor 100 can be shifted at a high speed in response to the data input to enable the high speed input of the data. Note that the display of an amount of data up to now and an amount of remaining data and the like may be stopped during the repeat operation in addition to the shift of the scale cursor and they may be displayed after the completion of the repeat operation. Furthermore, it may be considered that, as shown in Fig. 6(A) and 6(B), page, line and character number indicators for indicating the position at which a cursor 100 is located are changed based upon a movement of the cursor 100. If a cursor 100 is successively moved at a high speed by a scroll operation and the like from the state shown in Fig. 6(A), the numbers indicating a position at which the cursor 100 is located are not changed till the scroll operation is ceasad. After the scroll operation is ceased, the indications are changed so as to indicate a position of the cursor 100. In other words, the indications are discontinuously changed, similar to the embodiment described above. Further, an another embodiment according to this present invention will be described later with reference to Fig. 7(A) through 7(B) and, Fig. 8(A) through 8(C). Fig. 7(A) through 7(B) are other flowcharts of a text preparing processing. On the display 3, a numeral representation corresponding to the data stored in a memory is displayed and the number is able to be varied in response to a volume of the data. In step S31, it is determined whether an input operation through the keyboard 1 is executed or not. If it is determined "NO", it is determined whether the present operation mode is repeat mode or not at step S32, and a flow returns to step S31 if the determination at step S32 is "NO". In other words, a code input operation by depressing one of keys provided on the keyboard is awaited during a key scan operation composed by the step S31 and step S32. After a code input operation is executed, the flow goes to step S33. If the operated key at step S31 is a repeat key 37, the determination at step S33 becomes "YES" and the flow goes back to step S31 after a repeat mode is designated at step S34. After going back to step S31, the determination at step S31 becomes "NO", and the determination at step S32 becomes "YES" because the repeat mode has been already designated at step S34. At step S35, the CPU 11 controls the data having been stored in a last data buffer area of a key buffer 13a so as to be read out, and it is determined at step S36 whether the data read out is one of a plurality of repeatable data or not. If the determination at step S36 is "NO", the flow returns to step S31. If the determination at step S36 is "YES", that is, the data read out from the key buffer 13a is a repeatable data such as a space, one of characters, and the like, it is respectively determined at step S37 and step S38 whether the data is the space or a back space. If the both determination at step S37 and step S38 are "NO", that is, the read out data is the data other than the space and the back space, a character corresponding to the read out data is displayed on the display 3 at step S39 and the cursor 100 is moved by one step rightward. If the read out data from the key buffer 13a is the space, the determination at step S37 becomes "YES". The flow goes to step S40 at which the present operation mode is repeat mode or not is determined again, and the flow goes to step S41 because the repeat mode has been already designated at step S34. The CPU 11 outputs a strobe signal to the CRT controller 20, and determines whether the present state of the display 3 is changeable or not based upon a busy signal sent back from the CRT controller 20. In other words, the numeral representation is able to be varied in case that the busy signal is not outputted from the CRT controller because an absence of the above busy signal indicates that a calculation processing executed in the electronic control unit 10 is smoothly being executed. The CPU 11 controls, at step S42, the numeral representation on the display 3 so as to be rewritten in response to a numeral pattern data corresponding to the stored data and being sent to the display 3 through the data bus. After rewriting the numeral representation in response to the data sent through the CRT controller 20, a space operation by one step is executed at step S43 and the flow returns to S31. A routine composed of steps S31 through S43 are repeatedly executed and a space repeat operation is executed. If a response for varying the numeral representation is delayed, the busy signal is sent from the CRT controller 20 to the CPU 11. In other words, since the flow goes to step S43 from step S41 with skipping over step S42, the numeral representation is not varied. If the data read out from the last data buffer area of the key buffer 13a is the back space, the flow goes to step S38 from step S37, and the determination at step S38 becomes "YES". The flow goes to step S47 from step S44, similar to steps S40 through S43, and the rewriting operation at step S46 are skipping over in case that the response for varying the numeral representation is delayed. Next, if the repeat key 37 is depressed again during the repeat mode is designated, the flow goes to step S33 from step S31, the determination at step S33 becomes "NO", and further the determination at step S48 becomes "YES". Further, at step S49, the repeat mode designated at step S34 is released, and it is determined whether the data stored in the last data buffer area is the space or the back space or not at step S50. If the determination at step S50 is "YES", the flow respectively goes to step S40 or step S44 through step S37 or step S38. The determination at step S40 or step S44 are respectively becomes "NO" because the repeat mode has been already released at step S49 and the numeral representation is varied at step S42 or step S46. Finally, at step S43 or step S47, the space operation or the back space operation is executed. Therefore, the operator is exactly able to know the volume of the data stored in the memory or the volume of the data capable of being stored when the sapce repeat operation is ceased. If a key operation corresponding to a key other than the repeat key 37 is executed during the key scanning operation composed of step S31 and step S32, the determinations at step S33 and S48 are respectively becomes "NO", and a processing corresponding to the key operation at step S31 is executed at step S39 after the data corresponding to the key operation is stored into the last data buffer area of key buffer 13a at step S51 and the "NO" determination is executed at step S37 and step S38. When the above operations are executed, as shown in Fig. 8(A) through 8(C), the numeral representation of the character numeral is discontinuously varied in response to a movement of the cursor 100 by a successive input operation of space data. In Fig. 8(A), the cursor is located at a position corresponding to the seventh character position, a numeral representation is remained at "5" during a moving operation based upon a successive space data inputting operation. The numeral representation corresponding to the character numeral is discontinuously varied, as shown in Fig. 8(B) and 8(C), at an intervals of time corresponding to the five step movement of the cursor 100. Further, an operation in case that the repeat mode is designated by depressing the repeat key 37 is described in the above embodiment, it is possible to vary a numeral representation discontinuously in case that a successive depression of the space key 32, that is, a self-repeat function, is executed. The repeat mode is designated when the repeat key 37 is operated and released when the repeat key 37 is operated again in the above embodiment, it may be considered that the repeat mode is designated only when the repeat key 37 is continuously depressed.

Claims: A text editing device comprising input means (1) for inputting character data, represent means (3) for representing characters in response to the input data, input position designation means (100) for designating the position at which character data is to be input on said represent means, and move means for moving said input position designated by said input position designate means on said represent means, said text editing device further comprising: relational data represent means (250) for representing relational data having a predetermined relationship with said input position designated by said input position designate means; first control means (11) for controlling the relational data represented by said relational data represent means so as to be varied in response to movement of said input position executed by said move means; second control means (11) for controlling the relational data represented by said relational data represent means so that it is not varied when said input position is successively moved by said move means at intervals of time less than a predetermined value; and print means (7) for printing at least the contents of the data represented on said represent means; characterised in that: said relational data comprises a scale representation corresponding to horizontal positions of said represent means and a scale cursor (200) movable in response to the movement of said input position designated by said input position designate means, and wherein a scale unit of said scale representation corresponds to a printing pitch of said print means. A text editing device according to claim 1 wherein said relational data comprises a page representation, a line representation and a character numeral representation of text data including the input character data, each said representation representing the input position designated by said input position designate means. A text editing device according to claim 1 or 2 wherein said second control means further controls the relational data represented by said relational data represent means so as to be the data corresponding to the input position having been successively moved at intervals of time less than said predetermined value by said move means. A text editing device according to any preceding claim wherein said second control means controls the relational data so that it is not varied when said input position is successively moved by instruction of a repeat input code being input through said input means and such that successive inputting of data is at an interval of time less than said predetermined value. A text editing device according to claim 4 wherein said data successively input by said repeat input code corresponds to a space. A text editing device according to any one of the preceding claims wherein said second control means controls the scale cursor so to be not moved when said cursor is successively moved by instruction of a repeat input code input through said input means and having the function of successively inputting the data at intervals of time less than said predetermined value. A text editing device according to claim 6 wherein said data successively input by said repeat input code corresponds to a space. A text editing device according to any one of the preceding claims wherein said relational data represent means comprises data volume represent means for numerically representing the volume of data stored in a part of said memory means corresponding to the line on which said cursor is located or the volume of the data capable of being stored in said part of said memory means; and wherein said second control means is adapted to control said volume of data represented by said data volume represent means so as to be discontinuously varied at an interval of time corresponding to a predetermined number of moving operations of said cursor when the cursor is moved faster than the numeral representation of said data volume represent means is varied.

Inventors: SASAKI TOSHIYUKI, SAKAI, TOSHIYUKI BROTHER KOGYO KABUSHIKI KAISHA, SASAKI, TOSHIYUKI BROTHER KOGYO KABUSHIKI KAISHA
Applicants: BROTHER IND LTD, BROTHER KOGYO KABUSHIKI KAISHA
Application year: 1989
Main classification: G06F17
IPC codes: G06F17, B41J29, G06F3, B41J21