background image
C H A P T E R 1 0
Recognition: Advanced Topics
10-6
About Advanced Topics in Recognition
The user can enter unrecognized ink by enabling ink text or sketch ink. In this
mode, strokes appear as ink. To convert the ink to text, the user double-taps the ink
word; the user can cause multiple words to be recognized by selecting them
beforehand and then double-tapping the selection. The recognition system responds
by inverting the ink word or selection, as shown in Figure 10-2, and returning the
recognized text, which replaces the selection.
Figure 10-2
User interface to deferred recognition, with inverted ink
Programmer's Overview of Deferred Recognition
10
Deferred recognition is available in views based on the
clEditView
class or
clParagraphView
views that support ink text. This feature works with any
amount of input, from a single letter to a full page of text.
To initiate deferred recognition, the user double-taps the child views that display
the ink to be recognized. The recognized text is added to an edit view as if the user
had just written it. That is, a new
clParagraphView
child is added, or the
recognized text is appended to a nearby
clParagraphView
. After the recognized
text has been added, the original view containing the sketch ink or the ink text is
removed from its edit view parent.
Deferred recognition also invokes the
ViewAddChildScript
and
ViewDropChildScript
methods of the recognized text and unrecognized ink
views. Words added to nearby paragraphs invoke
ViewChangedScript
methods for those paragraphs, updating the
text
slot in those views; for some
paragraph views, the
viewBounds
slot is updated as well.
You can pass
recConfig
frames to the global functions
Recognize
,
RecognizePara
, and
RecognizePoly
to implement your own form of
deferred recognition. For more information, see "Deferred Recognition Functions"
(page 8-89) in Newton Programmer's Reference.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна