I need a cross-platform editor control to use as GUI-part in an in-house tool. The control may be commercial, but with reasonable price.
Required features:
- Platforms: Win32, OS X, Linux
- UTF-8 support
- Fine-grained run-time control to the text style (or at least color)
- Nice low-level plain C API without usual horrible bloat
- Should not prevent me to have these features (even if I'll have to implement them myself):
- Undo / Redo
- Copy / Paste
- Context menu, depending on click position in text
- Toolbar, depending on cursor position in text
- Sidebar panel, depending on cursor position in text
Actually above requires not simple control, but whole cross-platform GUI library.
Discarded options:
- Scintilla and descendants
- FLTK
- Fox-toolkit
- gtksourceview
Update:
Note: I've slipped in some half-written discard reasoning here, I apologize. Scintilla indeed does work on OS X. However, if I get it correctly, Scintilla's API is in C++.
Use-case:
My use-case is to write custom "semi-rigid" logic editor, where user is free to copy-paste around, add comments where he wishes, even type in text directly if he wish. But text structure is a rigid natural language representation of logic tree (somewhat AST-like in nature). I plan to write something intellisense-like (or code-template-like) to be used as the main authoring tool (instead of typing logic by hand).
BTW, storage format would not be plain text, but instead internal representation of mentioned logic tree (with comments and whitespaces etc. metainfo).
So, I have all necessary information to render text in needed colors by myself. I do not need any external lexers etc.