views:

190

answers:

2

I am looking for a syntax highlighting component that I can include in a Mac OS X XCode project to allow editing of Ruby, C++, Lua, etc.

I need a component that is open source or has the source included.

My Google searches didn't turn up much in the way of Mac OS X frameworks or components at all, let alone the type I am looking for.

Thanks for any pointers!

+3  A: 

UKSyntaxColoredTextDocument (Mac-specific) or Scintilla (cross-platform and in use in a variety of editors, including Komodo) might be what you're looking for.

Isaac
Ah...I saw Scintilla but somehow thought it was Win32 only.
Bytenik
The UKSyntaxColoredTextDocument looks good too, but I wonder about the license.
Bytenik
The Scintilla page, when I looked at it again for your question, does not appear to mention Mac at all, but I know it's used in Komodo (listed under "Related" on scintilla.org) and I've used Komodo on the Mac.It looks like another URL for UKSyntaxColoredTextDocument is http://github.com/uliwitness/UKSyntaxColoredTextDocument/ (perhaps more recent--in fact, I'm going to change the URL in my answer) and a README.txt file there has a license block in it that appears (at a quick glance--read for yourself to be sure) to be BSD.
Isaac
The UKSyntaxColoredTextDocument license fee is extremely reasonable.
Rob Keniger
+1  A: 

Try to use scintilla. http://www.scintilla.org/

osgx
@Bytenik, scintilla was at least carbon version http://www.mail-archive.com/[email protected]/msg01961.html
osgx