I'm making a c++ console application, I want to split the console screen into parts and every part will print an individual output, to be more clear the console screen should be close to the design of Far Manger console app screen, but I have no idea how to start and what libraries should I use to do so. Sorry if it's a naive question but I seriously have no idea and couldn't find what I want when I made a search.
-
I don't know if most consoles even support that splitting the window. I doubt they do. You'll probably need to find a console that supports this, then use their API.Carcigenicate– Carcigenicate2017-01-30 12:54:00 +00:00Commented Jan 30, 2017 at 12:54
-
What operating system(s) are you targeting? (There could be workarounds for this, e.g. like this on Windows).Steeve– Steeve2017-01-30 12:54:50 +00:00Commented Jan 30, 2017 at 12:54
Add a comment
|
2 Answers
If you want control of console text, such as positioning, or representation in a windowed fashion, have a look at ncurses.
Your target system may support escape sequences (see the wiki ANSI Escape Codes), or have particular API (as mentioned in the above comments) to implement console manipulation.
Comments
maybe it will be useful to someone I wrote a class that can replace std and divide the terminal into 2 parts
CustomCout code: https://pastebin.com/6gU1a3wz
int main() {
enable_ansi_codes();
CustomCout custom_cout;
custom_cout.set_mode(1); // cout prints in the left part
cout << "Hello"
custom_cout.set_mode(2); // cout prints in the right part
cout << "World"
return 0;
}