I am working on a program to analyze data. Rather than being fully menu driven, the user can type in commands.
I envisioned a wxTextCtrl to take in the text then parse and process it when the value changed.
I have a prototype of this that works well enough.
But now I would like to make this interface better by providing features like the C "readline" and "history" routines provide.
Specifically using an up arrow to get to previous commands rather than having to retype them.
Some of the editing features would be nice as well.
Googling seems to indicate that getting an event for each keystroke in a wxTextCtrl is not trivial.
Reimplementing all the features seems like a colossal waste of time.
Before I go down that dark corridor, am I even in the right building?
Is there a better widget already made that would give me the capabilities of "readline" and "history"?
Edit1: Platform is Linux (Ubuntu). Crossdev not needed.
Command line widget like readline/history
Re: Command line widget like readline/history
I found this: https://stackoverflow.com/a/2215693 (the terminal emulation is here: https://github.com/jeremysalwen/TerminalWx).
Re: Command line widget like readline/history
Interesting. I will look at this tonight.
Re: Command line widget like readline/history
I would also look at the idea to use wxStreamToTextRedirector. Maybe you can attach readline directly to a wxTextCtrl...