Re: Cocoa NSTextView in Carbon
Re: Cocoa NSTextView in Carbon
- Subject: Re: Cocoa NSTextView in Carbon
- From: "Mark Munz (DevList)" <email@hidden>
- Date: Fri, 3 Jun 2005 15:48:17 -0500
On Jun 3, 2005, at 9:03 AM, Nick D'Amato wrote:
I'm rephrasing the question in case I was too confusing the first
go round :)
I'm looking to export stylized text from an NSTextView in a format
that can be read by the Carbon function
ATSUUnflattenStyleRunsFromStream. The goal is to transfer stylized
text from a Cocoa object to a Carbon application without losing the
style runs. I'll then use this text to render using Carbon ATSUI
for printing.
Thanks for any advice!
Nick
On Jun 2, 2005, at 11:52 AM, Nick D'Amato wrote:
Hi,
I have a carbon 'layout' application that will have styled text
objects. When the user clicks on the text, I want the editor to be
a Carbon NSTextView since it has so many nice features. I've got a
bundle working and have the Carbon code calling it just fine. The
only dilema I have now...
When my Carbon app asks the Cocoa gui for the styled text object,
I'd like to get it in a format that Carbon can understand. It looks
like 'flattened text' is the winner, since this is what the global
Pasteboard uses. Is there a way to extract a 'flattened text'
object from the NSTextView so my Carbon app can further use it (for
ATSUI rendering to printer)?
If there is a better way, I'm more than open for suggestions :P
Thanks in advance
Nick
_______________________________________________
If you're running on Tiger and later, you could maybe take advantage
of the fact that CFAttributedString is a toll-free bridged
counterpart to NSAttributedString. That gives you basically RTF via
Carbon.
Mark Munz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden