Summary of the invention
The fundamental purpose of the embodiment of the invention is to provide a kind of cursor-moving method and system of touch panel device.
The purpose of the embodiment of the invention is achieved by following technical proposals:
A kind of cursor-moving method of touch panel device is characterized in that, comprising:
Obtain touch coordinate;
According to described touch coordinate, determine the demonstration block that this touch coordinate is positioned at;
Judge whether cursor is positioned at the adjacent side of described demonstration block;
If cursor then is positioned at position, the viewing area moving cursor of described demonstration block not in the adjacent side of described demonstration block according to touch coordinate;
If cursor, judges then whether described touch coordinate is arranged in the buffer area of the viewing area of described demonstration block in the adjacent side of described demonstration block;
If described touch coordinate is positioned at the buffer area, then cursor is not carried out displacement control;
If described touch coordinate is not positioned at described buffer area, then be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate.
Described buffer area is arranged on the middle part of the viewing area of described demonstration block.
Described buffer area is that equal proportion changes with the viewing area that shows block.
Describedly be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate, comprise:
When described touch coordinate is positioned at the left field of viewing area of described demonstration block, described cursor is moved to the left side of this demonstration block;
When described touch coordinate is positioned at the right side area of viewing area of described demonstration block, described cursor is moved to the right side of this demonstration block.
Describedly be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate, comprise:
When described touch coordinate is positioned at the upper-side area of viewing area of described demonstration block, described cursor is moved to the upside of this demonstration block;
When described touch coordinate is positioned at the underside area of viewing area of described demonstration block, described cursor is moved to the downside of this demonstration block.
A kind of cursor mobile system of touch panel device is characterized in that, comprising: touch coordinate acquiring unit, demonstration block determining unit, cursor position judging unit, buffer area judging unit, cursor mobile control unit;
Described touch coordinate acquiring unit is used for obtaining touch coordinate;
Described demonstration block determining unit is used for according to described touch coordinate, determines the demonstration block that this touch coordinate is positioned at;
Described cursor position judging unit is used for judging whether cursor is positioned at the adjacent side of described demonstration block;
Described buffer area judging unit is used for judging whether described touch coordinate is arranged in the buffer area of the viewing area of described demonstration block when the adjacent side of cursor at described demonstration block;
Described cursor mobile control unit is used for not during the adjacent side at described demonstration block, being positioned at position, the viewing area moving cursor of described demonstration block at cursor according to touch coordinate; When the buffer area of cursor in the viewing area that adjacent side and the touch coordinate of described demonstration block is arranged in described demonstration block, cursor is not carried out displacement control; When the buffer area of cursor in the viewing area that adjacent side and the touch coordinate of described demonstration block is not arranged in described demonstration block, be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate.
The buffer area is arranged on the middle part of the viewing area of described demonstration block in the judging unit of described buffer area.
The buffer area is that equal proportion changes with the viewing area that shows block in the judging unit of described buffer area.
Described cursor mobile control unit be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate, comprising:
When described touch coordinate is positioned at the left field of viewing area of described demonstration block, described cursor is moved to the left side of this demonstration block;
When described touch coordinate is positioned at the right side area of viewing area of described demonstration block, described cursor is moved to the right side of this demonstration block.
Described cursor mobile control unit be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate, comprising:
When described touch coordinate is positioned at the upper-side area of viewing area of described demonstration block, described cursor is moved to the upside of this demonstration block;
When described touch coordinate is positioned at the underside area of viewing area of described demonstration block, described cursor is moved to the downside of this demonstration block.
Pass through the embodiment of the invention, obtain user's touch coordinate at equipment after, be not only to be positioned at the position, viewing area that shows block according to touch coordinate to come moving cursor, and need also to judge whether touch coordinate is located at the buffer area of delimiting in the described viewing area, and judge whether cursor is carried out displacement control with this.Owing to these method and system mark this buffer area in the viewing area that shows block, make the user can not rock in the adjacent side of demonstration block because touching the inaccurate cursor that not make in location, have experience effect preferably.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in further details.At this, exemplary embodiment of the present invention and explanation thereof are used for explanation the present invention, but not as a limitation of the invention.
In screen display, show that through regular meeting some need take the message unit of fixed display area on the screen, as literal, picture etc.These message units only allow cursor to show at its viewing area boundary, and do not allow cursor to show in its shared viewing area scope owing to content display requirement own.As, for passage, cursor can only show between its literal, and do not allow to show in the shared viewing area of certain word therein.Take the message unit of fixed display area on the screen for this needs, the present invention is called the demonstration block.
At the display requirement of this demonstration block, the mobile rule of cursor is normally determined the cursor display position according to user's the position of touch coordinate in showing the shown regional extent of block.
Such as, it is current that the passage content is arranged is 0123456789.Wherein, the width of each word be 10(in fact, the character that the width of each word is different or literal can be different, narration for convenience here suppose all the same), overall width is 100, namely always coordinate range is 0-99.Wherein: 0 scope is 0-9,1 be 10-19,2 be 20-19 ..., 9 be 90-99.
When carrying out cursor when moving, can determine the position of cursor demonstration according to user's the position of touch coordinate in showing the shown regional extent of block.When take back in the centre position of certain character in the position of touch coordinate, cursor then is presented at the front of this character.If when the position of touch coordinate took in the centre position of certain character, cursor was presented at the back of this character.
Such as: current touch coordinate is 13, then is in the indication range of character 1.The indication range of character 1 is 10-19, the 13 left-of-center positions at scope 10-19.So cursor is between character 0 and character 1.In like manner, if touch coordinate is 18.18 in the center-right position of scope 10-19, so cursor has moved on between 1 and 2.
But, having a problem like this, people move to when needing character position at cursor at once, need slow translational speed, accurately locate.Might occur touch coordinate like this is 14 for a moment, is 15 for a moment.Because cursor can be between 0 character and 1 character in 14, and 15 o'clock can be between 1 and 2.Like this, will cause cursor to rock repeatedly at the coordinate of character 1, the user experiences relatively poor.
Embodiment one
Fig. 1 is the process flow diagram of the cursor-moving method of touch panel device.Based on above-mentioned cursor-moving method, as shown in the figure, the cursor-moving method of the touch panel device that the embodiment of the invention provides comprises:
S1 obtains touch coordinate;
Touch coordinate is the touch position coordinates of user on touch-screen, can perception be obtained by touch-screen.
S2 according to described touch coordinate, determines the demonstration block that this touch coordinate is positioned at;
As previously mentioned, each shows that block has separately independently viewing area.Can determine that according to touch coordinate it is positioned within the indication range that how to show block.
S3 judges whether cursor is positioned at the adjacent side of described demonstration block;
Concrete, according to the type difference that shows block, its adjacent side scope also may be different.For example, literal, character type show that the adjacent side scope of block comprises its left side, right side and downside etc.
S4 is if cursor then is positioned at position, the viewing area moving cursor of described demonstration block not in the adjacent side of described demonstration block according to touch coordinate;
If cursor, illustrates then that cursor does not move near the demonstration block that should be positioned at as yet not in the adjacent side of described demonstration block, therefore should carry out displacement control to cursor based on the position of touch coordinate.
S5 is if cursor, judges then whether described touch coordinate is arranged in the buffer area of the viewing area of described demonstration block in the adjacent side of described demonstration block;
Herein, the buffer area is a setting regions that marks from the viewing area that shows block, is marked on the problem that shows that the adjacent side of block is rocked with the buffering aforementioned lights.The scope of this buffer area should not exceed the viewing area that shows block.In general, the buffer area should be arranged on the middle part of the viewing area of described demonstration block.
S6 if described touch coordinate is arranged in the buffer area of the viewing area of described demonstration block, does not then carry out displacement control to cursor;
If user's touch coordinate is in this buffer area, then no matter touch coordinate specifically is positioned at what position that shows the block viewing area, cursor is not carried out displacement control.
S7 if described touch coordinate is not arranged in the buffer area of the viewing area of described demonstration block, then is positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate.
If user's touch coordinate not in this buffer area, then adopt with abovementioned steps S4 in identical algorithm, be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate.
The method that the embodiment of the invention provides, obtain user's touch coordinate at equipment after, be not only to be positioned at the position, viewing area that shows block according to touch coordinate to come moving cursor, and need also to judge whether touch coordinate is located at the buffer area of delimiting in the described viewing area.If touch coordinate is positioned at this buffer area, then no matter touch coordinate specifically is positioned at what position that shows the block viewing area, cursor is not carried out displacement control, shifts out this buffer area until touch coordinate, ability and then moving cursor.By said method, owing in the viewing area that shows block, marking above-mentioned buffer area, make the user can not rock in the adjacent side of demonstration block because touching the inaccurate cursor that not make in location, have experience effect preferably.
With the aforementioned example that is exemplified as, 1 viewing area is coordinate 10-19.We delimit wherein, and coordinate 13-16 is the buffer area.When user's touch coordinate is 14, if this moment, cursor was positioned at character about 1, namely between the character 0 and 1, perhaps between the character 1 and 2.Because user's touch coordinate 14 is positioned at the buffer area, therefore no matter at this moment cursor is between 0 and 1 or between 1 and 2, cursor is not carried out displacement control.People touch the location and are inaccurate, and this moment, people's touch coordinate may be shaken in the 13-16 regional extent, but owing to be provided with this buffer area, so cursor position can not carry out displacement, till touch coordinate exceeds this buffer area.As seen, the embodiment of the invention has solved the problem that aforementioned cursor rocks well.
Embodiment two
In the present embodiment, be positioned at position, the viewing area moving cursor of described demonstration block among described step S4 and the S7 according to touch coordinate, comprise:
When described touch coordinate is positioned at the left field of viewing area of described demonstration block, described cursor is moved to the left side of this demonstration block;
When described touch coordinate is positioned at the right side area of viewing area of described demonstration block, described cursor is moved to the right side of this demonstration block.
The given cursor of present embodiment moves rule, is applicable to that generally the cursor of the literal class content as the aforementioned exemplary moves.Equipment is positioned at left field or the right side area of the viewing area that shows block according to touch coordinate, decides cursor to move to left side or the right side of this demonstration block.
Embodiment three
In the present embodiment, be positioned at position, the viewing area moving cursor of described demonstration block among described step S4 and the S7 according to touch coordinate, comprise:
When described touch coordinate is positioned at the upper-side area of viewing area of described demonstration block, described cursor is moved to the upside of this demonstration block;
When described touch coordinate is positioned at the underside area of viewing area of described demonstration block, described cursor is moved to the downside of this demonstration block.
The given cursor of present embodiment moves rule, is applicable to that generally the cursor of the literal class content as the aforementioned exemplary moves.Equipment is positioned at upper-side area or the underside area of the viewing area that shows block according to touch coordinate, decides cursor to move to upside or the downside of this demonstration block.
Embodiment four
The scope of described buffer area can be fixed, and also can be the dynamic change with the viewing area scope that shows block.In the present embodiment, described buffer area is that equal proportion changes with the viewing area that shows block.Broaden if namely show the viewing area of block, then the buffer area scope also thereupon equal proportion widen; Uprise if show the viewing area of block, then the buffer area scope also thereupon equal proportion increase.Vice versa, narrow down if show the viewing area of block, then the buffer area scope also thereupon equal proportion narrow down; Become short if show the viewing area of block, then also the equal proportion change is short thereupon for the buffer area scope.Thereby form the dynamic change of buffer area and viewing area.
Embodiment five
Fig. 2 is the structural representation of the cursor mobile system of touch panel device.As shown in the figure, the cursor mobile system of the touch panel device that the embodiment of the invention provides comprises: touch coordinate acquiring unit 1, demonstration block determining unit 2, cursor position judging unit 3, buffer area judging unit 4, cursor mobile control unit 5.
Described touch coordinate acquiring unit 1 is used for obtaining touch coordinate;
Described demonstration block determining unit 2 is used for according to described touch coordinate, determines the demonstration block that this touch coordinate is positioned at;
As previously mentioned, each shows that block has separately independently viewing area.Can determine that according to touch coordinate it is positioned within the indication range that how to show block.
Described cursor position judging unit 3 is used for judging whether cursor is positioned at the adjacent side of described demonstration block;
Concrete, according to the type difference that shows block, its adjacent side scope also may be different.For example, literal, character type show that the adjacent side scope of block comprises its left side, right side and downside etc.
Described buffer area judging unit 4 is used for judging whether described touch coordinate is arranged in the buffer area of the viewing area of described demonstration block when the adjacent side of cursor at described demonstration block;
Herein, the buffer area is a setting regions that marks from the viewing area that shows block, is marked on the problem that shows that the adjacent side of block is rocked with the buffering aforementioned lights.The scope of this buffer area should not exceed the viewing area that shows block.In general, the buffer area should be arranged on the middle part of the viewing area of described demonstration block.
Described cursor mobile control unit 5 is used for not during the adjacent side at described demonstration block, being positioned at position, the viewing area moving cursor of described demonstration block at cursor according to touch coordinate; When the buffer area of cursor in the viewing area that adjacent side and the touch coordinate of described demonstration block is arranged in described demonstration block, cursor is not carried out displacement control; When the buffer area of cursor in the viewing area that adjacent side and the touch coordinate of described demonstration block is not arranged in described demonstration block, be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate.
If cursor, illustrates then that cursor does not move near the demonstration block that should be positioned at as yet not in the adjacent side of described demonstration block, therefore should carry out displacement control to cursor based on the position of touch coordinate.If in this buffer area, then no matter touch coordinate specifically is positioned at what position that shows the block viewing area to cursor, cursor is not carried out displacement control at the adjacent side of described demonstration block and user's touch coordinate.If cursor not in this buffer area, then adopts algorithm as hereinbefore at the adjacent side of described demonstration block and user's touch coordinate, be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate.
The system that the embodiment of the invention provides, obtain user's touch coordinate at equipment after, be not only to be positioned at the position, viewing area that shows block according to touch coordinate to come moving cursor, and need also to judge whether touch coordinate is located at the buffer area of delimiting in the described viewing area.If touch coordinate is positioned at this buffer area, then no matter touch coordinate specifically is positioned at what position that shows the block viewing area, cursor is not carried out displacement control, shifts out this buffer area until touch coordinate, ability and then moving cursor.By said system, owing in the viewing area that shows block, marking above-mentioned buffer area, make the user can not rock in the adjacent side of demonstration block because touching the inaccurate cursor that not make in location, have experience effect preferably.
Embodiment six
In the present embodiment, described cursor mobile control unit 5 be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate, comprising:
When described touch coordinate is positioned at the left field of viewing area of described demonstration block, described cursor is moved to the left side of this demonstration block;
When described touch coordinate is positioned at the right side area of viewing area of described demonstration block, described cursor is moved to the right side of this demonstration block.
The given cursor of present embodiment moves rule, is applicable to that generally the cursor of the literal class content as the aforementioned exemplary moves.Equipment is positioned at left field or the right side area of the viewing area that shows block according to touch coordinate, decides cursor to move to left side or the right side of this demonstration block.
Embodiment seven
In the present embodiment, described cursor mobile control unit 5 be positioned at position, the viewing area moving cursor of described demonstration block according to touch coordinate, comprising:
When described touch coordinate is positioned at the upper-side area of viewing area of described demonstration block, described cursor is moved to the upside of this demonstration block;
When described touch coordinate is positioned at the underside area of viewing area of described demonstration block, described cursor is moved to the downside of this demonstration block.
The given cursor of present embodiment moves rule, is applicable to that generally the cursor of the literal class content as the aforementioned exemplary moves.Equipment is positioned at upper-side area or the underside area of the viewing area that shows block according to touch coordinate, decides cursor to move to upside or the downside of this demonstration block.
Embodiment eight
The scope of buffer area can be fixed in the judging unit 4 of described buffer area, also can be the dynamic change with the viewing area scope that shows block.In the present embodiment, described buffer area is that equal proportion changes with the viewing area that shows block.Broaden if namely show the viewing area of block, then the buffer area scope also thereupon equal proportion widen; Uprise if show the viewing area of block, then the buffer area scope also thereupon equal proportion increase.Vice versa, narrow down if show the viewing area of block, then the buffer area scope also thereupon equal proportion narrow down; Become short if show the viewing area of block, then also the equal proportion change is short thereupon for the buffer area scope.Thereby form the dynamic change of buffer area and viewing area.
Embodiment nine
Move the needs of control according to actual cursor, the placement position of described buffer area in the viewing area that shows block also can be different thereupon.Below carry out the example explanation with regard to the 3 pairs of possible layout type in several buffer areas by reference to the accompanying drawings:
1, Fig. 3 (a) is buffer area first layout.Dash area is the buffer area among the figure, and the scope that outside frame is drawn a circle to approve is for showing the viewing area of block.As seen, the transverse width of buffer area is less than the viewing area, and vertical height is then identical with the viewing area.The buffer area of this layout structure is mainly used in adjusting cursor movement in a lateral direction.
2, Fig. 3 (b) is buffer area second layout.Dash area is the buffer area among the figure, and the scope that outside frame is drawn a circle to approve is for showing the viewing area of block.As seen, the vertical height of buffer area is less than the viewing area, and transverse width is then identical with the viewing area.The buffer area of this layout structure is mainly used in adjusting the movement of cursor on vertical direction.
3, Fig. 3 (c) is buffer area the 3rd layout.Dash area is the buffer area among the figure, and the scope that outside frame is drawn a circle to approve is for showing the viewing area of block.As seen, the transverse width of buffer area is less than the viewing area, and vertical height is also less than the viewing area, and namely the buffer area is a zone that is positioned at the viewing area central part.The buffer area of this layout structure namely is used for adjusting cursor movement in a lateral direction, also can be used for adjusting the movement of cursor on vertical direction.
The layout type of above buffer area only is used for being not limited to protection scope of the present invention as the example explanation, moves the needs of control according to actual cursor, and multiple different buffer area layout type can be arranged.
In sum, the embodiment of the invention provides a kind of cursor-moving method and system of touch panel device.After these method and system are obtained user's touch coordinate at equipment, be not only to be positioned at the position, viewing area that shows block according to touch coordinate to come moving cursor, and need also to judge whether touch coordinate is located at the buffer area of delimiting in the described viewing area, and judge whether cursor is carried out displacement control with this.Owing in the viewing area that shows block, marking this buffer area, make the user can not rock in the adjacent side of demonstration block because touching the inaccurate cursor that not make in location, have experience effect preferably.Persons skilled in the art any not creative transformation of doing under this design philosophy all should be considered as within protection scope of the present invention.