background image
C H A P T E R 9
Recognition
9-2
About the Recognition System
Although no recognizers are associated with clicks and strokes, they do pass
through the recognition system, allowing your view to respond to them by means
of optional
ViewClickScript
and
ViewStrokeScript
methods that you
supply as necessary. The
ViewClickScript
method of a view that accepts pen
input takes application-specific action when the pen contacts or leaves the surface
of the screen within the view's boundaries. The
ViewStrokeScript
method
performs application-specific processing of input strokes before they are passed on
to the gesture, shape, or text recognizers.
The gesture recognizer identifies system-defined gestures such as scrubbing items
on the screen, adding spaces to words, selecting items on the screen, and so on.
Views based on the
clEditView
and
clParagraphView
classes (edit views
and paragraph views, respectively) respond automatically to standard system-
defined gestures; other kinds of views do not. Your view can provide an optional
ViewGestureScript
method to perform application-specific processing of
system-defined gestures. You cannot define new gestures to the system.
Only views based on the
clEditView
class can recognize shapes. The shape
recognizer uses symmetry found in input strokes to classify them as shapes. The
shape recognizer may make the original shape more symmetrical, straighten its
curves, or close the shape. There is no developer interface to shape recognition.
The system provides two text recognizers--one optimized for a printed handwriting
style and another optimized for a cursive handwriting style. The printed text
recognizer (also called the printed recognizer) requires that the user lift the pen
from the screen between letters. The cursive text recognizer (also called the cursive
recognizer
) accepts cursive input (letters connected within a single word), printed
input (disconnected letters within a single word), or any combination of these two
kinds of input.
In views that recognize text, the system enables the printed recognizer by default
unless the cursive recognizer is enabled explicitly. The user can specify the use of a
particular text recognizer from within the Handwriting Recognition preferences
slip. This user preference slip and others that affect recognition behavior are
discussed in "User Preferences for Recognition" beginning on page 9-14.
Only one text recognizer can be active at a time--all views on the screen share the
same text recognizer--but individual views can specify options that customize its
behavior for a particular view. Individual views can also use any combination of
other recognizers in addition to the specified text recognizer. Regardless of which
text recognizer is in use, the recognition system limits the size of individual input
strings to 32 characters--longer words may not be recognized correctly.
Although the Newton platform currently supports only its built-in recognizers,
future versions of the system may permit the use of third-party recognizer engines.
The next section describes how the recognition system classifies input as text,
shapes, or gestures.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна