background image
C H A P T E R 3
Views
3-24
About Views
fxZoomCloseEffect
--opposite of
fxZoomOpenEffect
. This value
shrinks the image of the view from a point in the center until it disappears or
closes on the screen.
fxZoomVerticalEffect
--the view expands out from a horizontal line in the
center of its bounds. The top half moves upward and lower half moves
downward.
A complete
viewEffect
specification might look like this:
fxVenetianBlindsEffect+fxSteps(6)+fxStepTime(8)
You can omit the
fxSteps
and
fxStepTime
constants and appropriate defaults
will be used, depending on the type of the effect.
Table 2-7 (page 2-86) in Newton Programmer's Reference lists the constants that
you can use in the
viewEffect
slot to create custom animation effects. You
combine these constants in different ways to create different effects. For example,
the predefined animation type
fxCheckerboardEffect
is defined as:
fxColumns(8)+fxRows(8)+fxColAltPhase+fxRowAltPhase+fxDown
It is difficult to envision what the different effects will look like in combination, so it
is best to experiment with various combinations until you achieve the effect you want.
Other Characteristics
3
Other view characteristics are controlled by the following slots:
viewFont
Specifies the font used in the view. This slot applies only to
views that hold text, that is, views of the class
clParagraphView
. For more information about how to
specify the font, see the section "Using Fonts for Text and
Ink Display" (page 8-17) in "Text and Ink Input and Display"
declareSelf
When the template is instantiated, a slot named with the
value of this slot is added to the view. Its value is a reference
to itself. For example, if you specify
declareSelf:'base
,
a slot named
base
is added to the view and its value is set to
a reference to itself. Note that this slot is not inherited by the
children of a view; it applies only to the view within which
it exists.
Inheritance Links
3
These slots describe the template's location in the inheritance chain, including
references to its proto, parent, and children. The following slots are not inherited
by children of the template.
_proto
Contains a reference to a proto template. This slot is created
when the view opens.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна