Small "code" editor example for improving a GUI
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. 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
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
Thanks Peter, I will start with the font increase, decrease part then. Is important. My eyes are not so young now. Will try building some small widget with a Tex class using text area and two buttons. It shouldn't be so hard. Cheers, Offray On 06/10/16 12:45, Peter Uhnak wrote:
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
I am a masochist and still use Morphic I love Morphic Yes I know I have talked to my psychiatrist about it, he adjusted my drugs On Thu, 6 Oct 2016 at 20:52, Offray Vladimir Luna Cárdenas < offray.luna@mutabit.com> wrote:
Thanks Peter,
I will start with the font increase, decrease part then. Is important. My eyes are not so young now. Will try building some small widget with a Tex class using text area and two buttons. It shouldn't be so hard.
Cheers,
Offray
On 06/10/16 12:45, Peter Uhnak wrote:
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
Hi, On 06/10/16 14:29, Stephan Eggermont wrote:
On 06/10/16 17:41, Offray Vladimir Luna Cárdenas wrote:
I gave a glimpse to the RubTextAreaExamples yesterday, but if anyone knows a more complete example to start with, that would be really helpful.
Did you take a look at my CodePanel experiment code?
Thanks Stephan for pointing me this. I have installed it and the behaviour regarding Ctrl +, Ctrl -, to increase/decrease font size is pretty much what I'm looking for. I will try to cross some of these ideas with Doru's last Pillar editor. Cheers, Offray
participants (4)
-
Dimitris Chloupis -
Offray Vladimir Luna Cárdenas -
Peter Uhnak -
Stephan Eggermont