C H A P T E R 3
In the latter kind of scrolling, the child views are moved within the parent view by
changing their view bounds. Newly visible views will be opened for the first time,
and views which have scrolled completely out-of-view will be closed. The
viewOriginX and viewOriginY slots are not used.
For information about techniques you can use to optimize scrolling so that it
happens as fast as possible, see "Scrolling" (page 3-46), and "Optimizing View
Performance" (page 3-44).
Redirecting Scrolling Messages
You can redirect scrolling messages from the base view to another view. Scrolling
and overview messages are sent to the frontmost view; this is the same view that is
returned if you call
view is found by looking recursively at views that have
bits set in their
means that you can set the
bit in a descendant of your base view,
and as long as
is set in all of the views in the parent chain for that
view, the scrolling messages will go directly to that view. The
is not just for base views, despite what the name might suggest.
If your situation is more complex, where the view that needs to be scrolled cannot
set or is not a descendant of your base view, you can have the
base view's scrolling scripts call the appropriate scripts in the view you wish scrolled.
Working With View Highlighting
A highlighted view is identified visually by being inverted. That is, black and white
To highlight or unhighlight a view, send the view the
To highlight or unhighlight a single view from a group, send the view the
message. (The group is defined as all of the child views of one
To highlight a view when the current pen position is within it, send the view the
message. The view is unhighlighted when the pen moves outside
the view bounds. If the view is a button, you can send the view the
message to accomplish the same task.
To get the view containing highlighted data, you can call the global function
; to get the highlighted text use
To highlight some or all of the text in a paragraph, you can use the