How write terminal emnulator?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
AndrzejB
Experienced Solver
Experienced Solver
Posts: 84
Joined: Sun Nov 29, 2015 12:46 pm

How write terminal emnulator?

Post by AndrzejB » Thu Dec 10, 2020 6:34 am

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

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 381
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: How write terminal emnulator?

Post by New Pagodi » Thu Dec 10, 2020 6:48 am

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.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2947
Joined: Sun Jan 03, 2010 5:45 pm

Re: How write terminal emnulator?

Post by PB » Thu Dec 10, 2020 8:10 am

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.

AndrzejB
Experienced Solver
Experienced Solver
Posts: 84
Joined: Sun Nov 29, 2015 12:46 pm

Re: How write terminal emnulator?

Post by AndrzejB » Thu Dec 10, 2020 9:40 am

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?

AndrzejB
Experienced Solver
Experienced Solver
Posts: 84
Joined: Sun Nov 29, 2015 12:46 pm

Re: How write terminal emnulator?

Post by AndrzejB » Thu Dec 10, 2020 6:56 pm

Own components using wxWidgets should have name start with "wx" or other , for example "wxx"?
wxTerminal or wxxTerminal?

Post Reply