Custom NSTextView for text annotations
Custom NSTextView for text annotations
- Subject: Custom NSTextView for text annotations
- From: Isaac Alston <email@hidden>
- Date: Sun, 28 Mar 2010 02:48:15 +0100
Hi,
I am currently working on a document reader and annotation program.
This program will allow the user to import text files and annotate
them, both in the margins and by attaching annotations to specific
words. As the cursor is hovered over a word, its annotation will
appear in some sort of coloured 'bubble' beside it. I will have a
custom file format to store the locations of these annotations in
relation to the text file.
I am fairly new to Cocoa and I am not sure about how to implement my
annotations. I do not want to use PDF because most of the imported
documents will only be in text format, for example works from Project
Gutenberg. I have done some searching and the closest I have come to a
solution is NSTextAttachment, but this inserts an object into the flow
of the text and changes the line height of the text for example. I am
thinking that I will have to somehow subclass NSTextView and do some
custom drawing. Is this the right way to go about it? How should I
write this feature? Any advice is much appreciated.
Thank you,
--
Isaac
_______________________________________________
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