On Thu, Oct 06, 2016 at 10:41:10AM -0500, Offray Vladimir Luna Cárdenas wrote:
Hi,
I would like to create some GUI that would be essentially a text area field plus some buttons. The idea is to support
- Font size increasing/decreasing.
- Syntaxt highlighting for markup languages.
The hardest part is the syntax highlighting itself, because you need (ideally non-strict) parser and highlighter for each language. There are several languages that use PetitParser for both. Then you basically build up the text with `Text`, (`Text` class supports things like specifying color, emphasis, etc.). And then you can just show the text in a RubTextArea. You can even use Spec' TextModel; I used TextModel and PetitParser based highlightning for coloring my DSL, but I never got around to finishing it. I believe Johan's Live State Machine editor does something similar. Also look at Pillar support (I saw mails floating around that it was updated or something). Peter
I gave a glimpse to the RubTextAreaExamples yesterday, but if anyone knows a more complete example to start with, that would be really helpful.
Cheers,
Offray