C H A P T E R 3
-- is sent to the source view when the destination view
-- is sent to the destination view. You must add the object to
the destination view.
-- is sent to the source view. It is used when dragging
an object within the same view.
are not called in this case.
-- is sent to the source view. It is used when
dragging an object from one view to another. You must delete the original from
the source view when the drag completes.
Additional optional methods can also be added. If you do not include these, the
default behavior occurs.
-- is sent to the source view. It draws the image
that will be dragged. If you don't specify an image, the area inside the rectangle
specified by the
bounds parameter is used.
-- is sent to the source view. It draws
the image that will appear behind the dragged image.
-- is sent to the destination view. It lets the
destination view change the drop point to a different view.
-- is sent to the destination view. It provides
visual feedback while items are dragged.
-- is sent to the destination view to tell it that the
object has been dropped.
Scrolling View Contents
There are different methods of scrolling a view, supported by view methods you
call to do the work. Both methods described here operate on the child views of the
view to which you send a scroll message.
One method is used to scroll all the children of a view any incremental amount in
any direction, within the parent view. Use the
method to perform this
kind of scrolling. This method changes the view origin by setting the values of the
slots in the view.
Another kind of scrolling is used for a situation in which there is a parent view
containing a number of child views positioned vertically, one below the other. The
method provides the ability to scroll the child views up or down the
height of one of the views. This is the kind of scrolling you see on the built-in