Page 1 of 1

How write terminal emnulator?

Posted: Thu Dec 10, 2020 6:34 am
by AndrzejB
Features:
- mono-spaced font
- only last logical line editable
- non editable last line prompt
- logical line can be two or more physical lines
- resizing of dialog causes change logical line to one physical or more, depend of text length

Re: How write terminal emnulator?

Posted: Thu Dec 10, 2020 6:48 am
by New Pagodi
If you're really determined to do this, I would start with the source for the text control from the wxUniveral port(<wxroot>/src/univ/textctrl.cpp) and adapt it so that only the last line is editable. You can probably throw out a substantial portion of the code since it won't be relevant for what you want to do.

Re: How write terminal emnulator?

Posted: Thu Dec 10, 2020 8:10 am
by PB
This could be significantly simplified if you allowed for, IMO non-important, deviation from the similar applications.

In other words, having two text controls, one read-only with the previous output and an actual input one below it. The "problem" would be that when scrolling, only the previous output would scroll, the input line being always visible and available. That would actually be a plus in my book, but that is just me.

Re: How write terminal emnulator?

Posted: Thu Dec 10, 2020 9:40 am
by AndrzejB
I think, I should first write simple one-line editor. Text cursor is delivered by system or I must draw vertical line using timer? How to choose mono-spaced font Linux/Windows independent?

Re: How write terminal emnulator?

Posted: Thu Dec 10, 2020 6:56 pm
by AndrzejB
Own components using wxWidgets should have name start with "wx" or other , for example "wxx"?
wxTerminal or wxxTerminal?