MIRA
Enumerations | Functions
mira::console Namespace Reference

Enumerations

enum  TextColor {
  DEFAULT = 0, BLACK, DARKGREY, LIGHTGREY,
  WHITE, RED, GREEN, YELLOW,
  BLUE, MAGENTA, CYAN, LIGHTRED,
  LIGHTGREEN, LIGHTYELLOW, LIGHTBLUE, LIGHTMAGENTA,
  LIGHTCYAN
}
 
enum  StdOutput { STD_OUTPUT, STD_ERROR }
 

Functions

MIRA_BASE_EXPORT void enableEcho (bool enable=true)
 Enables or disables echo for text that is typed when using std input, e.g. More...
 
MIRA_BASE_EXPORT void setTextColor (TextColor color=DEFAULT, StdOutput output=STD_OUTPUT)
 Sets the color of the console text as specified. More...
 
MIRA_BASE_EXPORT int getWidth ()
 Returns the number of columns of the console, i.e. More...
 

Enumeration Type Documentation

◆ TextColor

enum TextColor
Enumerator
DEFAULT 
BLACK 
DARKGREY 
LIGHTGREY 
WHITE 
RED 
GREEN 
YELLOW 
BLUE 
MAGENTA 
CYAN 
LIGHTRED 
LIGHTGREEN 
LIGHTYELLOW 
LIGHTBLUE 
LIGHTMAGENTA 
LIGHTCYAN 

◆ StdOutput

enum StdOutput
Enumerator
STD_OUTPUT 

std::cout

STD_ERROR 

std::cerr

Function Documentation

◆ enableEcho()

MIRA_BASE_EXPORT void mira::console::enableEcho ( bool  enable = true)

Enables or disables echo for text that is typed when using std input, e.g.

cin. Disabling the echo is useful when the user types passwords, etc.

◆ setTextColor()

MIRA_BASE_EXPORT void mira::console::setTextColor ( TextColor  color = DEFAULT,
StdOutput  output = STD_OUTPUT 
)

Sets the color of the console text as specified.

Parameters
[in]colorThe color for the console text
[in]outputThe console where the color change should be applied

◆ getWidth()

MIRA_BASE_EXPORT int mira::console::getWidth ( )

Returns the number of columns of the console, i.e.

the width of the text area.