background image
C H A P T E R 9
Recognition
9-22
Using the Recognition System
recognition behavior by setting view flags or providing a
recConfig
frame.
Specifically,
clEditView
views create
clParagraphView
or
clPolygonView
child views automatically as required to display output from the
recognition system. To use other kinds of views for recognition, you may need to
provide
view
Xxx
Script
methods that create these child views and respond in
other ways to recognition system events.
Configuring the Recognition System
9
You can take the following approaches to configuring the recognition system:
Set view flags only. This approach works well for most applications and is
described in this chapter.
Set view flags and allow the user to configure recognition from a
protoRecToggle
view that you provide. The easiest way to do this is by
setting the
vAnythingAllowed
mask, which is described in this chapter.
This approach supports the use of ink text in
clEditView
views. Use of
the
protoRecToggle
view is described in Chapter 10, "Recognition:
Advanced Topics."
Set view flags and supply a recognition configuration frame based on
ROM_rcInkOrText
. This approach supports ink text in
clEditView
views.
You should provide a
protoRecToggle
view as well, to allow the user to
switch easily between text and ink text.
Supply a recognition configuration frame of some other kind. This approach
offers you the most control and flexibility, but also requires the most work to
implement. The difficulty of enabling ink text according to the value of a
protoRecToggle
view depends on the particular implementation of your
recConfig
frame. Recognition configuration frames are described in
Chapter 10, "Recognition: Advanced Topics."
Use the
RecogSettingsChanged
message sent by the
protoRecToggle
view to enable recognition behaviors dynamically. This technique is described in
Chapter 10, "Recognition: Advanced Topics."
Except where noted otherwise, all of the flags described in this chapter are set in
the view's
viewFlags
slot. When setting the values of
viewFlags
slots,
remember that in order to produce useful behavior you may need to set other bits in
addition to the recognition-oriented ones that this chapter describes. To preserve
settings that your view's
viewFlags
slot inherits from its view class, you should
logically
OR
changes to bits in this slot.
For information on non-recognition view flags provided by the system, see
Chapter 3, "Views."
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна