Simply like vim, nano, and some other command line text editors. When entering the application, it turns into another text-based screen, and the application can modify every single characters as UI independently without any command line screen scrolling (when simply outputing characters to fill the screen in my own program, the terminal would do auto scrolling), and can even handle mouse events within the console screen.
1
~
~
~
~
~
~
~
-- VISUAL -- 0,0-1 All
And then exiting the application, the screen restores and looks like that the the application never outputs (the application screen is not likely to overwrite the external output at all):
~$ vim
~$
As for Windows, there used to be a "EDIT" command that worked similarly.
How can I make a similar one to implement a text-based UI? Which sort of API should I call?
Does it depend on the OS or the terminal type?
I wish it could work on both Linux (as well as via SSH) and Windows command line. Is there any solution that works on both or I have to implement them separately?
I need to develop it in C# (.NET Core) so managed code solutions are preferred, but native (C language) solutions are OK.