• 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: Custom PDF annotation widgets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom PDF annotation widgets


  • Subject: Re: Custom PDF annotation widgets
  • From: John Calhoun <email@hidden>
  • Date: Mon, 19 Feb 2007 10:48:37 -0800

On Feb 17, 2007, at 3:02 PM, Kevin Wojniak wrote:

I would like to create custom annotation widgets for more control over how the text and button widgets operate. However I'm not sure what is the correct way to do this. How do you handle mouse/keyboard events? Annotations aren't NSView/NSControl objects so I don't see where to do this.

Also, it seems like you cannot set PDFAnnotationButtonWidget's control type?

Sadly, the real editing capabilities for annotations were not fully fleshed out in Tiger. They're much broader in Leopard. For example, PDFAnnotationButtonWidget does have a -[setControlType].


As per hit testing, this is handled by the PDFView. So subclassing PDFView would be in order. Override -[mouseDown:] and do your own hit- testing. If not over one of your custom annotation, you can call - [super] to get the standard PDFView behavior. I think you should be able to find the sample project: PDFKitLinker2 that shows you how to do this (it handle Link annotations though).

Generally though, for your type of application, Leopard is going to be a better fit.

john calhoun—_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Custom PDF annotation widgets (From: Kevin Wojniak <email@hidden>)

  • Prev by Date: Re: Preventing beach balls
  • Next by Date: Re: How do you close a NSDrawer after a NSThread has finished
  • Previous by thread: Custom PDF annotation widgets
  • Next by thread: Need Better Understanding of Modal Delegates
  • Index(es):
    • Date
    • Thread