C H A P T E R 8
Text and Ink Input and Display
instead, they have child views that contain the individual data items. Text items
are contained in child views of the class
and graphics are
contained in child views of the class
A view of the
class includes the following features:
Automatic creation of
the user writes or draws in the view. These child views hold the data the user writes.
Support for inclusion of
views, which are used for images.
Text and shape recognition, selection, and gestures such as scrubbing, copying
to clipboard, pasting from clipboard, duplicating, and others, as controlled by
the setting of the
slot. The initial recognition is handled by the
. A child
and that child view handles subsequent editing of the data.
Drag and drop handling. A child view can be dragged (moved or copied) out of
and dropped into another
, whose child it then
becomes. Other views can be configured to handle data dragged from a
, as described in "Views" (page 3-1).
Clipboard support. A
child view can
be dragged (moved or copied) to the clipboard, from which it can be pasted into
, whose child it becomes.
Automatic resizing of
child views to accommodate added
input. This feature is controlled by the
flag in the
slot of those child views.
Automatic addition of new words to existing paragraphs when caret insertion
writing mode is disabled.
Views of the class
are intended for user input of text, shape, image,
and ink data. Consequently, views of this class expect that any child views have
been defined and created at run time, not predefined by templates created in NTK.
If you need to include predefined child views in a
, use the
method of the
to define the child
views and set up the
array. You might need to do this, for
example, if you store the data for child views in a soup, and you need to retrieve
the data and rebuild the child views at run time. For more information, see
"Including Editable Child Views in an Input View" (page 8-9).
The default font for a
created by a
is the font
selected by the user on the Styles palette in the system.
The default pen width for a
created by a
width set by the user on the Styles palette.
The slots of
are described in "General Input View (clEditView)"
(page 7-12) in Newton Programmer's Reference.