Skip to content

Options

Gianluca Bianco edited this page Jul 4, 2022 · 2 revisions

Table of contents

Introduction

To set specific options you can use the osm::OPTION function, within the corresponding enum class object.

Enabling ANSI escape sequences (Windows)

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 );

Enabling UNICODE characters (Windows)

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 );

Hide cursor

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.