-
Notifications
You must be signed in to change notification settings - Fork 11
Options
- Introduction
- Enabling ANSI escape sequences (Windows)
- Enabling UNICODE characters (Windows)
- Hide cursor
To set specific options you can use the osm::OPTION
function, within the corresponding enum class
object.
In some Windows operating systems you may need to manually enable ANSI escape sequences, in order to correctly use all the features of the library. To do this you can use the osm::enableANSI
function at the beginning of the program and the osm::disableANSI
one at the end, to come back to the previous settings. An easy way is to call them withing the OPTION
function:
osm::OPTION( osm::ANSI::ON );
// doing some stuff...
osm::OPTION( osm::ANSI::ON );
What is written in previous paragraph holds also for UNICODE characters (used in the plot_2D.hpp module for example). They can be enable in this way:
osm::OPTION( osm::UNICODECH::ON );
// doing some stuff...
osm::OPTION( osm::UNICODECH::ON );
To hide the cursor in a certain program and then re-enabling it:
osm::OPTION( osm::CURSOR::OFF );
// doing some stuff...
osm::OPTION( osm::CURSOR::ON );
It may happens that cursor disappears if stopping a program in which a progress bar is running. In this case you have to simply close the terminal and open a new one to restore it.