• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -[PDFView drawPage:] and Printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[PDFView drawPage:] and Printing


  • Subject: Re: -[PDFView drawPage:] and Printing
  • From: Antonio Nunes <email@hidden>
  • Date: Tue, 10 Feb 2009 15:19:57 +0100

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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >-[PDFView drawPage:] and Printing (From: Kyle Sluder <email@hidden>)
 >Re: -[PDFView drawPage:] and Printing (From: John Calhoun <email@hidden>)
 >Re: -[PDFView drawPage:] and Printing (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSSavePanel called from BSD application - no keyboard input
  • Next by Date: Re: -[PDFView drawPage:] and Printing
  • Previous by thread: Re: -[PDFView drawPage:] and Printing
  • Next by thread: Re: -[PDFView drawPage:] and Printing
  • Index(es):
    • Date
    • Thread