On 10 Feb 2009, at 05:51, Kyle Sluder wrote:

Does PDFView refer to a view containing the enclosing scroll
view, or perhaps the scroll view itself?  If so, why does -[PDFView
drawPage:] exist?

One use is that it can be overridden for all kinds of customization. For instance, you may need to draw a selection rectangle during a drag on a page. You could do that in PDFView's drawPage: method.

- (void)drawPage:(PDFPage *)page
{       
        // Draw the source PDFPage
        [super drawPage:page];

        // Draw whatever you want to appear on top of the page. E.g:

        if (self.masterDocument.onScreenDisplayBoxes > 0) {
                [self drawOnscreenDisplayBoxesForPage:page];    
        }

        if (page == mouseDownPage) {
                [self drawDraggingFeedbackOnPage:page];
        }
}

-António

----------------------------------------------------
Energy is like a muscle,
it grows stronger through being used.
----------------------------------------------------


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to