background image
C H A P T E R 3
About Views
Opening and closing animation effects
slot defines an animation to be performed
when the view is displayed or hidden.
Other attributes
Some other slots define view characteristics such as font,
copy protection, and so on.
Inheritance links
, and
slots contain links to a view's template,
parent view, and child views.
These different categories of view characteristics are described in the following
slot defines the view class. This information is used by the
system when creating a view from its template. The view class describes the type
of graphic object to be used to display the data described in the template. The view
classes built into the system serve as the primitive building blocks from which all
visible objects are constructed. The view classes are listed and described in Table 2-2
(page 2-4) in the Newton Programmer's Reference.
slot defines behavioral attributes of a view other than those that
are derived from the view class. Each attribute is represented by a constant defined
as a bit flag. Multiple attributes are specified by adding them together, like this:
Note that in the NTK viewFlags editor, multiple attributes are specified simply by
checking the appropriate boxes.
Some of the
constants are listed and described in Table 2-4 (page 2-11)
in the Newton Programmer's Reference. There are also several additional constants
you can specify in the
slot that control what kinds of pen input (taps,
strokes, words, letters, numbers, and so on) are recognized and handled by the view.
These other constants are described in "Recognition" (page 9-1).
View behavior is also controlled through methods in the view that handle system
messages. As an application executes, its views receive messages from the system,
triggered by various events, usually the result of a user action. Views can handle
system messages by having methods that are named after the messages. You
control the behavior of views by providing such methods and including code that
operates on the receiving view or other views.
For a detailed description of the messages that views can receive, and information
on how to handle them, see "Application-Defined Methods" (page 3-26)."
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна